MarTeX-Cpp is a flexable, extendable and fast TeX-to-HTML converter by fully tokenizing-lexing-parsing-interpreting the TeX source. It can be compiled to serve as a module for different languages, like PHP or JavaScript. It's goal is to provide a way to allow users to write TeX they are familiar with to produce nice looking pages like this one, but without allowing code injection.


Special Characters

Just throw any old unicode into martex and it will work. You can also use these escape codes:

Command Result Command Result
\& & \"AaEeIiOoUuy ÄäËëÏïÖöÜüÿ
\% % \'AaEeIiOoUuZ ÁáÉéÍíÓóÚúŹ
\$ $ \`AaEeIiOoUu ÀàÈèÌìÒòÙù
\copy © \^AaEeIiOoUu ÂâÊêÎîÔôÛû
\> > \^AaEeIiOoUu ÂâÊêÎîÔôÛû
\< < \~AaIiOoNnUu ÃãĨĩÕõÑñŨũ
\} } \.AaUu ÅåŮů
\{ { \-Oo Øø
\cdot · \ss ß
\pm ± \func ƒ
\tm \reg ®
\euro \Alpha\alpha Αα
\pound £ \Beta\beta Ββ
\deg ° ...
\backslash \ \Omega\omega Ωω
\L\l Łł


Images are pretty. Normally the images try to fill the page width, you can control this behaviour with the provided sizing options. If you add a caption to an image it will put "Figure 1: caption" under it. You can change "Figure" to , for example, "Picture" by setting the header with a \define{header}{Picture }.

    \caption{This is a test image}
    \alttext{A mouse!}


Note that there are two different list environments: enumerate and itemize with a different default markers, respectively numbers and bullets.

Code Rendered
    \item Brouwcommissie
    \item Colloquiumcommissie
    \item Excurcie
    \item Sponsorcommissie
    \item Symposiumcie
    \item Vakancie
    \item Weekendcommissie
    \item WWW-cie
    \item Coördinatiecommissie
  • Akcie
  • Ambicie
  • Batavieren
  • Boson
  • Brouwcommissie
  • Colloquiumcommissie
  • Excurcie
  1. Impuls
  2. Lustrumcie
  3. Münchencie
  1. Ouderdagcie
  2. Particie
  3. PR-cie
  4. Reunistencie
  1. Sponsorcommissie
  2. Symposiumcie
  3. Vakancie
  4. Weekendcommissie
  5. WWW-cie
  6. Coördinatiecommissie


Tables are a good way to represent content in a neat way. In MarTeX they behave pretty similar to the LaTeX tabulars. The tabular format accepts '|' for vertical lines, 'l' for left aligned column, 'c' for a centered column and 'r' for a right aligned column.

\begin{tabular}[|| l | c | r ||]
    \hline \hline
    1 & 2 & 3 \\\hline
    4 & 5 & 6 \\\hline
    7 & 8 & 9 \\\hline
    \multicolumn{3}{| c |}{0} \\



You can use double enters in the main document environment to make paragraphs but you can also do it manually:
    Paragraph text

Paragraph text


You can center text:

    Center text
Center text


Hide and show text using details.

    Details text

Summary Details text

Marie-Curie Specific functionality


Please feel free to submit anything! The only thing I ask is that you include at least one test that verifies the behaviour of your change.

Bug Bounty Program

If you find a way insert arbitrary html tags and/or get javascript execution from a certain input string then first I'd like to congratualate you on a job well done! Please contact me privately with said input and we'll work on pushing out a fix as quickly as possible.




Thanks to my committee for their endless patience and enthusiasm while listening to me whining on about this.
Thanks to Diego Perini for writing a nifty regex-based URL validator.


This project is licensed under the MIT License - see the file for details