jgm / typst-hs

Haskell library for parsing and evaluating typst
Other
44 stars 5 forks source link

Typst to LaTeX: `dots` maps to `\cdots` when it should map to `\ldots` #15

Closed MilesCranmer closed 1 year ago

MilesCranmer commented 1 year ago

Explain the problem.

File sketch.typ

$dots$

mapped to latex with:

> pandoc --to=latex sketch.typ -o sketch.tex

this results in

\(\cdots\)

when it should be \ldots.

Pandoc version?

3.1.8

jgm commented 1 year ago

This is rather complex. Note that dots is not listed in the typst symbol list. Typst docs say:

When displaying a symbol, Typst selects the first from the variants that have all attached modifiers and the minimum number of other modifiers

We try to do that (in typst-hs -- that's where the code that handles this lives, so I'll switch this issue there.) But which of the variants listed in the documentation is the "first"? That's not said, and I think typst-hs is making a different assumption from typst itself.

jgm commented 1 year ago

OK, I think I've found the issue.