logseq-fenced-code-plus icon indicating copy to clipboard operation
logseq-fenced-code-plus copied to clipboard

tikz figure with usepackage commands

Open manvibharat opened this issue 2 years ago • 1 comments

I want to confirm weather the \usepackage{} commands work in tikz environment as of now. For me they are not working. Hence the question. If not is there any plan to include this feature. Sorry if this is a basic question. For me it says tikz loading and it is blank

for the following example

\usepackage{circuitikz}
\begin{document}

\begin{circuitikz}[american, voltage shift=0.5]
\draw (0,0)
to[isource, l=$I_0$, v=$V_0$] (0,3)
to[short, -*, i=$I_0$] (2,3)
to[R=$R_1$, i>_=$i_1$] (2,0) -- (0,0);
\draw (2,3) -- (4,3)
to[R=$R_2$, i>_=$i_2$]
(4,0) to[short, -*] (2,0);
\end{circuitikz}

\end{document}

manvibharat avatar Apr 27 '23 06:04 manvibharat

No this is not possible at the moment. The compiled tikzjax code that is included is minimal and does not have any of the extra tikz libraries, let alone other libraries.

I think it is possible to compile tikzjax yourself, but it's not straightforward.

m-yaghini avatar May 13 '23 20:05 m-yaghini