-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
\include within LaTeX environment scrambles conversion #4725
Comments
Can you try again with the latest pandoc release?
btw. this sounds like a usecase for a pandoc filter http://pandoc.org/filters.html |
This didn't change anything. I have found a workaround by inserting
I know, and there even is a filter for LilyPond that makes use of |
feel free to update it and make a pull request :-) (btw, doesn't it call out to whatever version of lilypond is on your python path?) Until this particular parsing latex in markdown bug is fixed, you can also use generic raw attributes to embed complex LaTeX in Markdown, like |
But that uses a totally outdated version of the package
Well, I've donated around 80 hours of unpaid work to lyluatex and I can't afford to continue on that track before having spent some more paid hours on other projects ;-)
That depends on the configuration, but I was talking about the
Oh, thank you, I wasn't aware of that, and it seems to work for my case. It's still a workaround, but a much cleaner one that having to insert arbitrary dummy code into the environment. So for my current use case this can be considered solved, but I would still consider it a parsing bug. |
I'm assuming that the lilypond environment redefines |
No, but your comment probably gets me to the right point: lyluatex doesn't do any parsing of the environment's content, but it goes to some length protecting it so it can be piped as a pure string into a LilyPond document. LilyPond itself also has Does Pandoc parse the content of a \LaTeX environment if it encounters one? I thought that it would (should) simply pass that content along to LaTeX. But given the pointer to the "generic raw attributes" I have the impression that Pandoc continues parsing the environment content. If that is the case then I withdraw the claim this is a parsing bug. Instead it would be a caveat to document for lyluatex users who want to include scores when using Pandoc. |
Yes, by default, pandoc parses the contents of unknown environments. This is overridden for certain environments known to be "verbatim." We could add lilypond to that list, of course. |
I'm not sure. There may be various names that might be involved. Maybe it's better to pull that back into lyluatex's documentation. Do you have an opinion @jperon ? |
I think that |
According to jgm#4725 (comment) not only the `lilypond` environment but also `ly` should be included in the verbatim list. @jperon jperon/lyluatex#203
According to #4725 (comment) not only the `lilypond` environment but also `ly` should be included in the verbatim list. @jperon jperon/lyluatex#203
Pandoc 2.0.6, installed from the
.deb
packageI am using Pandoc for a Markdown->LaTeX->PDF chain and use custom LaTeX in the Markdown file. I have a case where the content of a LaTeX environment scrambles the generated LaTeX code:
(making use of functionality from the lyluatex package, the environment content is passed to LilyPond, an external program).
This will be rendered to the following
.tex
:where nearly everything is escaped, which is of course wrong and makes the .tex code fail.
It can be made to work by one out of:
\include
line\include
However, it doesn't work with a simple
\noop
(regardless of the fact that this is a fake command anyway)Shouldn't Pandoc, when it encounters a
\begin{something}
pipe its content through regardless of what it contains?The text was updated successfully, but these errors were encountered: