jgm/texmath

Support \dotsc \dotsb \dotsm \dotsi \dotso from amsmath

stoianmihail opened this issue · 2 comments

Hi!

When converting from Latex to Word, I get the following warning on this input $\{1, 2, \dotsc, i - 1\}$:

pandoc -s main.tex --bibliography=sample.bib -o work_document.docx
[WARNING] Could not convert TeX math '\{1, 2, \dotsc, i - 1\}', rendering as TeX:
\{1, 2, \dotsc, i - 1\}
^ # pointing to comma
unexpected control sequence \dotsc
expecting "%", "\\label", "\\nonumber" or whitespace

Pandoc:
pandoc 2.12 Compiled with pandoc-types 1.22, texmath 0.12.1.1, skylighting 0.10.4, citeproc 0.3.0.8, ipynb 0.1.0.1

OS:
Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal

In the output word, that part is rendered as is.
Let me know whether I can help with a quick fix.

Thanks!
Mihail

jgm commented

This just means that pandoc (really, the texmath library) doesn't know how to interpret the LaTeX command \dotsc. Looks like \dotsc (and several variants) are amsmath commands, so we ought to support them. I'll move this issue to texmath, which is where the support would need to be added.

As a workaround, you can include something like this at the beginning of your markdown file:

\newcommand{\dotsc}{\dots}