Skip to main content

A simple script to prepare your LaTeX paper for arXiv submission.

Description

tidyarxiv is a tiny script to run before publishing your paper on arXiv.

First, you create a tidyarxiv.cfg configuration file within your project directory. Then you run tidyarxiv on the root of your project directory.

tidyarxiv first copies over only the files you specify into a separate temporary staging directory (first creating a list of all the files you choose to include, and then excluding all the files you choose to exclude, if any). It filters those files by removing unwanted TeX comments from the relevant files (typically .tex and .sty).

Next, it builds your project within the staging directory to produce your final PDF file. Among the present files in the staging directory after the build, it keeps only the ones you choose to include in your final arxiv. Finally, it produces a .pdf and .tar.gz ready for submission to arXiv.

Installing

Install using pip:

pip install tidyarxiv

Requirements

Python 3.10+

Config

Create a tidyarxiv.cfg file in the root of your project. See the example. You can just copy over the example configuration, which has sane defaults.

The file should be a JSON file, which is a dictionary with the following configuration keys:

  • target: Optional. Specifies the root .tex file of your project (not including the .tex extension). If skipped, "main" is used.
  • outdir: Optional. Output directory in which to store the generated .pdf and .tar.gz file. If skipped, "." is used.
  • files: Optional. Array of glob file patterns necessary to build your project. By default, all .tex, .sty., and .bib files are included.
  • files_exclude: Optional. Array of glob file patterns to exclude from the build process of your project. By default, no files are excluded.
  • arxiv_files_include: Optional. Array of glob file patterns of additional files, in addition to files, to include in the tarball after your project has been built. Note that not all output files of the build process are included by default, just files listed in files! By default, this includes all .bbl files.
  • arxiv_files_exclude: Optional. Array of glob file patterns of files to exclude from the tarball after your project has been built. By default, this include all .bib files.
  • filter_files: Optional. Array of glob file patterns of files to filter for TeX comments. By default, this includes all .tex and .sty files.
  • filter_files_exclude: Optional. Array of glob file patterns of files to exclude from TeX filtering. Empty by default.
  • build_command: Optional. A string specifying how to build your project. Any occurence of %FILE% within the build command will be replaced by your target .tex filename. The default command is "latexmk -pdf %FILE%".

Running

After installing and configuring, run in the root of your project directory:

tidyarxiv

Features

  • Includes only the files you want, and excludes the files you don't want.
  • Removes LaTeX comments (anything after a "%", nothing more complex).
  • Gets rid of .bib files from the final tarball.
  • Configurable.
  • Sane configuration defaults.

Authors

Dionysis Zindros and Joachim Neu, Stanford University

License

GPL v3

Alternatives

See also the more complex arxiv-latex-cleaner.

Release files for tidyarxiv 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tidyarxiv 1.0.1
File Size Uploaded
tidyarxiv-1.0.1.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tidyarxiv 1.0.1
File Interpreter ABI Platform
tidyarxiv-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / tidyarxiv-1.0.1.tar.gz

Download URL tidyarxiv-1.0.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7573fc28c4c9a13a38f721e1826fde769ceba3505151feee7ebfe73091f9e4f8
BLAKE2b-256 checksum
How to use checksums
850bac55592938abc4a55d34e5928ef3374a223e9b2990a3dd50c8a570a88daf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / tidyarxiv-1.0.1-py3-none-any.whl

Download URL tidyarxiv-1.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc7cf7a99c3237f31840e0de2889c6480fe37326cb2ffd8bcaf7fbed65820f76
BLAKE2b-256 checksum
How to use checksums
f7d183c12d80247fe9a4c00304a4b439e515d3b288ae9418953face303019bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page