badness-format(1)

πŸ“¦ version 0.28.0, in nixpkgs unstable

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; 0 disables width-based wrapping. That 0 is 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 step
    • none β€” align continuations with the \item command
  • --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 width
    • preserve β€” 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 bodies
    • single-line β€” never insert breaks; a long body overflows the line width
    • break β€” 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 any exclude/extend-exclude from badness.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