2
votes

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
1
I'm not sure why this works in HTML but not PDF. One fix is to use author: "John Smith". - neilfws

1 Answers

2
votes

It should be like this

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