Skip to main content

A simple tool to comment out packages not used in a latex document

Project description

stygtfo

A simple tool to comment out packages not used in a latex document.

Why? Because I usually experiment with packages a lot and in the end I don't use them all, but it's basically impossible to know which ones I don't use.

This pacakge compiles the document with every package commented out one by one, and compares the expected pdf output with the actual pdf output. If the pdf output is the same, the package is determined not used and commented out.

This package is not tested basically at all, and I only used tectonic to test it (beacuse the others are slow and don't garantee the packages are installed). It might not work with other engines. In fact, it probably won't. Maybe in the future I'll update it, but I doubt it. Fell free to fork it and make PRs.

Usage

stygtfo <pathToTexFile> [--output <outputfile>] [--engine <pathToEngine>] [--verbose <bool>] [--args <argsToPassToEngine>] [--temp <pathToTempDir>]

Currently, the --args option is not implemented, if some interest is shown I'm free to do it.

import stygtfo
stygtfo.CheckUnusedPackages("path/to/file.tex", "path/to/engin", usedPackages=None, resultedPath=None, verbose=False, pathToTemp=None)

Installation

pip install --user stygtfo

You will need the same requirements as diff-pdf-visually, which on Windows is ImageMagick and Poppler. You can get them on chocolatey too.

I don't know if the --user flag is actually needed, but I had some problems with it, so I recommend using it (except if you're installing it in a virtualenv).

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

stygtfo-0.1.0.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

stygtfo-0.1.0-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page