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.3.tar.gz (12.9 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.3-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: latex2bundle-0.1.3.tar.gz
  • Upload date:
  • Size: 12.9 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.3.tar.gz
Algorithm Hash digest
SHA256 91e91169abeccf407f7b1f9f6934891a6a8e8f18a6e45dd0c174f0e09f37ab86
MD5 a9dc8635d9985cb62b3fca4f818a0960
BLAKE2b-256 d3892d1774370027c717586fd5291a65e926a26baf066438157dc42afcd771c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: latex2bundle-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 617a11972797a97a6eedb5eef2df8d67c4597625bcce83b6cdc4fd95315ba649
MD5 9e2a8c6151fd52342c0d45bc15554b6e
BLAKE2b-256 85e97fc52aa3b4750800dcb41f2a9d0dc5a791a40141f129b03d67e295351d28

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