It looks like @fjp used pseudocode.js, which requires KaTeX, to render the raw LaTeX pseudocode.
I can follow these steps through and build it manually, but
$ pandoc -f latex -t gfm my_file.tex -o my_file.md
will strip all of the LaTeX code from an algorithm
environment except for the basic $x+y$
-type expressions. The links posted above re: custom templates only seem to apply when converting from markdown to LaTeX. The pandoc --filter
option only works after the file is parsed. Pandoc parses out the surrounding \begin
and \end
statements, without making a Div
to separate the algorithm
environment, so it is nearly impossible to recreate the algorithm using a filter. Does anyone know how to “shield” an environment from pandoc
to preserve the raw LaTeX? It would then be easy to run your file through pandoc
and add a Liquid tag:
{% include pseudocode.html id="1" code="
\begin{algorithm}
...
\end{algorithm}
" $}