-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Error creating PDF from markdown with Lua fenced code block #5227
Comments
So you're saying it works without
|
You have to use the uppercase Lua in the code fence or it doesn't work (getting lua to work correctly was difficult, and this is what i found worked). when going straight from markdown to pdf with the following command:
The error i mentioned above is generated. when going from markdown to tex, and then from tex to pdf the error is not generated, and the pdf is correct (has all the correct syntax highligting for lua and bash):
However, if you go from .tex to pdf, AND if you add the listings flag at this step, you get the error again:
|
We may need to revisit our correspondence to listings
language names in T.P.Highlighting.
|
OK, I think the issue here is that Lua has several variants in listings (5.0, 5.1, 5.2). Workaround: add this to your header-includes:
Not sure what change to pandoc would be best, if any. We could add some default dialects to the default template, but these might not be the dialects the user wants... |
Here are the listings languages that have multiple dialect but no preset default dialect:
So I think we could just add this to the default template under
|
There is an issue when generating latex documents from markdown using the listings package for the Lua Language. If you create a PDF directly from markdown there is an issue, but if break the process into two steps (markdown to tex, then tex to pdf there is no issue).
Example markdown code (example.md):
Pandoc is run as follows:
the output (example.tex) is as follows:
now try creating a PDF from the latex:
and this generates a PDF with correct color syntax highlighting for the bash code, AND the lua code. Everything is good.
now try again but go straight to PDF from MD:
and you get the following error:
The tex output by the command is the exact same as in the first case:
Running Version 2.5:
The text was updated successfully, but these errors were encountered: