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
This does not happen with pandoc 2.2.1. It also does not happen if the included file is empty (cp /dev/null foo.tex) or does not exist. It happens even if the included files contains something that pandoc surely knows how to parse (echo '\emph{bar}' > foo.tex).
The text was updated successfully, but these errors were encountered:
fiapps
changed the title
\include in Markdown causes rest of file to be treated as raw LaTeX
\input in Markdown causes rest of file to be treated as raw LaTeX
Jul 19, 2018
withRaw runs the parser, which in the case of \input modifies the token stream. It then tries to identify the next token nxt by looking ahead. This will be the first token in the included file. Then, it tries to identify the original tokens parsed by doing takeWhile (/= nxt) inp, where inp is the original token stream, before modification with the tokens from the input file. Since nxt is not included in this token stream, the whole thing is read.
That's the problem, anyway. The solution is less obvious. It's hard to give a good definition of withRaw that makes sense in a context where commands can change the token stream.
With pandoc 2.2.2,
\input
in a Markdown file causes everything after the\input
to be parsed as raw LaTeX.Output:
This does not happen with pandoc 2.2.1. It also does not happen if the included file is empty (
cp /dev/null foo.tex
) or does not exist. It happens even if the included files contains something that pandoc surely knows how to parse (echo '\emph{bar}' > foo.tex
).The text was updated successfully, but these errors were encountered: