10
$\begingroup$

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*}?

$\endgroup$

2 Answers 2

10
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – joseville
    Commented Dec 15, 2021 at 15:53
1
$\begingroup$

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

In stackedit.io

$$\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} $$

$\endgroup$
1
  • $\begingroup$ Thanks for "tagging in" on this Question. Many users will find the information about StackEdit's evolving environments helpful. $\endgroup$
    – hardmath
    Commented Jun 29 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .