Skip to content

Instantly share code, notes, and snippets.

@dginev
Last active December 17, 2016 08:00
Show Gist options
  • Save dginev/a233a1bd0e9d73e2a43e5d30cc5a706c to your computer and use it in GitHub Desktop.
Save dginev/a233a1bd0e9d73e2a43e5d30cc5a706c to your computer and use it in GitHub Desktop.
A tiny benchmark example, comparing TeX -> HTML renderers

Example:

\documentclass{article}
\newcommand\world{World}
\newcommand\newworld{New \world}
\begin{document}
Hello \newworld!
\end{document}

Runtime:

ms cmd lang
7 rtx Rust
7 tralics C++
15 pandoc Haskell
32 pdflatex C
270 htlatex TeX
780 latexmls Perl
1090 latexml Perl

Commands:

  • rtx hello_new_world.tex
  • tralics hello_new_world.tex
  • pandoc hello_new_world.tex
  • pdflatex hello_new_world.tex
  • htlatex hello_new_world.tex
  • latexmlc --expire=60 --format=html5 hello_new_world.tex
  • latexmlc --format=html5 hello_new_world.tex

Example result (rtx)

<?xml version="1.0" encoding="UTF-8"?>
<?latexml class="article"?>
<?latexml RelaxNGSchema="LaTeXML"?>
<document xmlns="http://dlmf.nist.gov/LaTeXML">Hello New World! </document>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment