asciidoctor

Simple asciidoctor files are compiled as follows:

asciidoctor sourcefile.adoc

If the filecontains graphics, such as ditaa, use:

asciidoctor -r asciidoctor-diagram sourcefile.adoc

Files containing LaTeX code like:

[stem]
++++
a^{p-1} \equiv 1\ \text{mod}\ p
++++

which will convert the code into

\[a^{p-1} \equiv 1\ \text{mod}\ p\]

Tables: cell span

Using asciidoctor-latex

Install asciidoctor-latex using:

sudo gem install asciidoctor-latex --pre

Compile into html:

asciidoctor-latex -b html foo.adoc

More details can be found at asciidoctor-latex documentation.

The default version of asciidoctor-LaTeX may lack some of the functionalities or features. For instance, using the ampersand (&) character in order to align the equations vertically does not work in asciidoctor. Instead of using the ampersand you can use the split environment as follows:

\begin{equation} \label{equation1}
\begin{split}
Area & = \frac{length \times breadth }{2} \\
     & = \frac{1}{2} length \times breadth
\end{split}
\end{equation}

Source: Resurchify