You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to convert some MediaWiki code taken from Wikipedia into HTML. It appears that some of the code that page uses the <math> tag across multiple lines inside of a * list, which breaks the generated HTML. Putting the same <math>...</math> statement onto the same line as the * fixes the issue.
* Linearity in the first argument:*:<math>\begin{align}\langle a \mathbf u, \mathbf v\rangle &= a \langle\mathbf u, \mathbf v\rangle. \\\langle\mathbf u + \mathbf v, \mathbf w\rangle &= \langle\mathbf u, \mathbf w\rangle+ \langle\mathbf v, \mathbf w\rangle.\end{align}</math>* Correction*:<math>\begin{align} \langle a \mathbf u, \mathbf v\rangle &= a \langle\mathbf u, \mathbf v\rangle. \\ \langle\mathbf u + \mathbf v, \mathbf w\rangle &= \langle\mathbf u, \mathbf w\rangle+ \langle\mathbf v, \mathbf w\rangle. \end{align}</math>* It is not limited to display math:*:<math>a^2 + b^2= c^2</math>* One-line version:*:<math>a^2 + b^2 = c^2</math>
gets rendered as
with the generated HTML being
<ul><li>Linearity in the first argument:
<p>:<math>\begin{align}</p></li></ul><p>\langle a \mathbf u, \mathbf v\rangle &= a \langle \mathbf u,
\mathbf v\rangle. \\ \langle \mathbf u + \mathbf v, \mathbf w\rangle
&= \langle \mathbf u, \mathbf w\rangle+ \langle \mathbf v, \mathbf
w\rangle. \end{align}</math></p><ul><li>Correction
<p><spanclass="math display">\[\begin{align} \langle a \mathbf u,
\mathbf v\rangle &= a \langle \mathbf u, \mathbf v\rangle. \\
\langle \mathbf u + \mathbf v, \mathbf w\rangle &= \langle \mathbf
u, \mathbf w\rangle+ \langle \mathbf v, \mathbf w\rangle.
\end{align}\]</span></p></li></ul><ul><li>It is not limited to display math:
<p>:<math>a^2 + b^2</p></li></ul><p>= c^2</math></p><ul><li>One-line version:
<p><spanclass="math display">\[a^2 + b^2 = c^2\]</span></p></li></ul>
Given the generated HTML, it appears that this breakage is in the conversion from MediaWiki text -> HTML and is not isolated to MathJax (other Math renderers give the same result).
Pandoc version?
What version of pandoc are you using, on what OS? (If it's not the latest release, please try with the latest release before reporting the issue.)
I am using pandoc version 3.1.11 on macOS 14.2.1 installed via homebrew.
Explain the problem.
I was trying to convert some MediaWiki code taken from Wikipedia into HTML. It appears that some of the code that page uses the
<math>
tag across multiple lines inside of a*
list, which breaks the generated HTML. Putting the same<math>...</math>
statement onto the same line as the*
fixes the issue.gets rendered as
with the generated HTML being
Command used
Given the generated HTML, it appears that this breakage is in the conversion from MediaWiki text -> HTML and is not isolated to MathJax (other Math renderers give the same result).
Pandoc version?
What version of pandoc are you using, on what OS? (If it's not the latest release, please try with the latest release before reporting the issue.)
I am using
pandoc
version3.1.11
on macOS 14.2.1 installed via homebrew.Thank you all for your help and contributions to this project!
The text was updated successfully, but these errors were encountered: