Daniel Barrett

2007-10-26 21:04:54 UTC

I'm having a problem with a software package that generates small

LaTeX files like this, for displaying a single math formula:

\documentclass{article}

\usepackage{amsmath}

\usepackage{amsfonts}

\usepackage{amssymb}

\pagestyle{empty}

\begin{document}

$\displaystyle

INSERT MATH FORMULA HERE

$

\end{document}

Unfortunately, whenever the math formula contains a \begin{align}

... \end{align} environment, LaTeX produces this error:

Package amsmath Error: \begin{align} allowed only in paragraph mode.

Is there a better set of LaTeX commands to generate instead of the

above, so this error does not occur? (Removing the three usepackage

lines eliminates the error, but we do want to use amsmath.)

FYI, this is part of a mathematics renderer for MediaWiki: it produces

a single math formula, converts it to PNG format, and embeds it in the

wiki page.

Thank you,

--

Dan Barrett

***@blazemonger.com

LaTeX files like this, for displaying a single math formula:

\documentclass{article}

\usepackage{amsmath}

\usepackage{amsfonts}

\usepackage{amssymb}

\pagestyle{empty}

\begin{document}

$\displaystyle

INSERT MATH FORMULA HERE

$

\end{document}

Unfortunately, whenever the math formula contains a \begin{align}

... \end{align} environment, LaTeX produces this error:

Package amsmath Error: \begin{align} allowed only in paragraph mode.

Is there a better set of LaTeX commands to generate instead of the

above, so this error does not occur? (Removing the three usepackage

lines eliminates the error, but we do want to use amsmath.)

FYI, this is part of a mathematics renderer for MediaWiki: it produces

a single math formula, converts it to PNG format, and embeds it in the

wiki page.

Thank you,

--

Dan Barrett

***@blazemonger.com