Raw TeX extension swallows spaces #2687
baskerville
commented
baskerville
commented
Thanks, but none of the suggested fixes work: \TeX\
has the same output as \TeX
, and \TeX{}
yields {"t":"RawInline","c":["tex","\\TeX"]},{"t":"Str","c":"{}"},{"t":"Space","c":[]}
.
\TeX{} yields
{"t":"RawInline","c":["tex","\\TeX"]},{"t":"Str","c":"{}"},{"t":"Space"
,"c":[]}.
I guess this is because the LaTeX reader treats \TeX
specially. Normally raw LaTeX commands would absorb
following arguments. This could probably be changed in
the LaTeX reader.
Thanks, but none of the suggested fixes work: \TeX\ has the same output
as \TeX, and
There needs to be a following space (and not at end of
line):
% pandoc -f markdown -t json
\TeX\ and
[[1,16,1],{"unMeta":{}},[{"t":"Para","c":[{"t":"RawInline","c":["tex","\\TeX"]},{"t":"Str","c":"Â and"}]}]]
baskerville
commented
Thanks, \TeX\
is almost a solution, except that \
generates a non-breaking space, not a regular space.
I think the cleanest solution is to change the inlineCommand
function exported by the LaTeX reader, so that
`{}` trailing a command like `\TeX` gets consumed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If
test.md
contains:then
pandoc -t json test.md
yields:You'll notice that the space after
\TeX
is not being rendered as{"t":"Space","c":[]}
.