ghseeli / latex2blender

Code to render LaTeX and import it into Blender
GNU General Public License v3.0
56 stars 13 forks source link

Tikz fails to render? #17

Closed tobiasBora closed 3 months ago

tobiasBora commented 1 year ago

I was expecting this great plugin to also work for tikz pictures, but seems like it renders garbage like [circle,draw,alias=A] at (0,0) {A}; \node[circle,draw,alias=B] at (1.5cm,0cm) {B}; \draw[-latex] (A) -- (B);} instead of the proper diagram:

Custom preambule:

\usepackage{tikz}
\usetikzlibrary{positioning}

Text to render:

\tikz{ \node[circle,draw,alias=A] at (0,0) {A};  \node[circle,draw,alias=B] at (1.5cm,0cm) {B};  \draw[-latex] (A) -- (B);}
peterkj1 commented 1 year ago

This issue has to do with dvisvgm and ghostscript (see the first FAQ https://dvisvgm.de/FAQ/). If you update dvisvgm and ghostscript to newer versions, it should fix the problem. I was able to recreate the problem on my computer and updating those two command line tools fixed it for me. I am currently using dvisvgm version 3.0.3 and ghostscript version 10.01.2.

Alternatively, if you update your Tex installation to the most recent version it will likely fix the issue as it will probably update dvisvgm and ghostscript as part of the overall update.