Skip to content

Script that prepares tarball of tex document in current directory tree for arXiv submission, stripping any tex comments.

License

Notifications You must be signed in to change notification settings

thomasnyman/arxivprep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

arxivprep

Script that prepares tarball of tex document in current directory tree for arXiv submission, stripping any tex comments.

Usage

$ arxivprep [TEXNAME[.tex]]

Run arxivprep in the top-level directory containing the tex document.

If a TeX typesetter is available, arxivprep attempts to determine document dependencies automatically by examining the list of input and output files generated by the -recorder option of modern versions of latex (and pdflatex, xelatex, lualatex, etc).

If TEXNAME if specified it is used as the main document when determining document dependencies. If omitted, document dependencies are determined from the first .tex file (in alphanumeric order) in the current directory.

If a suitable TeX typesetter is not installed, arxivprep will include any .tex, .bbl, .sty, .cls, .pdf, .jp(e)g, and .png files in subtree relative to TEXNAME (or the current directory if TEXNAME is omitted).

The behavior of the script can be modified by setting the value of environment variables the script recognizes, e.g.

$ TEXFILES=paper.tex arxivprep

arxivprep respects the following environment variables:

  • TYPESETTER TeX typesetter used for automatic document dependency detection. Must support -recorder option. Defaults to pdflatex.

  • LATEXFLAGS Additional command line flags passed to TYPESETTER.

  • OUTFILE Pathname of output tarball to be created.

  • TMPDIR Pathname to directory where to place temporary files.

  • AUXDIR Pathname to directory used to store auxiliary files generated during document dependency detection. Setting this environment variable will cause auxiliary files to be left in the specified directory.

  • TARDIR Pathname to directory used to store processed files included in tarball. Setting this environment variable will cause processed files to be left in the specified directory.

  • STRIPTEXCOMMENT Commandline used to invoke striptexcomments script.

The following environment variables can be used to override automatically detected document dependencies.

  • INPUTS List of files to include in tarball.

  • TEXFILES Tex files (.tex) to strip from comments and include in tarball.

  • BBLFILES Bibliography (.bbl) files to include in tarball.

  • PKGFILES Tex class and style files (.cls and .sty) to include in tarball.

  • FIGFILES Figure files to include in tarball (default: .pdf, .jp(e)g, .png)

Dependencies

Requires Python and ply.lex:

$ pip install ply

Acknowledgments

striptexcomments based on strip_comments.py script by Adam Merberger

strip_comments.py modifications that preserve comments in \makeatletter and \makeatother blocks by dzhuan

License

Copyright 2019 Thomas Nyman <thomas.nyman@iki.fi>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Script that prepares tarball of tex document in current directory tree for arXiv submission, stripping any tex comments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published