Skip to main content

Cleans up your LaTeX files

Project description


Clean up your LaTeX files.

PyPi Version Packaging status PyPI pyversions GitHub stars PyPi downloads

gh-actions codecov LGTM Code style: black

blacktex is a little tool, helping with the article editing for LaTeX. It removes all comments from a given file and corrects some common anti-patterns. For example, with

blacktex in.tex out.tex

the input file

Because   of $$a+b=c$$ ({\it Pythogoras}),
% @johnny remember to insert name
and $y=2^ng$ with $n=1,...,10$, we have ${\Gamma \over 2}=8.$

is converted to

Because of
a+b = c
and $y = 2^n g$ with $n = 1,\dots,10$, we have $\frac{\Gamma}{2} = 8$.


blacktex is available from the Python Package Index, so with

pip install -U blacktex

you can install/upgrade.


To run the tests, simply check out this repository and run



This software is published under the GPLv3 license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for blacktex, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size blacktex-0.3.1-py3-none-any.whl (18.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size blacktex-0.3.1.tar.gz (20.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page