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/activateThen 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.gitIf 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 (however, this particular issue may not be relevant as of February 2026).
For example, you may find the "Edit CSV" and "Rainbow CSV" extensions in VS Code helpful for this.
NB: some editors (Microsoft Excel, LibreOffice Calc, Apple Numbers) may save CSV files with semicolon-separated values by default (unless you choose a format option explicitly), whereas mkauthlist expects comma-separated values (as generated by PubDB).
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.texFor 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).
Beware that editing a CSV file manually can be cumbersome.
"Edit CSV" (and "Rainbow CSV") extensions in VS Code were helpful and did not produce errors while adding the FirstTier column.
NB: some editors (Microsoft Excel, LibreOffice Calc, Apple Numbers) may save CSV files with semicolon-separated values by default (unless you choose a format option explicitly), whereas mkauthlist expects comma-separated values (as generated by PubDB).
For first-tier papers in JCAP with ORCID numbers, run
mkauthlist -f --sort-firsttier --orcid -j jcap example_firsttier.csv example_firsttier.texYou 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.texor
mkauthlist -f --sort-firsttier --orcid -j jcap.appendix example_firsttier.csv example_firsttier_appendix.texrespectively.
If you really don't like the letter-based affiliation indexing for your JCAP manuscript version, you can revert to number affiliation indices by adding a --numeric-affil (or --numeric-affiliations) flag.
However, to the best of our knowledge, the JCAP editorial team enforces the letter-based affiliation indexing in proofs and the published version, and it may be easier to prevent errors and/or validate the conversion if you start with the same format (or at least produce a separate version for that).
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.txtor
mkauthlist -f --sort-firsttier -j arxiv example_firsttier.csv example_firsttier.txtrespectively.
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.xmlIt 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.xmlNote 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.