Tikzcd

What I’m trying to do

I installed the plug-in TikZJax as I wanted to create some diagram. As I am not well versed with the syntax, I tried using tikzcd-editor, and then copied the code and transferred it to Obsidian.

Things I have tried

I tried copying the code from the editor over to Obsidian.

tikz
usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
                                  & {}                                                                                                                                                                                                                               & P \arrow[l, "\nu P"', bend right] &                                                                &  &                                                                                                    \\
{} \arrow[rd, "\mu N", bend left] &                                                                                                                                                                                                                                  &                                   & {}                                                             &  & {}                                                                                                 \\
{}                                & S \arrow[ruu, "\phi\frac{S}{S + R}(\nu P + \nu S_n + \nu I_n + \nu R_n)"] \arrow[rr, "\frac{\beta S (I + I_n)}{N}"] \arrow[dd, "(1 - \phi)\frac{S}{S + R}(\nu P + \nu S_n + \nu I_n + \nu R_n)"'] \arrow[l, "\nu S", bend right] &                                   & I \arrow[rr, "\gamma I"] \arrow[u, "\nu I", bend left]         &  & R \arrow[u, "\nu R", bend left] \arrow[dd, "\frac{R}{S + R}(\nu P + \nu S_n + \nu I_n + \nu R_n)"] \\
                                  &                                                                                                                                                                                                                                  &                                   &                                                                &  &                                                                                                    \\
                                  & S_n \arrow[rr, "\frac{\beta S_n (I + I_n)}{N}"] \arrow[d, "\nu S_n"', bend right]                                                                                                                                                &                                   & I_n \arrow[rr, "\gamma I_n"] \arrow[d, "\nu I_n"', bend right] &  & R_n \arrow[d, "\nu R_n"', bend right]                                                              \\
                                  & {}                                                                                                                                                                                                                               &                                   & {}                                                             &  & {}                                                                                                
\end{tikzcd}
\end{document}

But the loading just didn’t stop. The attached photo is how it looks like on tikzcd-editor.

Any help would be appreciated.

Thank you!

You’ve made a careless mistake. You forgot the slash before usepackage{tikz-cd} . The correct way to write it is \usepackage{tikz-cd} . This command allows you to create commutative diagrams using the tikz-cd package.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.