MichaelChirico
MichaelChirico

Reputation: 34733

Adding version info to title slide

I'm trying to add some info in my title slide of my Rmarkdown-produced Beamer presentation to assure readers of the creation date of the file they're reading.

This should basically be this answer posted by Yihui, but there's a catch -- the presentation was given on a fixed date, which I'd like to keep, below which I would print the creation date, a la:

March 1, 2016

This version: March 4, 2016

I can't get the date field in the YAML header to play along with this multi-line approach. Pages like this suggest we can simply follow date: by some --demarcated lists, like:

output:
  beamer_presentation 
date:
- March 1, 2016
- "This Version: `r Sys.time()`"

When compiled, only the first line is printed on the title slide. (I've also tried other similar approaches with different white spaces, using pipes to denote subtitles, etc.)

The closest I've gotten is to get both things on the same line with:

date: "March 1, 2016\nThis Version: `r Sys.time()`"

But the compiled version apparently ignores the newline.

Any suggestions?


Edit:

I've gotten a new line to appear finally by doubling the newline character "\n", but am still interested in a way to make the font on "This version:..." smaller. Why didn't the subtitling through pipes approach work?

Upvotes: 1

Views: 866

Answers (1)

Yihui Xie
Yihui Xie

Reputation: 30164

If I understand it correctly, you have solved the newline problem via \n\n (that tells LaTeX to start a new paragraph), and the remaining question is about the font size. If you only need the LaTeX/beamer output, I think you can use LaTeX commands like \\small{This version...}.

Upvotes: 1

Related Questions