Skip to main content

A simple script to prepare your LaTeX paper for arXiv submission

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidyarxiv-1.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tidyarxiv-1.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file tidyarxiv-1.0.1.tar.gz.

File metadata

  • Download URL: tidyarxiv-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tidyarxiv-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7573fc28c4c9a13a38f721e1826fde769ceba3505151feee7ebfe73091f9e4f8
MD5 64ecd4ee9928e1e390b5f84a918f62b5
BLAKE2b-256 850bac55592938abc4a55d34e5928ef3374a223e9b2990a3dd50c8a570a88daf

See more details on using hashes here.

File details

Details for the file tidyarxiv-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tidyarxiv-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tidyarxiv-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7cf7a99c3237f31840e0de2889c6480fe37326cb2ffd8bcaf7fbed65820f76
MD5 2d191caca6e468a60297f29e04a188d2
BLAKE2b-256 f7d183c12d80247fe9a4c00304a4b439e515d3b288ae9418953face303019bd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page