Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandoc latex alltt % (percent) characters are mistakenly interpreted as comments #892

Closed
drf5n opened this issue Jun 26, 2013 · 0 comments
Closed

Comments

@drf5n
Copy link

drf5n commented Jun 26, 2013

This code works for latex processors, but not for pandoc 1.11.1 :

\documentclass{article}
\usepackage{alltt}
\begin{document}
\begin{alltt}
main <- {sprintf("x = %5.3f",3.1415926)}
\end{alltt}
\end{document}

The % makes the closing '}' not be found, and causes failure.

$ pandoc test.tex -t markdown
pandoc:
Error:
"source" (line 5, column 27):
unexpected "{"
expecting letter or new-line

The unexpected "{" is from where "\end{" replaces the text from % onwards.

If you remove the curly braces from the source line, the source compiles, but the line is truncated at the '%':

pandoc junk.tex

main <- sprintf("x =

@jgm jgm closed this as completed in 82e46bf Jun 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant