Hacker News new | ask | show | jobs
by Myrmornis 2214 days ago
It will be great to include Penrose diagrams in LaTeX documents. But Penrose is implemented in Haskell and I'm pretty sure no-one would want to see what it would look like were it implemented in TeX!
2 comments

I agree that rendering graphics as a separate file is fine. I think, if one wants to get better interoperability with TeX, they can try to make Penrose produce TikZ, which can be then embedded into the TeX document.
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).
OK, I see. Sorry yes I agree what you're saying is sensible and what I said was silly.

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?