# cmhughes/latexindent.pl

Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.

Repository: https://github.com/cmhughes/latexindent.pl
Canonical: https://ross.abutalabs.com/products/latexindentpl
Language: TeX
License: GPL-3.0
License Family: copyleft
Topics: latex, beautify, beautifier, perl, yaml, formatter
Last push: 2026-08-13T09:44:31+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 75, longevity 100
- inputs: {"age_days": 5118, "days_push": 20, "days_rel": 88, "gap_med": 49, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1057, forks 82 (observed 2026-08-28T04:03:24.769537+00:00)

## What it is
latexindent.pl is a Perl script that beautifies, tidies, and indents LaTeX source files by adding leading horizontal space to code blocks. It supports line break modification, text wrapping, delimiter alignment, regex-based replacements, and is highly customizable via a YAML interface.

## Use cases
- format and indent my latex files
- beautify .tex .sty and .cls source code
- add indentation to latex environments and commands
- wrap long lines in latex documents
- one sentence per line formatting for latex
- align delimiters in latex tables and environments
- integrate latex formatting into pre-commit hooks

## When to choose
- you write or maintain LaTeX documents and want consistent indentation
- you need customizable formatting rules via YAML
- you want automated LaTeX formatting in CI or pre-commit workflows

## When to avoid
- you need formatting for markup languages other than LaTeX
- you cannot run Perl or use the provided Docker/Conda distributions

## Facets
- artifact type: cli-tool
- maturity: active
- function: formatter, cli
- domain: text-editors, developer-tools, documentation
- platform: cli, cross-platform
- tags: latex, beautifier, perl, yaml-configuration, pre-commit, text-wrapping, docker

## Member repositories
- cmhughes/latexindent.pl (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:24.769537+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:57:56.493050+00:00, confidence not recorded.
  - readme: https://github.com/cmhughes/latexindent.pl (fetched 2026-08-28T04:03:24.769537+00:00, sha b6586ab8826f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
