Generating beamer templates from RMarkdown files using uiucthemes package - Not able to keep tex files


I am attempting to use the uiucthemes package (link) to generate a beamer template presentation. However, setting keep_tex: true does not actually save the intermediate .tex file. I believe this package works similarly to knitr, but using this syntax gives me an error.

The code that I am using is the example template that comes with the package, without any modifications except for the addition of the keep_tex: true line:

title: "Illinois Blue and Orange Beamer Theme"
short-title: "Beamer Slides"
author: "John and Mary Doe"
short-author: "J & M Doe"
date: '`r format(Sys.Date(), "%B %d, %Y")`'      # Month DD, YYYY (Main Slide)
short-date: '`r format(Sys.Date(), "%m/%d/%Y")`' # MM/DD/YYYY (Lower Right)
institute: "University of Illinois at Urbana-Champaign"
short-institute: "UIUC"
department: "Department of Magic"                # Institute must be defined
license: "Did you license this slide deck? "
section-titles: false                            # Provides slide headings
safe-columns: true                               # Enables special latex macros for columns.
      keep_tex: true

# Section title     
## Subsection title 

### Frame Title

Frame content 

**Unordered List**

- [University of Illinois at Urbana-Champaign (UIUC)](
- [Department of Statistics](
- [Illinois Informatics Institute](

*Ordered List*

1. <>
2. <>

#### Title for block box

Content inside of a box 

### \LaTeX

\begin{exampleblock}{Binomial Theorem}
  f\left(k\right) = \binom{n}{k} p^k\left(1-p\right)^{n-k}

Hello Equation \ref{eq:binom}

### Redux \LaTeX 

This theme supports special LaTeX macros `\beingcols` and `\endcols` that allows
for markdown to be blended with LaTeX without triggering the [`raw_tex`]( 
extension. To enable this feature, the `safe-columns` key in the YML head matter
must be set equal to `true`.



- _Hello!_


1. **Goodbye!**


## Code Example

### Code Embedding

# Embedding code
x = 2
y = 3

x + y
Inline R code refering to variable in previous code chunk:

`r x`

The error that i see is as follows:

Error in yaml::yaml.load(..., eval.expr = TRUE) : 
  Scanner error: mapping values are not allowed in this context at line 15, column 15
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
Execution halted

I am lost as to how should I move forward to solve this error. Thanks for the help.

I think you are just missing : after the format name. Hence the YAML parsing issue.

The error tells you that YAML parsing fails, so first thing you should do is check the YAML syntax.

It should be

      keep_tex: true

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.