Skip to content
Cleans up your LaTeX files.
Python Makefile TeX
Branch: master
Clone or download
Latest commit 1764236 Sep 3, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci circleci: separate lint and build Aug 7, 2019
blacktex version, status bump Aug 7, 2019
logo add logo file Aug 7, 2019
.flake8 first rule + test Jun 13, 2018
.gitignore first rule + test Jun 13, 2018
Makefile no universal upload Aug 7, 2019 add gh-actions Sep 3, 2019
codecov.yml initial import Jun 13, 2018


Clean up your LaTeX files.

CircleCI codecov Code style: black PyPi Version GitHub stars PyPi downloads

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



blacktex is published under the MIT license.

You can’t perform that action at this time.