Make long latex author lists from csv files.
Clone or download this GitHub repository: https://github.com/cosmodesi/mkauthlist.
Do not use pip install mkauthlist
, because that will install the DES version.
You may want to set a virtual environment to run it using
python3 -m venv mkauthlistDESI
source mkauthlistDESI/bin/activate
Then you can simply install it by
python3 -m pip install .
If the code is changed/updated, you will need to reinstall for the changes to take effect.
The editable/developer installation (pip install -e .
) does not seem to help avoid the re-installation in some cases.
You can also install from GitHub without cloning or downloading the repository:
python3 -m pip install git+https://github.com/cosmodesi/mkauthlist.git
If you do not worry about conflicts with the DES version, you can install the code with one of the commands above without setting up a virtual environment.
If you download a CSV file from the DESI PubDB, you should remove the empty lines with a CSV editor before using this script. For example, you may find the "Edit CSV" and "Rainbow CSV" extensions in VS Code helpful for this.
In the DESItests
directory, you may find examples for KP (alphabetical) and first-tier papers.
For the key papers (KP) in JCAP format with ORCID numbers, run
mkauthlist -f --sort --orcid -j jcap example_alphabetical.csv example_alphabetical.tex
For first-tier author papers, edit the CSV file to add a new column called FirstTier
, and assign natural numbers to the first-tier authors according to their ordering (see example_firsttier.csv
in DESItests
).
For first-tier papers in JCAP with ORCID numbers, run
mkauthlist -f --sort-firsttier --orcid -j jcap example_firsttier.csv example_firsttier.tex
You may also want to exclude the collaboration name by adding the -nc
, --nocollab
or --nocollaboration
flag.
(The collaboration name does not appear for JCAP specifically, but this can be helpful with other journal formats.)
To send affiliations to an appendix, use
mkauthlist -f --sort --orcid -j jcap.appendix example_alphabetical.csv example_alphabetical_appendix.tex
or
mkauthlist -f --sort-firsttier --orcid -j jcap.appendix example_firsttier.csv example_firsttier_appendix.tex
respectively.
To generate the author list for arXiv, use -j arxiv
with the same sorting options, i.e.
mkauthlist -f --sort -j arxiv example_alphabetical.csv example_alphabetical.txt
or
mkauthlist -f --sort-firsttier -j arxiv example_firsttier.csv example_firsttier.txt
respectively.
In the latter case, you may also want to exclude the collaboration name by adding the -nc
, --nocollab
or --nocollaboration
flag.
To generate the author.xml
for INSPIRE (https://github.com/inspirehep/author.xml) and/or Phys.Rev. journals, use -j author.xml
(or -j inspire
) and add the publication reference (e.g., the arXiv URL) via -pr
or --pubref
, e.g.
mkauthlist -f --sort -j author.xml --orcid -pr https://arxiv.org/abs/YYMM.XXXXX example_alphabetical.csv example_alphabetical.xml
It is worth including the ORCID information by using the --orcid
option.
NB: Excluding the collaboration name will produce an invalid XML file.
Another option is to use the mkauthorxml.py
script to create the author.xml file that APS journals may request. Here is the syntax:
python mkauthorxml.py paper.tex -o paper.xml
Note there are also options for adding the collaboration name and an arxiv link. Use -h
to get information about other command line parameters.
The output with the --orcid
option requires \usepackage{orcidlink}
in the TeX preamble.