Elsevier rticle not rendering affiliation properly

286 Views Asked by At

I am using the elsevier rticle template to prepare a paper with rmarkdown. When I knit it, commas do not get rendered in the institutional affiliation. This can be reproduced by installing rticles, creating a rmarkdown from the elsevier template, and knitting it. As can be seen below, the commas between Department, Street etc fail to render out of the box.

Any help would be appreciated.

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

You can use a raw attribute in the yaml block to properly format the latex code used to specify affiliations. Here I modified the yaml block in the rticles template:

title: Short Paper
author:
  - name: Alice Anonymous
    email: [email protected]
    affiliation: a
    correspondingauthor: true
    footnote: 1
  - name: Bob Security
    email: [email protected]
    affiliation: b
  - name: Cat Memes
    email: [email protected]
    affiliation: b
    footnote: 2
  - name: Derek Zoolander
    email: [email protected]
    affiliation: b
    footnote: 2
address:
  - code: a
    address:  |
      ```{=latex}
      organization={Some Institute of Technology},
      addressline={Street}, 
      city={City}, state={State}, postcode={Zip},
      country={United States}
      ```
  - code: b
    address:  |
      ```{=latex}
      organization={Another University},
      addressline={Street}, 
      city={City}, state={State}, postcode={Zip},
      country={United States}
      ```

title block