8

I am new to beamer. Given the following mwe:

---
title: Tensorflow
subtitle: Cloud Computing Capstone Presentation 
fonttheme: structurebold
author: Stephen Boesch
fontsize: 12pt
output:
  rmarkdown::html_document:
    theme: lumen
    fig_caption: no        
---

## TensorFlow!

Distributed DataFlow Graph based Mathematical Computations
Google's Second Generation Deep and Machine Learning Platform

And running with:

pandoc --slide-level=2 -H beamer.tex -s -t beamer --toc-depth=5 --toc --pdf-engine xelatex -o mwe.pdf mwe.md

There is a blank page generated after the pandoc generated title slide and before the Tensforflow! headed first content slide.

enter image description here

Any tips how to fix this? thanks.

4
  • 4
    This is caused by --toc: The empty page contains the toc, which is empty since you are not having any toplevel (i.e. #) entries
    – DG'
    Mar 18, 2019 at 18:35
  • nice catch. care to make that an answer? Mar 18, 2019 at 18:50
  • Well, I made an answer out of it
    – DG'
    Mar 19, 2019 at 6:33
  • 1
    and you got yourself an (upvote,accept) tuple ;) Mar 19, 2019 at 8:03

3 Answers 3

5

The empty slide contains the ToC, which is empty, since you are not using toplevel devisions (i.e. #). This could be solved by either adding a toplevel devision:

---
title: Tensorflow
subtitle: Cloud Computing Capstone Presentation 
fonttheme: structurebold
author: Stephen Boesch
fontsize: 12pt
output:
  rmarkdown::html_document:
    theme: lumen
    fig_caption: no        
---

# Part 1

## TensorFlow!

Distributed DataFlow Graph based Mathematical Computations
Google's Second Generation Deep and Machine Learning Platform

Or by omitting the option --toc when calling pandoc.

3

@DG' has found the culprit:

This is caused by --toc

He is invited to create the real/accepted answer. In the meantime here is the (correct) result using

 pandoc --slide-level=2 -H beamer.tex -s -t beamer  --pdf-engine xelatex -o mwe.pdf mwe.md

enter image description here

2

I think it is important to note that this will also occur if there is a (Markdown) comment before the first frame, even if --toc is omitted, e.g.:

---
title: Tensorflow
subtitle: Cloud Computing Capstone Presentation
fonttheme: structurebold
author: Stephen Boesch
fontsize: 12pt
output:
  rmarkdown::html_document:
    theme: lumen
    fig_caption: no
---

<!--Comment that will cause an empty frame to insert-->

## TensorFlow!

Distributed DataFlow Graph based Mathematical Computations
Google's Second Generation Deep and Machine Learning Platform

<!--Comment that will NOT cause an empty frame to insert-->

If comments appear after the first frame, they will not cause an empty frame to be inserted.

2
  • Keep those anecdotes coming! Feb 9 at 22:05
  • Thanks to @Arthur's answer above, I realized that I had two commented lines at the end of my metadata yaml file, which were causing two blank pages to be created in the final pdf. Removing these lines also removed the blank pages! Hopefully, this experience might be helpful for someone else.
    – Gabb
    Feb 14 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.