I wanted to include a diagram in an answer, but Mathjax doesn't support TikZ. I therefore wrote the TikZ code in a local .tex file in my PC, compiled it, and included the diagram as a .png file. The problem with this procedure is that it prevents me from sharing the code (in case someone wants to use it themselves somewhere else), and it forces me to keep the .tex file in my PC (so that I can modify it in the future if I need to).
It would be great if I could include the TikZ code in the post itself but, preferably, to make it invisible. Is it possible somehow? An HTML trick perhaps?
<!-- test -->
doesn't work iftest
includes non-trivial characters (e.g., "\"). $\endgroup$ – AccidentalFourierTransform Mar 25 '18 at 14:43