RMarkdown can't keep authors in separate lines

I have mutiple authors with different affiliations. I am not able to keep them in separate lines. Also see warning message shown at end of this posting.
I actually had it workign file before I upgraded to R3.6.2 with tinytex_0.20 rmarkdown_2.1 .

Any help is appreciated.

the code in Rmd file:

################

title: Summary Report
author:

  • "John Doe, Mike Mistery, Nance Mistery, Sam Excellent"
  • "North America Explorer Team"
  • "Christie Outstanding, Jon Goodfellow"
  • "North America New Development"
    date: "r format(Sys.time(), '%B %d, %Y')"
    header-includes:
  • \usepackage{titling}
  • \pretitle{\begin{center}\LARGE\includegraphics[width=8cm]{blue_sky.png}\[\bigskipamount]}
  • \posttitle{\end{center}}
  • \usepackage{fancyhdr}
  • \usepackage{xcolor}
  • \pagestyle{fancy}
  • \rhead{\includegraphics[width = .05\textwidth]{blue_sky.png}}
  • \fancyfoot[CO,CE]{X Company Confidential}
  • \fancyfoot[LE,RO]{\thepage}
  • \fancypagestyle{plain}{\pagestyle{fancy}}
    output:
    pdf_document:
    toc: true

################

the output in PDF:

################
test1.pdf (311.1 KB)
################

I also see
Warning message:
Package Fancyhdr Warning: \fancyfoot's E' option without twoside option is use less on input line 109. Package Fancyhdr Warning: \fancyfoot's E' option without twoside option is use
less on input line 110.
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 23.6612pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.

1 Like

This discussion here:

The default latex template is now the one from Pandoc directly and it does put the authors with an \and. See the template.

If you want multiple author differently organized, I think you need to provide your own template. There is also a trick to change the meaning of the \and latex command in the discussion on GH.

1 Like

Thanks @cderv !

I am not familar with pdf code and not sure how to change template. Looks like I need to downgrading RMarkdown.

If you downgrade, you may encounter other issue. You can try the trick I posted on the GH issue

---
title: "R Markdown v2 Demo"
author:
  - John
  - Joe
date: "2015/01/01"
output: pdf_document
header-includes: 
  - \renewcommand{\and}{\\}
---

Hello world.

Could work for you if you don't use the \and command elsewhere than in author.

2 Likes

Excellent, That solved my problem!
Glad I have not downgraded RMarkdown as I am concerned it may cause other issues.

Thanks so much!

1 Like

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

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