ReadtheDoc PDF errors
In the process of patching 0.14.1, I spent some time trying to understand why ReadtheDocs is failing now. It seems by default the pdf compiler allows 100 latex errors before aborting, and we just recently hit that number.
In this case, the 100th error is due to crystal_reference_frame.py, which includes this text:
# Given the chosen alignment of basis vectors with the Cartesian reference frame,
# :math:`\mathbf{A}` is defined as
#
# .. math::
# \begin{equation}
# \mathbf{A} =
# \begin{pmatrix}
# a & 0 & 0\\
# b\cos\gamma & b\sin\gamma & 0\\
# c\cos\beta & -c\frac{(\cos\beta\cos\gamma - \cos\alpha)}{\sin\gamma} & \frac{\mathrm{V}}{ab\sin\gamma}
# \end{pmatrix},
# \end{equation}
#
# where :math:`V` is the volume of the unit cell.
which Sphinx then converts to the following snippet in orix.tex:
Given the chosen alignment of basis vectors with the Cartesian reference frame,
\(\mathbf{A}\) is defined as
\begin{equation*}
\begin{split}\begin{equation}
\mathbf{A} =
\begin{pmatrix}
a & 0 & 0\\
b\cos\gamma & b\sin\gamma & 0\\
c\cos\beta & -c\frac{(\cos\beta\cos\gamma - \cos\alpha)}{\sin\gamma} & \frac{\mathrm{V}}{ab\sin\gamma}
\end{pmatrix},
\end{equation}\end{split}
\end{equation*}
\sphinxAtStartPar
where \(V\) is the volume of the unit cell.
Which throws the following error when built with latexmk
l.10411 \end{equation}\end{split}
! LaTeX Error: \begin{split} on input line 10411 ended by \end{equation}.
See the LaTeX manual or LaTeX Companion for explanation.
Which, annoyingly, still renders fine, but counts towards the error threhold.
The suggested solutions seem to be either defining a new latex engine in conf.py, or rewriting all example files to render more nicely when translated by Sphinx into Latex.
I'm trying a few different engines here, but personally, I think it might be better to just stop building the PDF. ReadTheDocs already generates an offline HTML archive, the PDF is redundant and counts towards our already limited allowed build time.
Thoughts? @CSSFrancis @hakonanes ?