You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that uses pandoc for markdown to PDF conversion. I stumbled upon what I believe is an issue with delimiter selection for \lstinline.
If you start with a markdown file like:
`Hello World``Hello World!``"Hello World!"`
And convert it to a PDF with pandoc test.md --listings -o test.pdf
You end up getting a reserved keyword error:
! Illegal parameter number in definition of \reserved@a.
<to be read again>
}
l.54 \lstinline#
pandoc: Error producing PDF from TeX source
If you convert it to .tex and check out the source:
Pandoc does some searching of the inline code to find a delimiter that isn't used in the code. It seems like the order of selection is ! -> " -> # -> etc. The problem is that # is a latex keyword and cannot be used as a delimiter. I'm not sure where in Pandoc the delimiter selection is done, but the fix seems like it would just be to remove latex keywords from the pool of possible delimiters.
Pandoc Version Info (on Win 8.1 64x):
pandoc 1.13.0.1
Compiled with texmath 0.8, highlighting-kate 0.5.8.5.
Syntax highlighting is supported for the following languages:
actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
fortran, fsharp, gcc, gnuassembler, go, haskell, haxe, html, ini, isocpp,
java, javadoc, javascript, json, jsp, julia, latex, lex, literatecurry,
literatehaskell, lua, makefile, mandoc, markdown, matlab, maxima, metafont,
mips, modelines, modula2, modula3, monobasic, nasm, noweb, objectivec,
objectivecpp, ocaml, octave, pascal, perl, php, pike, postscript, prolog,
pure, python, r, relaxngcompact, restructuredtext, rhtml, roff, ruby, rust,
scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo,
verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml
Default user data directory: C:\Users\Michael\AppData\Roaming\pandoc
Copyright (C) 2006-2014 John MacFarlane
Web: http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
The text was updated successfully, but these errors were encountered:
I'm working on a project that uses pandoc for markdown to PDF conversion. I stumbled upon what I believe is an issue with delimiter selection for
\lstinline
.If you start with a markdown file like:
And convert it to a PDF with
pandoc test.md --listings -o test.pdf
You end up getting a reserved keyword error:
If you convert it to .tex and check out the source:
Pandoc does some searching of the inline code to find a delimiter that isn't used in the code. It seems like the order of selection is
!
->"
->#
-> etc. The problem is that#
is a latex keyword and cannot be used as a delimiter. I'm not sure where in Pandoc the delimiter selection is done, but the fix seems like it would just be to remove latex keywords from the pool of possible delimiters.Pandoc Version Info (on Win 8.1 64x):
The text was updated successfully, but these errors were encountered: