jgm / texmath

A Haskell library for converting LaTeX math to MathML.
GNU General Public License v2.0
322 stars 67 forks source link

bug with typst math and comma for decimal separator #242

Closed pi3141 closed 1 day ago

pi3141 commented 2 days ago

When using comma as decimal separator (as it used to be in french), Pandoc produce an error when typst is used as pdf engine.

For example test.md :

# Some math

$\frac{1,6}{2,8}$

when running command : pandoc test.md --pdf-engine=typst -o test.pdf

produce :

    ┌─ toPdfViaTempFile61817-0.html:128:13
    │
128 │ $frac(1 , 6, 2 , 8)$
    │              ^

Error producing PDF.

Pandoc version? Running pandoc 3.5 on debian bookworm

jgm commented 2 days ago

Looks like we need to escape these commas in producing typst output:

$frac(1 \, 6, 2 \, 8)$

works.