\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
dbar...@blazemonger.com
What is wrong with:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\pagestyle{empty}
\begin{document}
\begin{align}
INSERT MATH FORMULA HERE
\end{align}
\end{document}
Joseph Wright
Do not put \begin{align} \end{align} inside of $ $ .
Also, the align environment is automatically in displaystyle .
--
G. A. Edgar http://www.math.ohio-state.edu/~edgar/
> 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.
>
"G. A. Edgar" <ed...@math.ohio-state.edu.invalid> wrote in message
news:261020071735102752%ed...@math.ohio-state.edu.invalid...
> Do not put \begin{align} \end{align} inside of $ $ .
> Also, the align environment is automatically in displaystyle .
The problem is that you are using a renderer which automatically puts the
code between $...$ and maybe adds \displaystyle as well. You could either
parse the code so as not to use $...$ whenever you use align or similar
environments or, more simply, just add \par just before \begin{align} (this
could be automated). This works by forcing LaTeX itself to deal with the
error and add its own $ cancelling out the ones that shouldn't be there if
you see what I mean.
Steve Mayer