I am using pandoc 2.10. I would like to write an article document in Markdown, then export to PDF via latex - and I would like to have multiple authors with affiliation and email underneath, somewhat like this example from https://mcmap.net/q/1626661/-multiple-authors-and-subtitles-in-rmarkdown-yaml (that however uses R
-specific template, apparently) :
So, first I try with the default pandoc capabilities - this is test.md
:
---
title: "Testing the authors"
author:
- Alice Alisson, First, Oldest Institute
- Bob Bobson, First, Oldest Institute
- Charlie Charlson, Second, Newer Company
date: Aug 10, 2020
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Using pandoc test.md --pdf-engine=xelatex -o test.pdf
, I get:
Like this, authors are not side by side - and affiliations are next to the author name; and since the institutions' names also have a comma, it gets a bit confusing to read that.
Then, I found one can use affiliations via footnote in plain pandoc - here is updated test.md
:
---
title: "Testing the authors"
author:
- Alice Alisson^[First, Oldest Institute]
- Bob Bobson^[First, Oldest Company]
- Charlie Charlson^[Second, Newer Company]
date: Aug 10, 2020
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
... and with pandoc test.md --pdf-engine=xelatex -o test.pdf
, I get:
Authors are side-by-side, which is great, but affiliations are footnotes, which I do not like.
Then, via Authors and affiliations in the YAML of RMarkdown - I found about https://github.com/pandoc/lua-filters ; so thought I could test that; so here is updated test.md:
---
title: "Testing the authors"
institute:
- first: First, Oldest Institute
- second: Second, Newer Company
author:
- Alice Alisson:
institute:
- first
correspondence: "yes"
email: [email protected]
- Bob Bobson:
institute:
- first
correspondence: "yes"
email: [email protected]
- Charlie Charlson:
institute:
- second
correspondence: "yes"
email: [email protected]
date: Aug 10, 2020
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
... and with: pandoc test.md --lua-filter=scholarly-metadata.lua --lua-filter=author-info-blocks.lua --pdf-engine=xelatex -o test.pdf
, I get:
So, here, authors are side-by-side, which is great - but I get the affiliation via references like footnotes, and the e-mails are also in a separate line; I find this kinda hard to read.
So, how can I format a YAML block for a pandoc document, so that it shows the authors side-by-side, with affiliation and e-mail underneath? Something like:
Alice Alisson Bob Bobson Charlie Charlson
First, Oldest Institute First, Oldest Institute Second, Newer Company
[email protected] [email protected] [email protected]
If this is not possible with plain pandoc - are there any lua filters that I could use to achieve this?