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

over-escaping in rmarkdown header-includes: YAML field #2956

Closed
conjugateprior opened this issue May 30, 2016 · 2 comments
Closed

over-escaping in rmarkdown header-includes: YAML field #2956

conjugateprior opened this issue May 30, 2016 · 2 comments

Comments

@conjugateprior
Copy link

When building a beamer_presentation it seems that putting

header-includes:
 - \setmathfont(Digits){Avenir} 

in the header field generates inappropriately escaped latex source like

\setmathfont(Digits)\{Avenir\}

which then doesn't compile.

It seems to be the parentheses that trigger the problem because, e.g.

\setmathfont{Avenir}
\setmonofont[Scale = MatchLowercase]{Inconsolata}

come out fine.

@jgm
Copy link
Owner

jgm commented May 31, 2016

All metadata fields are interpreted as pandoc markdown.

Pandoc tries to recognize latex commands, but it doesn't
recognize options in parentheses (as in your case), as this
is a very unusual thing.

You can work around problems like this by defining a macro

\newcommand{\dummy}[1]{#1}

and then doing

\dummy{\setmathfont(Digits){Avenir}}

@conjugateprior
Copy link
Author

OK. Thanks!

@jgm jgm closed this as completed Jun 23, 2016
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

2 participants