I am trying to get Doxygen to create a latex file containing a matrix defined using MathJax notation. The corresponding matrix definition is as follows:
\f$\begin{bmatrix}n2 / (r - l) & 0 & 0 & 0 \\0 & n2 / (t - b) & 0 & 0 \\r + l / (r - l) & (t + b) & - (f + n) / (f - n) & -1 \\0 & 0 & -(2 * f * n) / (f-n) & 0\end{bmatrix}\f$
I have included these lines in my doxyconfig:
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
and for a good measure:
EXTRA_PACKAGES = TeX/AMSmath
Latex does not compile when it reaches the matrix giving the error:
LaTeX Error: bmatrix undefined environment.
Adding a line
\usepackage{amsmath}
for the created doxygen file, refman.tex solves the problem, but it is not a solution, since this file is overwritten every time doxygen is executed.
I would suggest that the lines I added to my .doxyconfig solve this problem, but they do not.