Skip to main content

Tar all files needed to re-compile your LaTeX project

Project description

tartex

PyPI - Version PyPI - Python Version Hatch project


TarTeX is a command-line utility to generate a tarball including all required — but no more! — (non-system) source files to (re)compile your LaTeX project elsewhere.

Table of Contents

Features

  • Defaults to including the least number of files needed to recompile your LaTeX project in the output tar file.
  • Creates tarballs compatible with arXiv (and most journal) requirements.
  • Automatically determines pdf or ps processing based on source dir contents.
  • Supports different compression methods for output tarball.
  • Does not modify or create files inside source directory itself.
  • Preserves directory structure in generated tarball, i.e. no flattening.
  • Handy options to allow edge cases.
  • Native TAB-completion for common interactive shells: bash, fish, and zsh (help welcome for others).

Installation

Note: Unless you provide a prepared ".fls" file as FILENAME input, you must have latexmk and pdflatex, as well as a full LaTeX env installed to allow compilation of your LaTeX project. tartex does not include any system-wide files, such as standard TeX style files, classes, etc. in the tar file.

Using pipx

This is the easy way to install tagged releases.

pipx install tartex

From GitHub sources:

Compile using hatch to generate a wheel, which may be then installed using pipx as follows:

git clone https://github.com/badshah400/tartex.git
cd tartex
hatch build
pipx install ./dist/*.whl

Usage

Supported OS: Potentially any POSIX-like, tested only on Linux.

usage: tartex [OPTIONS] FILENAME

Build a tarball including all source files needed to compile your LaTeX project
(version 0.6.1.dev0).

positional arguments:
  FILENAME                 input file name [.tex|.fls] (with or without suffix)

options:
  -h, --help               show this help message and exit
  -V, --version            print tartex version and exit
  -a, --add=PATTERNS       include additional files matching glob-style
                           PATTERN; separate multiple PATTERNS using commas
  -b, --bib                find and add bib file to tarball
  -l, --list, --dry-run    print list of files to include and quit
  -o, --output=NAME[.EXT]  output tar file name; tar compression mode will be
                           inferred from .EXT, if possible (default 'gz')
  --overwrite              overwrite output tarball if necessary
  -p, --packages           add names of used (La)TeX packages as a json file
  -s, --summary            print a summary at the end
  --with-pdf               add existing/generated final output PDF
  -v, --verbose            increase verbosity (-v, -vv, etc.)
  -x, --excl=PATTERNS      exclude file names matching PATTERNS
  -j, --bzip2              recompress with bzip2 (.bz2); override .EXT in '-o'
  -J, --xz                 recompress with lzma (.xz); override .EXT in '-o'
  -z, --gzip               recompress with gzip (.gz); override .EXT in '-o'

Options for latexmk processing:
  --latexmk-tex=TEXMODE    force TeX processing mode used by latexmk; TEXMODE
                           must be one of: dvi, lualatex, luatex, pdf, pdflua,
                           ps, xdv, xelatex
  -F, --force-recompile    force recompilation even if .fls exists

Shell completion options:
  --completion             print shell completion guides for tartex
  --bash-completions       install bash completions for tartex
  --fish-completions       install fish completions for tartex
  --zsh-completions        install zsh completions for tartex

Note: If the source dir of your LaTeX project already contains the .fls file previously generated by, say latex -record or latexmk, then tartex will directly use that file to determine which input files to include in the tarball. Otherwise, tartex will recompile your project using latexmk in a temp dir and use the .fls file generated there. To be precise, recompilation will invoke:

latexmk -f -<texmode> -cd -outdir=<tmpdir> -interaction=nonstopmode filename

texmode is one of pdf or ps by default, as detemined from the contents of the source dir. It may be overridden by the --latexmk-tex option.

License

tartex is distributed under the terms of the MIT license.

Similar utilities

  • bundledoc is a post-processor for the snapshot package that bundles together all the classes, packages and files needed to build a given LaTeX document.

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

tartex-0.7.0.tar.gz (146.5 kB view details)

Uploaded Source

Built Distribution

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

tartex-0.7.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file tartex-0.7.0.tar.gz.

File metadata

  • Download URL: tartex-0.7.0.tar.gz
  • Upload date:
  • Size: 146.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for tartex-0.7.0.tar.gz
Algorithm Hash digest
SHA256 baaee5ea9ebb37a7f1e1f40fb49d2133b93c72ab8282e6581ff917404115cf39
MD5 1ddab1be7bb9b9ab368430522a654b22
BLAKE2b-256 061e61a3a4c5fd55dd93fbf50b6cef2c7c927e7b7602623c04f66f9ac142485d

See more details on using hashes here.

File details

Details for the file tartex-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: tartex-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for tartex-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06615f2d146518e81ee3e0f84f8a5b0c69a5701f7c6faa9070266c994d6a300b
MD5 07d12771b5a6b62870caa6b8193a96d1
BLAKE2b-256 6e0ee48e8d2b00a7f97e08fa378055f315587a64d3ee6f34f305dd58866f599b

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