9
votes

I am trying to accommodate multiple authors and affiliations as follows.

---
title: "Title"
author: | 
  | Author1^1^, Author2^2^, Author3^1^ and Author4^2^
  | 1. Affiliation1
  | 2. Affiliation2
date: "Wednesday, April 10, 2015"
output:
  pdf_document
---

With above I am getting

enter image description here

How to modify the default R markdown Yaml header to get customised output in the author field? I would like to.

  1. Avoid italics for affiliation.
  2. Have some space between author and affiliation (Empty line with | does not work).
  3. Reduced font size for affiliation alone.
1
Have a look at rmarkdown templates: rmarkdown.rstudio.com/developer_document_templates.html And this example how they modify the author: github.com/rstudio/rticles/search?utf8=%E2%9C%93&q=author - Rentrop

1 Answers

2
votes

I was looking a good way to add different affiliations with an elsevier template within 'rticles' and i could do it like this:

---
title: Title
author:
  - name: Sergio Ibarra Espinosa^a^
    email:  [email protected]
  - name: María de Fátima Andrade^a^
  - name: Seaghán Mhartain^b^
  - name: Rita Yuri Ynoue^a^
address:
  - code: 1
    address: Instituto de Astronomía, Geofísica e Ciências Atmosféricas, Universidade de São Paulo
  - code: 2
    address: Faculdade de Medicina, Universidade de São Paulo
abstract: abstract

  It consists of two paragraphs.

bibliography: mybibfile.bib
output: rticles::elsevier_article
---

which produced the following result:

enter image description here

I hope it can help