|
|
|
|
|
by Xophmeister
2214 days ago
|
|
Oh sure, reimplementing in TeX would not be worth thinking about! I'm not familiar with exactly how TeX packages work, but I assumed they could call out to external tools that return the necessary (La)TeX commands (e.g., code syntax highlighters work like this, IIRC). |
|
Yes, minted works like that -- it starts a python child process to use pygments to do the syntax highlighting. But with minted and TikZ there's a single element of "source code" in the LaTeX file (a code listing or tikz code fragment respectively) that maps to a single element in the output (syntax-highlighted code, or a TiKZ image). Whereas with Penrose, there would be multiple source code files (the style and substance code). I'm not sure it quite fits the native LaTeX model does it? Maybe it's better just to use Make to generate the Penrose diagram for inclusion via \includegraphics?