-
-
Notifications
You must be signed in to change notification settings - Fork 979
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
header-includes in beamer_presentation()
is not working as with pdf_document()
#2294
Comments
I think this is an issue with Pandoc. I need to check with earlier version than However, there should be not issue if you insert in the header by using raw attributes to tell pandoc to not Parse you content
An example is show in the Pandoc doc: https://pandoc.org/MANUAL.html#extension-yaml_metadata_block It is best to write raw latex with this syntax when you can I'll look for the potential issue in pandoc though 🤔 |
@cderv Thanks for the tip with the raw code! (it also failed with pandoc 2.14, but the checklist in the issue templated required updating to the current version, so I moved to 2.17) |
It seems Pandoc will parse this
as
since as long as I can try (pandoc 2.0.3). I don't think this i really an issue, as one should definitely use raw attribute to prevent any transformation However, maybe an issue should be open in Pandoc ? The reprex would be
we see that the part in bracket is not parsed as a rawInline. Hence the result. Using raw attribute makes sure it is
If that is ok with you I'll close the issue here, and one could be opened on Pandoc's side if this is really an issue. |
@cderv Sure, you can close this issue. Thanks for your time in investigating this! |
I asked this question over at pandoc and the different behaviour seems to be specific to rmarkdown as with pandoc, the macro will always be parsed incorrectly
|
Good catch. I did not pay attention to that in your question. I have answered there: jgm/pandoc#7867 (comment) In fact we are doing a different processing Lines 165 to 168 in b53a7ce
This was to fix an issue and I think we did not do the same for Beamer. I think we should. See my comment on the other repo for why this causes the difference you see. Thanks for getting to the bottom of this ! |
@cderv Thanks for your response! Would be really awesome if you could do the same for beamer. |
beamer_presentation
beamer_presentation()
is not working as with pdf_document()
This should work the same on both format now. Thanks ! |
@cderv Thanks a lot!!! |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
If
beamer_presentation
is specified as output, macros with an optional argument at the end get incorrectly parsed to tex. Take for example the following example with\setbeamertemplate{footline}[frame number]
in the header-includes:The resulting .tex file will have
instead of
If I change the output to something else, the macro will be parsed correctly:
I tested this with the following environment:
Checklist
When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:
formatted your issue so it is easier for us to read?
included a minimal, self-contained, and reproducible example?
pasted the output from
xfun::session_info('rmarkdown')
in your issue?upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?
installed and tested your bug with the development version of the rmarkdown package using
remotes::install_github("rstudio/rmarkdown")
?The text was updated successfully, but these errors were encountered: