Typesetting Tools

tex-fmt – fast LaTeX formatter written in Rust

tex-fmt is a fast, opinionated command-line formatter for LaTeX source.

Written in safe Rust, it applies consistent indentation and line wrapping with little configuration, while retaining controls needed for automated checks and project-specific conventions.

This is free and open source software.

Key Features

  • Formats LaTeX-related .tex, .bib, .cls, and .sty files.
  • Applies structured indentation to environments, lists, equations, and other common LaTeX constructs.
  • Wraps long prose to a configurable target width, with separate minimum and maximum line-length settings.
  • Can format table environments by aligning ampersands and inserting appropriate line breaks.
  • Formats files in place, checks formatting without changing a file, or prints the proposed result to standard output.
  • Reads from standard input, making it straightforward to use in editor integrations, pipes, and scripted workflows.
  • Recursively discovers supported files and respects patterns in .gitignore and .ignore.
  • Uses TOML configuration at user, Git repository, or working-directory level; command-line arguments take precedence.
  • Lets users configure indentation width, tabs or spaces, custom list and verbatim environments, non-indented environments, and wrapping characters.
  • Supports line-level and block-level skip directives, and automatically leaves standard verbatim, listing, and minted environments untouched.
  • Provides check and fail-on-change modes suited to pre-commit hooks and continuous integration pipelines.
  • Generates shell completion scripts and a manual page directly from the command-line interface.
  • Offers native Linux binaries for x86-64, AArch64, and ARMv7, plus an Alpine Linux build.

Website: github.com/WGUNDERWOOD/tex-fmt
Support:
Developer: William George Underwood
License: MIT License

tex-fmt is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

LaTeX Tools
LyXThe power and flexibility of TeX/LaTeX with an intuitive graphical interface
KBibTeXReference management software primarily for BibTeX
TeXstudioFully featured open source LaTeX editor
VimTeXVim and Neovim filetype and syntax plugin
TeXmacsWYSIWYG mathematical text editor using TeX fonts
JabRefGraphical frontend to manage BibTeX databases
BiberBibTeX replacement for users of BibLaTeX
TeXmakerIntegrates many different tools
TectonicModernised, self-contained TeX and LaTeX engine
TeXworksSimple front-end modeled on TeXShop
Atom-LaTeXTypesetting with GitHub's Atom text editor
SiSUDocuments - structuring, publishing in multiple formats and search
KileKDE Integrated LaTeX Environment
BibLaTexProgrammable bibliographies and citations
Enter TeXIntegrated LaTeX Environment for the GNOME desktop
AUCTeXEnvironment for editing LaTeX, ConTeXt, docTeX, Texinfo, and TeX files
TexMathsLaTeX equation editor for LibreOffice
SetzerFull-featured LaTeX editor
GummiSimple LaTeX editor
TexLabCross-platform implementation of the Language Server Protocol for LaTeX
PybliographerTool for managing bibliographic databases
LaTeXDrawGraphical drawing editor for LaTeX
KLatexFormulaUseful utility for creating images from LaTeX equations
HieroglyphicFind LaTeX symbols
Hand TeXHandwritten LaTeX symbol classifier

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted