Skip to content

mikemahoney218/quarto-arxiv

Repository files navigation

ArXiv Template

This is a Quarto template that assists you in creating PDF outputs which closely match the arXiv template for the rticles package (which is itself derived from kourgeorge/arxiv-style). If you are intending to publish your article on arXiv, it is highly recommended you upload your TeX files (and supporting files) directly. However, this template supports rendering decent looking PDFs for upload to other repositories either before or instead of submission to arXiv itself. The TeX generated from the default .qmd template also passes arxiv's pre-submission build process and checks, and so preprints generated from this template may be able to be submitted to arXiv without any alterations.

There are currently a few differences between the PDFs generated by this template and those generated by the arXiv rticles template:

  1. The fonts and spacings are not a perfect match. PRs to fix this are more than welcome.
  2. References and links are not currently hyperlinked. PRs to fix this also more than welcome.
  3. ORCiD IDs will be rendered as clickable logos next to author names. This is an intentional change.
  4. Emails will be displayed as hyperlinks, and not in monospaced font. This is intentional.
  5. Authors with multiple affiliations will have each affiliation listed. This is intentional.

Any other differences are unintentional bugs -- please open an issue about anything you encounter!

Installation

You can use this as a template to create a new article. To do this, use the following command:

quarto use template mikemahoney218/quarto-arxiv

This will install the extension and create an example qmd file and bibiography that you can use as a starting place for your article.

You may also use this format with an existing Quarto project or document. From the quarto project or document directory, run the following command to install this format:

quarto install extension mikemahoney218/quarto-arxiv

This template uses the Latin Modern family of fonts. On Mac, you might need to install these using:

brew tap homebrew/cask-fonts
brew install font-latin-modern
brew install font-latin-modern-math

On Ubuntu, you might need to install these fonts using:

sudo apt install lmodern

If you have installation instructions for these fonts on another platform, please feel free to open an issue or send in a PR!

Usage

To use the format, you can use the format names arxiv-pdf and arxiv-html. For example:

quarto render article.qmd --to arxiv-pdf

or in your document yaml

format:
  pdf: default
  arxiv-pdf:
    keep-tex: true    

You can view a preview of the rendered template at https://mike.quarto.pub/quarto-arxiv-template/.

This template provides a few custom YAML header options to control the PDF output:

linenumbers: false # Add (continuous) line numbers?
doublespacing: false # Double space the PDF output?
runninghead: "A Preprint" # The text on the top of each page of the output
authorcols: false # Should authors be listed in a single column (default) or in multiple columns (`authorcols: true`)

Both linenumbers and doublespacing are booleans, defaulting to false, and were added in version 0.2.0. runninghead can be any text and was added in version 0.2.1. You can define these either as top-level options, or under arxiv-pdf; they only impact the generated PDF.

In The Wild

Use this template for a paper or a preprint? Let me know, and I'll add it to the list below!

The following papers were rendered using this template: