xyhp915 / logseq-fenced-code-plus

A Logseq plugin for missing types of fenced code 🚀
MIT License
107 stars 17 forks source link

tikz figure with usepackage commands #25

Open manvibharat opened 1 year ago

manvibharat commented 1 year ago

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}
m-yaghini commented 1 year ago

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.