Kattis / problemtools

Tools to manage problem packages using the Kattis problem package format.
MIT License
101 stars 70 forks source link

Support TikZ figures #196

Open mpsijm opened 3 years ago

mpsijm commented 3 years ago

Currently, when you want to use TikZ with Problemtools, you need to create a standalone LaTeX document and compile it separately, and then include the resulting PDF in the problem statement. It would be nice if Problemtools would natively support TikZ figures.

For LaTeX, this is as simple as adding a \RequirePackage{tikz} to the problemset template, but this is more difficult with the HTML renderer. Apparently it is possible to render TikZ figures with plasTeX (since they have a unit test for it), but it requires external imagers like pdf2svg and gspdfpng, so I'm not sure if you want to support that.

RagnarGrootKoerkamp commented 3 years ago

Note that this also involves including some tikz libraries. BAPCtools currently uses:

\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{backgrounds}
\usetikzlibrary{patterns}