\documentclass{article}
\setcounter{secnumdepth}{2}
\title{\LaTeX.js Showcase}
\author{made with \varheartsuit\ by Michael Brade}
\date{2017--2018}
\begin{document}
\maketitle
This document will show most of the supported features of \LaTeX.js.
\subsection{Quote, Quotation, and Verse}
The \texttt{quote} environment is useful for quotes, important phrases and examples.
A typographical rule of thumb for the line length is:
\begin{quote}
On average, no line should be longer than 66 characters.
\end{quote}
There are two similar environments: the \texttt{quotation} and the \texttt{verse} environments.
The \texttt{quotation} environment is useful for longer quotes going over several paragraphs,
because it indents the first line of each paragraph.
The \texttt{verse} environment is useful for poems where the line breaks are important.
The lines are separated by issuing a \texttt{\textbackslash\textbackslash} at the end of a line
and an empty line after each verse.
\begin{verse}
Humpty Dumpty sat on a wall:\\
Humpty Dumpty had a great fall.\\
All the King’s horses and all the King’s men\\
Couldn’t put Humpty together again.
{\raggedleft ---J.W. Elliott\par}
\end{verse}
\subsection{Picture}
\frame{\setlength{\unitlength}{20.4mm}
\begin{picture}(3,2.1)(-1.2,-0.05)
\put(0,1){\vector(1,0){1}}
\put(0,1){\circle{2}}
\thicklines
\put(0,0){\line(1,0){1}}
\put(0,0.01){xxxxxxxxxxx}
\put(0,0.1){XXXX}
\end{picture}}
%
\frame{\setlength{\unitlength}{1mm}
\begin{picture}(60, 50)
\put(20,30){\circle{1}}
\put(20,30){\circle{2}}
\put(20,30){\circle{4}}
\put(20,30){\circle{8}}
\put(20,30){\circle{16}}
\put(20,30){\circle{32}}
\put(40,30){\circle{1}}
\put(40,30){\circle{2}}
\put(40,30){\circle{3}}
\put(40,30){\circle{4}}
\put(40,30){\circle{5}}
\put(40,30){\circle{6}}
\put(40,30){\circle{7}}
\put(40,30){\circle{8}}
\put(40,30){\circle{9}}
\put(40,30){\circle{10}}
\put(40,30){\circle{11}}
\put(40,30){\circle{12}}
\put(40,30){\circle{13}}
\put(40,30){\circle{14}}
\put(15,10){\circle*{1}}
\put(20,10){\circle*{2}}
\put(25,10){\circle*{3}}
\put(30,10){\circle*{4}}
\put(35,10){\circle*{5}}
\end{picture}}
\frame{\setlength{\unitlength}{0.75mm}
\begin{picture}(60,40)
\put(30,20){\vector(1,0){30}}
\put(30,20){\vector(4,1){20}}
\put(30,20){\vector(3,1){25}}
\put(30,20){\vector(2,1){30}}
\put(30,20){\vector(1,2){10}}
\thicklines
\put(30,20){\vector(-4,1){30}}
\put(30,20){\vector(-1,4){5}}
\thinlines
\put(30,20){\vector(-1,-1){5}}
\put(30,20){\vector(-1,-4){5}}
\end{picture}}
%
\setlength{\unitlength}{5cm}
\begin{picture}(1,1)
\put(0,0){\line(0,1){1}}
\put(0,0){\line(1,0){1}}
\put(0,0){\line(1,1){1}}
\put(0,0){\line(1,2){.5}}
\put(0,0){\line(1,3){.3333}}
\put(0,0){\line(1,4){.25}}
\put(0,0){\line(1,5){.2}}
\put(0,0){\line(1,6){.1667}}
\put(0,0){\line(2,1){1}}
\put(0,0){\line(2,3){.6667}}
\put(0,0){\line(2,5){.4}}
\put(0,0){\line(3,1){1}}
\put(0,0){\line(3,2){1}}
\put(0,0){\line(3,4){.75}}
\put(0,0){\line(3,5){.6}}
\put(0,0){\line(4,1){1}}
\put(0,0){\line(4,3){1}}
\put(0,0){\line(4,5){.8}}
\put(0,0){\line(5,1){1}}
\put(0,0){\line(5,2){1}}
\put(0,0){\line(5,3){1}}
\put(0,0){\line(5,4){1}}
\put(0,0){\line(5,6){.8333}}
\put(0,0){\line(6,1){1}}
\put(0,0){\line(6,5){1}}
\end{picture}
\frame{
\setlength{\unitlength}{1cm}
\begin{picture}(6,5)
\thicklines
\put(1,0.5){\line(2,1){3}}
\put(4,2){\line(-2,1){2}}
\put(2,3){\line(-2,-5){1}}
\put(0.7,0.3){$A$}
\put(4.05,1.9){$B$}
\put(1.7,2.9){$C$}
\put(3.1,2.5){$a$}
\put(1.3,1.7){$b$}
\put(2.5,1){$c$}
\put(0.3,4){$F=\sqrt{s(s-a)(s-b)(s-c)}$}
\put(3.5,0.4){$\displaystyle s:=\frac{a+b+c}{2}$}
\end{picture}
}
\setlength{\unitlength}{2mm}
\begin{picture}(30,20)
\linethickness{0.075mm}
\multiput(0,0)(1,0){26}{\line(0,1){20}}
\multiput(0,0)(0,1){21}{\line(1,0){25}}
\linethickness{0.15mm}
\multiput(0,0)(5,0){6}{\line(0,1){20}}
\multiput(0,0)(0,5){5}{\line(1,0){25}}
\linethickness{0.3mm}
\multiput(5,0)(10,0){2}{\line(0,1){20}}
\multiput(0,5)(0,10){2}{\line(1,0){25}}
\end{picture}
\section{Labels and References}
Labels can be attached to parts, chapters, sections, items of enumerations, footnotes, tables and figures.
For instance: item~\ref{remember} was important, and regarding fonts, read Section~\ref{sec:advice}. And
below, we can reference item~\ref{key-1} and \ref{key-2}.
\begin{enumerate}
\item list text, level one
\begin{enumerate}
\item list text, level two
\begin{enumerate}
\item list text, level three
And a new paragraph can be started, too.
\begin{enumerate}
\item list text, level four
And a new paragraph can be started, too.
This is the maximum level.
\item list text, level four \label{key-1}
\end{enumerate}
\item list text, level three
\end{enumerate}
\item\label{key-2} list text, level two
\end{enumerate}
\item list text, level one
\item list text, level one
\end{enumerate}
\section{Mathematical Formulae}
Math is typeset using KaTeX. Inline math:
$
f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \, d\xi
$
as well as display math is supported:
$$
f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \\ 3n+1, & \text{if } n\text{ is odd} \end{cases}
$$
\end{document}