Change to default formatting of YAML header (title, author, date)

I tried compiling an old report that had been generated under the default PDF output for a new R Markdown document (last knit in February 2020). The formatting of the title, author, and date are now all different in undesirable ways (size, line spacing, etc.). Does anyone have information on this?

The convenience of choosing a default template for simple analytical reports was one of the benefits of this workflow, but changes to defaults that cannot be easily modified are pretty frustrating. I'm sure there are ways to edit the template but that completely defeats the simplicity of a default option.

Did you update the packages since your last rendering ?

From Rmarkdown 2.0+, the tex template used is the one from Pandoc and not a custom one.
https://rmarkdown.rstudio.com/docs/news/index.html#rmarkdown-2-0-2019-12-12

The change was made in 2019, but depending on the version you have at the time that could be the cause. You could try with a previous Rmarkdown version like 1.18 to see if this changes something.

For reproducibility, I would advise to use a tool like renv that will allow you to snashot package versions for your project so that you know that you can rerun with the same R environmnent, without fear of changes in new packages version.

Thank you, this was extremely helpful. I had indeed updated packages but did not search back far enough for documented changes to find this template change.

Putting the old template ("compact-title.tex") in the preamble allows the previous format to be recovered.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.