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
\iffalse
Opening this after an answered question on pandoc-dicuss: https://groups.google.com/g/pandoc-discuss/c/nylIR9ZCSRg
Explain the problem.
I think this is a regression as it was supported before but is no more.
In our markdown doc, we have some LaTeX syntax using \iffalse{}\fi
\iffalse{}\fi
\emph{Some text}\iffalse{Some ignored comment}\fi{}
With previous pandoc version, it was correctly seen as raw LaTeX and kept as is.
❯ cd C:\Users\chris\AppData\Local\r-pandoc\r-pandoc\2.13\ ❯ echo "\emph{Some text}\iffalse{Some ignored comment}\fi{}" | ./pandoc -t latex \emph{Some text}\iffalse{Some ignored comment}\fi{} ❯ echo "\emph{Some text}\iffalse{Some ignored comment}\fi{}" | ./pandoc -t native [Para [RawInline (Format "tex") "\\emph{Some text}",RawInline (Format "tex") "\\iffalse{Some ignored comment}",RawInline (Format "tex") "\\fi{}"]]
but with newer pandoc it gets escaped (with nightly from today 1f1a30b) because not seen as Raw TeX I think.
❯ cd C:\Users\chris\AppData\Local\r-pandoc\r-pandoc\nightly\ ❯ echo "\emph{Some text}\iffalse{Some ignored comment}\fi{}" | ./pandoc -t latex \emph{Some text}\textbackslash iffalse\{Some ignored comment\}\fi{} ❯ echo "\emph{Some text}\iffalse{Some ignored comment}\fi{}" | ./pandoc -t native [Para [RawInline (Format "tex") "\\emph{Some text}",Str "\\iffalse{Some",Space,Str "ignored",Space,Str "comment}",RawInline (Format "tex") "\\fi{}"]]
Second part which got escaped is not seen as RawInline anymore.
It seems to behave that way since Pandoc 2.14
❯ cd C:\Users\chris\AppData\Local\r-pandoc\r-pandoc\2.14 ❯ echo "\emph{Some text}\iffalse{Some ignored comment}\fi{}" | ./pandoc -t latex \emph{Some text}\textbackslash iffalse\{Some ignored comment\}\fi{}
Is this an expected change ? I did not find a related one in the Release notes.
Pandoc version?
The text was updated successfully, but these errors were encountered:
It seems there was a change in pandoc 2.14 that indeed changed this behavior. I found a related issue #6096 where expected behavior was ok in Pandoc 2.13 and not after
For the record here the native representation formatted
Pandoc 2.13
[Para [RawInline (Format "tex") "\\emph{Some text}" ,RawInline (Format "tex") "\\iffalse{Some ignored comment}" ,RawInline (Format "tex") "\\fi{}"] ]
Current version (2.17.0.1)
[ Para [ RawInline (Format "tex") "\\emph{Some text}" , Str "\\iffalse{Some" , Space , Str "ignored" , Space , Str "comment}" , RawInline (Format "tex") "\\fi{}" ] ]
So the content is no more identified as RawInline it seems
RawInline
Sorry, something went wrong.
This does seem like a bug, I'd have to look into it. But you can always work around this kind of thing using "raw attribute" syntax:
`\emph{Some text}\iffalse{Some ignored comment}\fi{}`{=latex}
downgrade Pandoc because of jgm/pandoc#7460
5f68bd2
No branches or pull requests
Opening this after an answered question on pandoc-dicuss: https://groups.google.com/g/pandoc-discuss/c/nylIR9ZCSRg
Explain the problem.
I think this is a regression as it was supported before but is no more.
In our markdown doc, we have some LaTeX syntax using
\iffalse{}\fiWith previous pandoc version, it was correctly seen as raw LaTeX and kept as is.
but with newer pandoc it gets escaped (with nightly from today 1f1a30b) because not seen as Raw TeX I think.
Second part which got escaped is not seen as RawInline anymore.
It seems to behave that way since Pandoc 2.14
Is this an expected change ? I did not find a related one in the Release notes.
Pandoc version?
The text was updated successfully, but these errors were encountered: