Pandoc parser produces errors in math expressions rendering
I'm building a wiki where I want to use the citations feature as well as long math expressions. I have found some issues with the rendering of the math expressions after installing pandoc and the pandoc-ruby gem (needed for the citations feature). It seems as if some characters inside the math expressions are being skipped or pre-processed, which produces syntax errors in the math expressions and thus they are not rendered (they show as plain text).
I have found some workarounds but it makes the math expressions not work with direct katex, tex, latex or other markdown previewers. These are the workarounds I have to use to see the math expressions correctly in the gollum wiki after using the pandoc parser:
- First subscript then superscript:
- [NO]
R^{LV}_{ECEF} - [YES]
R_{ECEF}^LV
- [NO]
- Leave a space after superscripts:
- [NO]
h^2/h_r^2 - [YES]
h^2 / h_r^2 - [NO]
(u^\psi,u^\gamma)=(\ddot\psi,\dot\gamma) - [YES]
( u^\psi , u^\gamma ) = ( \ddot\psi , \dot\gamma )
- [NO]
- In arrays, double
\\for next row- [NO]
\begin{array}{l} x \\ y \end{array} - [YES]
\begin{array}{l} x \\\\ y \end{array}
- [NO]
- For
{and}, double\- [NO]
a = \left\{ \dfrac{1}{2} \right\} - [YES]
a = \left\\{ \dfrac{1}{2} \right\\}
- [NO]
- To use subscripts after
}, try\_instead of_- [NO]
\vec{V}_{BOD} - [YES]
\vec{V}\_{BOD}
- [NO]
- For spacing characters use double
\- [NO]
a,\,b - [YES]
a,\\,b - [YES]
a,\quad b
- [NO]
This could be an issue comming from pandoc, but anyway I would like to find a solution without needing to patch the math expressions so that they can be directly transferred from and to katex/tex/latex/etc, but still be able to view them in the wiki.
For the versions, I'm using gollum 6.1.0, ruby 3.2.9, rugged 1.9.0, gollum-rugged_adapter 3.0, gollum-lib 6.0, pandoc 3.7.0.2 and pandoc-ruby 2.1.10.
Source: gollum/gollum