2

I am writing a document in r markdown. When I knit it to pdf, instead of the author name the pdf simply displays "true.

The knitting works perfectly well with html outputs, besides it seems to me it should work.

---
title: "knitr will you work please?"
author:
  name: John Smith
output: pdf_document
---

The output will display

knitr will you work please?
true

and not

knitr will you work please?
John Smith
Alessandro
  • 41
  • 6
  • 1
    I'm not sure why this works in HTML but not PDF. One fix is to use `author: "John Smith"`. – neilfws Jul 30 '19 at 22:25
  • 1
    Related https://stackoverflow.com/questions/26043807/multiple-authors-and-subtitles-in-rmarkdown-yaml and https://stackoverflow.com/questions/52918716/authors-and-affiliations-in-the-yaml-of-rmarkdown – duckmayr Jul 30 '19 at 23:15

1 Answers1

2

It should be like this

---
title: "knitr will you work please?"
author: John Smith
output: pdf_document
---
ghosh'.
  • 1,567
  • 1
  • 14
  • 19