Steztric
Steztric

Reputation: 2942

Sphinx hangs when attempting to use amxmath capabilities

I want to define a matrix in a math block in a ReST file like this;

.. math::

    \[\begin{bmatrix}a_1 & b_1\\ a_2 & b_2\end{bmatrix}\]

In my conf.py I defined a preamble in order to include the LaTeX package amsmath

latex_elements = {
# Additional stuff for the LaTeX preamble.
'preamble': r'''
\usepackage{amsmath}
'''
}

However when I try and compile my document using Sphinx, it gets to the document and hangs there permanently

writing output... [ 97%] theory_and_methodology

What am I missing?

Upvotes: 1

Views: 136

Answers (1)

Steztric
Steztric

Reputation: 2942

I found the answer. The LaTeX compiler didn't like the \[ in the source. It was unnecessary, so when I removed it the output worked.

Upvotes: 1

Related Questions