Skip to main content

Clean up your LaTeX files (fork of blacktex)

Project description

bluetex

Clean up your LaTeX files.

CI Coverage Status      Version: 0.6.2 Status: Beta      License: GPLv3 Python: >=3.12

Fork Notice

Bluetex is a fork of the original Blacktex project by Nico Schlömer. The original project moved to a non-public development style, so this fork was created to continue public development under the name "Bluetex" to avoid confusion with the original project.

  • Original author: Nico Schlömer (up to commit 9df96918bd9075ddd659a9e272e16c6426011e31, 2022-02-16)
  • Fork maintainer: David Völgyes (from 2025 onwards)
  • Original project: https://github.com/texworld/blacktex/

Bluetex is a command-line tool that helps with article editing in LaTeX. It removes all comments from a given file and corrects some common anti-patterns.

Usage

Run the package directly with uvx:

uvx bluetex in.tex > out.tex

For example, this 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
\]
(\textit{Pythogoras}),
and \(y = 2^n g\) with \(n = 1,\dots,10\), we have \(\frac{\Gamma}{2} = 8\).

You can use

uvx bluetex -i in0.tex in1.tex ...

to modify files in-place. See uvx bluetex --help for all options.

Pre-commit hooks

You can clean LaTeX files automatically before committing them to git.

repos:
- repo: https://github.com/dvolgyes/bluetex
  rev: v0.6.2
  hooks:
  - id: bluetex

The hook runs bluetex --in-place on staged .tex files.

License

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.

Source Distribution

bluetex-0.6.2.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bluetex-0.6.2-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file bluetex-0.6.2.tar.gz.

File metadata

  • Download URL: bluetex-0.6.2.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for bluetex-0.6.2.tar.gz
Algorithm Hash digest
SHA256 1839cf31a2a3c7318ad08a1e22bb662cb55ea635c83f734d64963dd0c922edfc
MD5 d9d3b6803dada33fe6463d61e97e3263
BLAKE2b-256 d8191878ccd13016d7e3ed96182854e2a182b95e4d1056ea4e755c89f383c33e

See more details on using hashes here.

File details

Details for the file bluetex-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: bluetex-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for bluetex-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 253a5fdad6eb68d14bd7f016a1e9c05300fd82447acd0fc3938f11b6639eeeaf
MD5 20c052feefe3d5d0e567a152ba1d3a58
BLAKE2b-256 894bd522c4c422cf7e7daba481d52e6b6361fb77a2331c264ee569ac19f2a8b5

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