jgm/texmath

Error in groff ms math output

Closed this issue · 2 comments

Try this sample markdown in r.md:

$$\begin{align} f(x) &= x^2 \\ &= y-2 \end{align}$$

The command pandoc -t ms -o r.pdf r.md gives the error:

eqn:<standard input>:73: error: syntax error
 context is
        } above { >>> } <<<

Examining the ms file generated by pandoc -s -o r.ms r.md, line 73 is:

rcol{ {f left ( x right )} above {} }

Although I can't find it in the eqn documentation, it seems that there cannot be an empty entry in a matrix. The following code is correct, and properly formats the equation:

rcol{ {f left ( x right )} above {""} }

(And I guess that should be aligned, not align, but that doesn't make any difference)

jgm commented

Transferring to jgm/texmath - the eqn writer there will need to get the fix