Bug#959851: pandoc: $ in nroff table causes spurious TeX-related failure
Package: pandoc
Version: 2.2.1-3+b2
Severity: normal
How to reproduce:
1. Start with this nroff input file:
.TH "BBC BASIC" 5 2020-05-06 \" -*- nroff -*-
.SH "SOME EXAMPLE TABLE"
.TS
tab(|) allbox;
lb lb
l l.
Byte|Keyword
0xBC|"VPOS"
0xBD|"CHR$"
0xBE|"GET$"
.TE
2. Run Pandoc on it like this:
pandoc -s -o bbcbasic.html /tmp/minimal_nroff.man
3. Observe that this failed with an error message.
The error message seems to relate to the use of $. Whiel $ is special
to TeX, it is not special to nroff, so this failure should not occur.
If the Pandoc conversion process requires nroff -> HTML to go via *TeX,
then such characters should be quoted.
Here is the error message under consideration:
$ pandoc -s -o bbcbasic.html /tmp/minimal_nroff.man
[WARNING] Could not convert TeX math '" 0xBE|"GET', rendering as TeX:
" 0xBE|"GET
^
unexpected '"'
expecting "%", "\\label", "\\nonumber", whitespace, "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", "{", letter, digit, ".", "\\mbox", "\\text", "\\textbf", "\\textit", "\\textrm", "\\textsf", "\\texttt", "\\bm", "\\boldsymbol", "\\mathbb", "\\mathbf", "\\mathbfcal", "\\mathbffrak", "\\mathbfit", "\\mathbfscr", "\\mathbfsfit", "\\mathbfsfup", "\\mathbfup", "\\mathbold", "\\mathcal", "\\mathfrak", "\\mathit", "\\mathrm", "\\mathscr", "\\mathsf", "\\mathsfit", "\\mathsfup", "\\mathtt", "\\mathup", "\\pmb", "\\symbf", "\\texttt", "\\sqrt", "\\surd", "\\mspace", "\\mathop", "\\mathrel", "\\mathbin", "\\mathord", "\\mathopen", "\\mathclose", "\\mathpunct", "\\phantom", "\\boxed", "\\overset", "\\stackrel", "\\underset", "\\frac", "\\tfrac", "\\dfrac", "\\binom", "\\genfrac", "\\substack", "_", "^", "\\begin", "\\ensuremath", "(", ")", "[", "]", "\\{", "\\}", "\\lbrack", "\\lbrace", "\\rbrack", "\\rbrace", "\\llbracket", "\\rrbracket", "\\langle", "\\rangle", "\\lfloor", "\\rfloor", "\\lceil", "\\rceil", "|", "\\|", "\\lvert", "\\rvert", "\\vert", "\\lVert", "\\rVert", "\\Vert", "\\ulcorner", "\\urcorner", "\\bigg", "\\Bigg", "\\big", "\\Big", "\\biggr", "\\Biggr", "\\bigr", "\\Bigr", "\\biggl", "\\Biggl", "\\bigl", "\\left", "\\not", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "\\", "\\operatorname" or end of input
[WARNING] This document format requires a nonempty <title> element.
Please specify either 'title' or 'pagetitle' in the metadata.
Falling back to 'minimal_nroff'
-- System Information:
Debian Release: 10.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-8-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_USER
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages pandoc depends on:
ii libatomic1 8.3.0-6
ii libc6 2.28-10
ii libffi6 3.2.1-9
ii libgmp10 2:6.1.2+dfsg-4
ii liblua5.1-0 5.1.5-8.1+b2
ii libpcre3 2:8.39-12
ii libyaml-0-2 0.2.1-1
ii pandoc-data 2.2.1-3
ii zlib1g 1:1.2.11.dfsg-1
pandoc recommends no packages.
Versions of packages pandoc suggests:
pn context <none>
ii ghc 8.4.4+dfsg1-3
ii groff 1.22.4-3
ii libjs-mathjax 2.7.4+dfsg-1
pn librsvg2-bin <none>
pn node-katex <none>
ii nodejs 10.19.0~dfsg1-1
pn pandoc-citeproc <none>
ii perl 5.28.1-6
pn php <none>
ii python 2.7.16-1
ii r-base-core 3.5.2-1
ii ruby 1:2.5.1
ii texlive-latex-extra 2018.20190227-2
ii texlive-latex-recommended 2018.20190227-2
pn texlive-luatex <none>
ii texlive-xetex 2018.20190227-2
pn wkhtmltopdf <none>
-- no debconf information
Reply to: