Adding a footnote / thanks to Rmarkdown title slide
Asked Answered
S

1

21

I have to include a note in my title slide declaring the source of my funding. I was able to do this in LyX / LaTeX through:

\author{Michael Chirico\thanks{These people gave me money}, Other Authors}

I have not been able to reproduce this in Rmarkdown. The site mentions using [^] anchoring to mark footnotes, and this works fine in other slides, but I couldn't get it to work in the title:

---
title: "Title"
author: "Michael Chirico[^thanks], Other Authors"
date: "February 10, 2016"
output: beamer_presentation

[^thanks]: These people gave me money
---

The .pdf compiles but there is no title slide. I think this is the relevant part of the compilation log:

pandoc: Could not parse YAML header: UnexpectedEvent {_received = Just (EventSequenceStart Nothing), _expected = Nothing} "source" (line 1, column 1)

If I move [^thanks] outside the header, the .pdf compiles but there is no footer on the title page (nor anywhere else), and [^thanks] appears as-is on the title slide.

How can I add a footnote/thanks section to the title slide?

Surfbird answered 5/2, 2016 at 16:19 Comment(0)
L
27

You could use an inline note. The regular footnote syntax is [^note_call] and then [^note_call]: note_content on a new line. Inline notes' syntax is just ^[note_content]

---
title: "Title"
author: "Michael Chirico^[These people gave me money], Other Authors"
date: "February 10, 2016"
output: beamer_presentation
---

Another solution that allows more flexibility, but is restricted to the beamer output, would be to change the template.

Lackey answered 6/2, 2016 at 18:7 Comment(4)
this seems perfect. is there any real difference? (besides that mentioned in the link: "unlike regular notes, [inline notes] cannot contain multiple paragraphs")Surfbird
I don't think so, pandoc parses both syntax as Note elements. You can check by compiling your document with pandoc -t nativeLackey
For the record this sadly doesn't work on the .Rpres format (not that this was asked in the Q, but I would think the solution would apply to both)Surfbird
Does not work in general Rmarkdown documents either, as of November 2017.Hindustan

© 2022 - 2024 — McMap. All rights reserved.