# Problem exporting an answer to pdf

MSE offers a huge variety of possibilities when it comes to writing an answer/question which might not be found elsewhere (at least all together).

I've recently read on this post, that answers can be exported to pdf with StackEdit - which is a great opportunity.

However, when I copy&paste an answer I want to download, StackEdit doesn't recognize \begin{align*} and claims

KaTeX parse error: No such environment: align* at position [...]

What can I do? Are there any alternatives for StackEdit or for begin{align*}?

Some time back StackEdit veered away from MathJax support for $$\LaTeX$$ and instead took up the KaTeX package. Presently they support fewer "environments" than are provided here under MathJax.

A workaround for the particular deficiency you found is to use \begin{aligned} and \end{aligned} rather than the (unsupported by StackEdit) align* environment.

• I just checked and both of the following worked: \begin{align} ... \end{align} and \begin{aligned} ... \end{aligned} It doesn't need to be all in one line, by the way. Dec 15 '21 at 15:53

To elaborate on @hardmath's answer (I would edit it, but Suggested edits are not allowed on non-tag-wiki posts on meta sites.):

### \begin{align} ... \end{align} displays with numbered annotations

\begin{align} (a + b)(a + b) &= a^2 + ab + ab + b^2 \\ &= a^2 + 2ab + b^2 \end{align}


displays with numbered annotations like this:

\begin{align} (a + b)(a + b) &= a^2 + ab + ab + b^2 &&(1)\\ &= a^2 + 2ab + b^2 &&(2) \end{align}

### \begin{aligned} ... \end{aligned} displays without annotations

\begin{aligned} (a + b)(a + b) &= a^2 + ab + ab + b^2 \\ &= a^2 + 2ab + b^2 \end{aligned}


displays without annotations like this:

\begin{aligned} (a + b)(a + b) &= a^2 + ab + ab + b^2 \\ &= a^2 + 2ab + b^2 \end{aligned}