Skip to main content

Zaphod

A LaTeX change tracking tool.

GPLv3 Licensed Releases Issues

The name

Zaphod Beeblebrox is a fictional character in the various versions of the humorous science fiction story The Hitchhiker’s Guide to the Galaxy by Douglas Adams.

The tool

A wrapper around latexdiff that recursively checks changes in LaTeX sources between two Git revisions and generates a nice annotated PDF in a new Git branch. This Git branch sits on top of the newer revision - after one has accepted/rejected changes, one can remove the annotations and simply commit and merge to the master branch - a nice workflow.

It is rather simple at the moment and probably has heaps of issues. Feel free to modify it to suit your purposes and open pull requests.

Here is a test repository with LaTeX sources and a resultant latexdiff-annotated branch to play with: https://github.com/sanjayankur31/latex-changes

Usage

usage: zaphod [-h] {revise,diff,clean} ...

positional arguments:
  {revise,diff,clean}  additional help
    revise             Interactive revision
    diff               Generate changes output
    clean              Clean up Zaphod related branches

optional arguments:
  -h, --help     View subcommand help

NOTES:
    The idea of this program is to help LaTeX users track, review, and
    see changes that have been made in their source files. The script
    only works when git is used as a version control system.

Expected workflow:
    - Make changes, commit
    - Run this program:
        It will generate a pdf with differences between the two
        provided Git revisions using latexdiff. It will also commit the
        annotated TeX sources in a new Git branch called "changes".
        - Review commits using generated PDF.
        - Accept/ignore changes.
        - Commit once finished.
        - Merge to master branch.
        - Profit.

Requires:
    - latexdiff
    - Git
    - pdflatex
    - latexmk
    - bibtex or biber
    - Python3


Subcommand: 'revise'
usage: zaphod revise [-h] [-m MAIN] [-s SUBDIR]

optional arguments:
  -h, --help            show this help message and exit
  -m MAIN, --main MAIN  Name of main file. Only used to generate final pdf
                        with changes.
                        Default: main.tex
  -s SUBDIR, --subdir SUBDIR
                        Name of subdirectory where main file resides.
                        Default: .
  -c, --citations       Document contains citations. Will run pdflatex and
                        bibtex as required. Default: False

TIP: To accept all - switch to rev2 branch/revision.
TIP: To reject all - switch to rev1 branch/revision.
Yay! Git!

Subcommand: 'diff'
usage: zaphod diff [-h] [-r REV1] [-t REV2] [-m MAIN] [-s SUBDIR] [-l LATEXDIFFOPTS] [-c]

optional arguments:
  -h, --help            show this help message and exit
  -r REV1, --rev1 REV1  First revision to diff against
  -t REV2, --rev2 REV2  Second revision to diff with.
  -m MAIN, --main MAIN  Name of main file. Only used to generate final pdf
                        with changes. Default: main.tex

  -s SUBDIR, --subdir SUBDIR
                        Name of subdirectory where main file resides.
                        Default: .

  -l LATEXDIFFOPTS, --latexdiffopts LATEXDIFFOPTS
                        Pass options to latexdiff. Please read man
                        latexdiff for available options. These must be
                        enclosed in single quotes to ensure they are passed
                        to latexdiff without any processing.
                        Default: --type=UNDERLINE

  -c, --citations       Document contains citations. Will add -bibtex to
                        latexmk.
                        Default: True


Subcommand: 'clean'
usage: zaphod clean [-h] [-y]

optional arguments:
  -h, --help  show this help message and exit
  -y, --yes   Assume yes Please be careful when using this option. Default: False

Metadata

Release files for zaphodtex 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zaphodtex 0.7.0
File Size Uploaded Provenance Actions
zaphodtex-0.7.0.tar.gz 23.8 kB Without provenance Details for zaphodtex-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zaphodtex 0.7.0
File Interpreter ABI Platform Actions
zaphodtex-0.7.0-py3-none-any.whl Python 3 none any Details for zaphodtex-0.7.0-py3-none-any.whl

Total release size: 46.8 kB

Release files / zaphodtex-0.7.0.tar.gz

Download URL zaphodtex-0.7.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cdecb122a078f17a4cdf13a9264c956c4970f3bc62efddfd14f8bded95702ee6
BLAKE2b-256 checksum
How to use checksums
9c98b5588753bd801e922a14c0a64c10257b00fb3c0fdc288a56df096f136723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / zaphodtex-0.7.0-py3-none-any.whl

Download URL zaphodtex-0.7.0-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3731335ea2955bebdff8a34a0568fb24a4cca482454313778a46b2d7cd9c4fbf
BLAKE2b-256 checksum
How to use checksums
ffbef1d0c70d28db92a393d4f969f5a6d7578c3ea6f1dc4e5b41b039faf1b4d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for zaphodtex 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page