LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

tex-fmt

Fast LaTeX source code formatter

TLDR

Format file
$ tex-fmt [document.tex]
copy
Format in place
$ tex-fmt -w [document.tex]
copy
Check formatting
$ tex-fmt --check [document.tex]
copy
Format from stdin
$ cat [document.tex] | tex-fmt
copy
With config
$ tex-fmt -c [tex-fmt.toml] [document.tex]
copy

SYNOPSIS

tex-fmt [-w] [--check] [-c config] [options] files

DESCRIPTION

tex-fmt is a fast LaTeX source code formatter written in Rust that standardizes indentation and whitespace in .tex files. It ensures consistent formatting across documents and teams by applying configurable indentation rules to LaTeX environments, commands, and structures.The -w flag writes changes in place, while --check mode verifies formatting without modifying files, making it suitable for CI pipelines. Configuration can be provided via a TOML file to customize indentation width, tab handling, and other style preferences.

PARAMETERS

-w

Write in place.
--check
Check only.
-c FILE
Config file.
--stdin
Read stdin.
--tabsize N
Tab size.

INSTALL

sudo apt install tex-fmt
copy
brew install tex-fmt
copy
nix profile install nixpkgs#tex-fmt
copy

CAVEATS

LaTeX specific. May break manual formatting. Test before use.

HISTORY

tex-fmt is a fast LaTeX formatter written in Rust for consistent document formatting.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid