This document is written in LaTeX.
Chirun aims to convert most LaTeXdocuments to HTML without any significant changes. See the documentation on LaTeX compatibility.
1 Document structure
Chirun supports all of LaTeX’s document structure commands.
You can choose to have a document rendered as a single HTML page, or split into separate pages at a certain level of the structure, such as chapters or sections.
2 Mathematical notation
In the HTML format, mathematical notation is rendered using MathJax.
\[ \sum _{n=1}^{\infty } \frac{1}{n^2} = \frac{\pi ^2}{6} \]3 Packages
Chirun uses plasTeX to convert LaTeXto HTML. It has built-in support for many popular LaTeXpackages. If you use a package it doesn’t already know about, it will try to interpret the LaTeXversion correctly.
For example, this box is generated by the \tcolorbox package:
4 Graphics
You can include static images, with alt text:
It’s also possible to use packages like TikZ to generate diagrams in code:
5 Embedding content
5.1 Numbas test
There is a special \numbas command to embed a Numbas exam in the page.
In the HTML format, the Numbas exam is interactive. In PDF format, a link and QR code are shown.
5.2 Embedding videos from YouTube/Vimeo
You can use the \embed command to embed any page that supports the oEmbed protocol, such as a YouTube video.
5.3 Audio and video files
6 Different behaviour in PDF and HTML
You can use the \ifplastex and \ifpdflatex commands to run different code for PDF and HTML formats.
This line only appears in the HTML version.