tex-fmt is a high-performance source code formatting utility written entirely in safe Rust for LaTeX documents. It automatically standardizes indentation, line wrapping, table alignment, and other formatting conventions. The application supports TEX, BIB, CLS, and STY files commonly used in LaTeX projects. Users can format individual documents or recursively process entire directory structures while respecting repository ignore patterns. Configurable TOML files allow developers to customize formatting preferences at project and user levels. Dedicated comments enable selective formatting exclusions for individual lines or code blocks. The utility supports formatting verification, standard stream processing, editor integrations, and automated quality checks through pre-commit hooks and GitHub Actions.
Features
- High-performance LaTeX source code formatting with automatic indentation and line wrapping
- Support for TEX, BIB, CLS, and STY document and configuration files
- Recursive directory formatting with Git-compatible file exclusion patterns
- Customizable formatting preferences through hierarchical TOML configuration files
- Selective formatting exclusions with automatic preservation of verbatim environments
- Formatting verification with editor integrations, pre-commit hooks, and GitHub Actions support