badness-format(1)
okay so bestie, welcome to the <pink>badness-format</pink> glow-up page from the General Commands Manual πΈβ¨ this is the one that formats LaTeX source, and weβre gonna go through every flag like itβs a group-chat receipts drop. no skips, no cap π
π NAME π
badness-format β format LaTeX source. iconic behavior, honestly π
β¨ SYNOPSIS β¨
badness format [--check] [--stdin-filepath] [--line-width]
[--indent-width] [--item-indent] [--wrap] [--math-wrap] [--line-ending]
[--exclude] [--force-exclude] [-h|--help] [-V|--version] [PATHS]
π¦ DESCRIPTION π¦
Format LaTeX source. Thatβs the whole job, and it eats.
With paths, it formats each file in place β like, right there on disk, bestie π Reads stdin (to stdout) when given -, or when paths are omitted and stdin is not a terminal. So - is literally your stdin pass-through moment, periodt.
π OPTIONS π
--checkβ report which files would change without writing them. Exits non-zero if any file is not already formatted. Requires path arguments: there is no file on disk to report on when reading stdin. Lowkey the βlook, donβt touchβ vibe check π₯--stdin-filepath <PATH>β name the stdin buffer so its language is dispatched by extension (.bibβ BibTeX, anything else β LaTeX). No file is read or written; only the extension is used. Ignored when paths are given. So itβs literally just for the extension, bestie π«Ά--line-width <LINE_WIDTH>β maximum line width before the formatter breaks a line;0disables width-based wrapping. That0is the no-wrap button, iykyk β¨--indent-width <INDENT_WIDTH>β number of spaces per indent step. Cute little staircase behavior π--item-indent <ITEM_INDENT>β how to indent continuation lines in list items. Possible values:hangβ align continuations under the body following a bare\item(default)indentβ indent continuations by one indent-width stepnoneβ align continuations with the\itemcommand
--wrap <WRAP>β how to lay out line breaks inside a paragraph. Possible values:reflowβ greedy fill: wrap words to the line width (default)stableβ preserve acceptable authored breaks and rebalance only nearby text (revision-stable wrapping)sentenceβ one sentence per line (line width ignored)semanticβ semantic line breaks (sembr.org): keep authored breaks, add sentence breaks, and wrap overlong lines to the line widthpreserveβ leave authored line breaks untouched
--math-wrap <MATH_WRAP>β how to lay out line breaks inside display math. Possible values:autoβ derive from the effective wrap mode:preserveβpreserve, else break (default)preserveβ keep authored line breaks inside display-math bodiessingle-lineβ never insert breaks; a long body overflows the line widthbreakβ break a too-long body before its top-level operators (amsmath style)
--line-ending <LINE_ENDING>β how to spell the line breaks in the formatted output. Possible values:autoβ keep the endings the file was written with (default)lfβ always LF (\n)crlfβ always CRLF (\r\n)nativeβ the platformβs convention: CRLF on Windows, LF elsewhere
--exclude <PATTERN>β gitignore-style pattern to skip during directory discovery (repeatable). Added on top of anyexclude/extend-excludefrombadness.toml. Repeatable means you can stack them, bestie π--force-excludeβ apply exclude patterns to files named explicitly on the command line too (they are normally always processed). For runners like pre-commit that pass staged files as arguments. This is the βyes, even those filesβ button π-h,--helpβ print help (see a summary with-h). Iconic, obviously.-V,--versionβ print version.[PATHS]β files or directories to format. Pass-for stdin, which is also read when paths are omitted and stdin is not a terminal. The-is literally the stdin main character π
π VERSION π
v0.28.0 β periodt.
π₯ SEE ALSO π₯
badness(1), badness-lint(1), badness-parse(1), badness-lsp(1), badness-inverse-search(1), badness-init(1), badness-debug(1) β go read the whole friend group, bestie π
thatβs the page, mwah π β source/version format 0.28.0, and the footer date stamp is badness-format(1) π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: badness 0.28.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms