Open pepijndevos opened 8 months ago
You cannot put an align
environment inside $$..$$
for display math.
Unfortunately, MathJax has muddied the issue by allowing this and treating it specially. My guess is that MediaWiki just passes the contents of a code element into MathJax.
For a related issue see #6703.
The best I could suggest would be using a Lua filter to change {align}
to {aligned}
in Math inlines. This would lose the numbering, because aligned
environment does not number -- it is intended to be used inside display math.
In principle pandoc could just do this automatically, and that's the only modification of the MediaWiki reader that makes sense to me in response to this problem. But it would mean that results were slightly worse when converting mediawiki -> HTML (where MathJax could be used).
Another alternative would be to modify the LaTeX writer to make this transformation, or even better to excerpt align
environments from Math inlines and replace them with raw LaTeX.
Explain the problem.
The wikipedia page for Maxwell's equations contains a table with equations, which when converted to LaTeX throws a bunch of errors:
Maxwell's_equations.txt
There are other issues with the output but this is the most breaking one.
Pandoc version?
Arch Linux: