Author lists

Journal-ready LaTeX author and affiliation blocks from your collaboration’s CSV file. See Author lists from a CSV for the CSV format and example output.

plotastro.authorlist(source, journal='mnras')[source]

LaTeX author/affiliation block for a journal, from a CSV file.

Parameters:
  • source (str, Path, or list of dicts) – Path to a CSV file with columns name, affiliations (“;”-separated), orcid, email — or an equivalent list of dicts. See the module docstring for the format.

  • journal (str) – Any journal key/alias the package knows ("mnras", "aanda", "apj", "oja", "prd", "jcap", …) or "generic" for a plain numbered-superscript block.

Returns:

str

Return type:

LaTeX source to paste into your manuscript.

Examples

>>> print(pa.authorlist("authors.csv", journal="aanda"))

Output formats

journal=

format

mnras, rasti

MNRAS \author[...]{...} block with superscripts and a \thanks e-mail

aanda, euclid

A&A \inst{...} and \institute{...} (euclid for the aaEC class)

apj, oja

AASTeX \author[orcid]{...}, \affiliation, \correspondingauthor

prd

REVTeX \author, \email, \affiliation

jcap

jcappub lettered \affiliation[a] and \emailAdd

generic, natastro, thesis, beamer

a plain block with numbered superscripts

Journal aliases work here too (see Journal names).

Command line

Installing plotastro also installs plotastro-authors, which wraps authorlist():

usage: plotastro-authors [-h] [-j JOURNAL] [-o OUTPUT] csv

positional arguments:
  csv                   path to the author CSV file

options:
  -h, --help            show this help message and exit
  -j JOURNAL, --journal JOURNAL
                        journal key, e.g. mnras, aanda, apj, oja, prd, jcap,
                        or 'generic' (default: mnras)
  -o OUTPUT, --output OUTPUT
                        write to this .tex file instead of stdout

For example, plotastro-authors authors.csv -j apj -o authors.tex. On an error (a missing file, or a CSV without names) it prints the message and exits with status 1.