Skip to main content

Bundle a LaTeX project (resolve input includes, collect figures and auxiliary files) into a zip archive.

Project description

LaTeX2Bundle

LaTeX2Bundle banner

LaTeX2Bundle packages a LaTeX project into a single ZIP archive. It resolves \\input{} and \\include{}, collects figures and auxiliary files (e.g. .bib, .cls), optionally reduces bibliographies to cited entries, and produces a ready-to-share bundle.


Features

  • Resolves \\input{} and \\include{} directives
  • Copies figures and auxiliary files into a self-contained directory
  • Optionally reduces .bib files to only cited entries
  • Optionally renames figures for portability
  • Produces a single ZIP archive

Usage

latex2bundle path/to/main.tex [options]

Options

  • -c, --copy-files <files...> Include additional files (e.g. extra.bib myclass.cls)

  • -t, --target-dir <dir> Output directory (defaults to the main file’s directory)

    Verbose logging

  • --no-reduce-bib Keep full .bib files (disable citation-based reduction)

  • --no-rename-figures Keep original figure filenames


Examples

# Basic: bundle main.tex into ./bundle and create main.zip
latex2bundle path/to/main.tex

### Mode examples

The `--mode` flag controls what artifacts are produced. Valid values:

- `both` (default): create the cleaned bundle directory and a ZIP archive containing it.
- `zip-only`: create only the ZIP archive and remove the temporary bundle directory.
- `bundle-only`: create and keep the bundle directory but do not create a ZIP file.

Examples:

```bash
# Create both the bundle and the ZIP (default)
latex2bundle path/to/main.tex --mode both

# Produce only the ZIP and remove the bundle directory
latex2bundle path/to/main.tex --mode zip-only

# Produce only the bundle directory without creating a ZIP
latex2bundle path/to/main.tex --mode bundle-only

Combine .bib files

Use the included tool to scan one or more TeX entry files, collect all referenced .bib files (recursing through \input/\include), and produce a single combined .bib containing only the cited entries. The tool also detects conflicting keys and can print sorted entries.

Basic usage:

# scan entry.tex and write combined.bib
python -m latex2bundle.combine_bib entry.tex -o combined.bib

# print conflicts and sorted entries by title (use -L DEBUG for more debug output)
python -m latex2bundle.combine_bib entry.tex --print-conflicts --print-sorted=title -L DEBUG

Notes:

  • The tool follows \input{} and \include{} recursively to find all bibliography references.
  • When duplicate entries (same title) are detected the tool can deduplicate and optionally update TeX files' citation keys to point to the kept key; run with -L DEBUG to see detailed debug output before making changes.

Include extra files with verbose output

latex2bundle path/to/main.tex -c extra.bib myclass.cls -v

Write bundle to a specific directory

latex2bundle path/to/main.tex -t /tmp/output

Disable bibliography reduction and figure renaming

latex2bundle path/to/main.tex --no-reduce-bib --no-rename-figures


---

## License

See `LICENSE`.

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

latex2bundle-0.1.4.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

latex2bundle-0.1.4-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file latex2bundle-0.1.4.tar.gz.

File metadata

  • Download URL: latex2bundle-0.1.4.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for latex2bundle-0.1.4.tar.gz
Algorithm Hash digest
SHA256 316fe68b9e46d2ba37bc8eab7753b4e4bbbd8f2a7b14f8b8f05a93bdf4aa907b
MD5 3af060625836c45c388d624e97fa7a3a
BLAKE2b-256 30b1be3b0f94af6cf48a82982abf89a082209d6e765ab91fa1c8b063e25eddc8

See more details on using hashes here.

File details

Details for the file latex2bundle-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: latex2bundle-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for latex2bundle-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cffccfe5109a0f563c02c1ea9e9df0a81ac327baeaa0890be09cd6359bcb8547
MD5 1034b5a425668cde8b9fb979d06f4fda
BLAKE2b-256 d4d50465a25382a6cab5a3cb3b23bd7119f8ba2d2f2194fc00dd96666325f176

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