# 使用 Homebrew, scoop 安装 latexindent

查看 latexindent 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:latexindent
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install latexindent
```

  证据: local Homebrew formula metadata

### Windows

- Scoop (92%):

```sh
scoop install main/latexindent
```

  证据: Scoop official bucket manifest trees: bucket/latexindent.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:latexindent
- **软件包管理器:** Homebrew
- **版本:** 4.0.2
- **来源摘要:** Add indentation to LaTeX files
- **主页:** <https://latexindentpl.readthedocs.io>
- **仓库:** <https://github.com/cmhughes/latexindent.pl>
- **最后更新:** 2026-06-06T14:21:31Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- latexindent (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 4.0.2
## 项目历史与用法

latexindent.pl is a Perl formatter for LaTeX, TeX-adjacent, and BibTeX-style source files. It adds indentation, aligns delimiters, modifies line breaks, wraps text, and supports user customization through YAML settings.

### 项目历史

The GitHub repository was created on 2012-08-28. CTAN lists Chris Hughes as maintainer, and the project README identifies the package as `latexindent.pl`, a Perl script to beautify, tidy, format, and indent code within environments, commands, headings, and special code blocks.

The project evolved from indentation into a broader source-formatting tool. The README documents delimiter alignment, line-break modification, text wrapping, one-sentence-per-line handling, string and regex replacements, Conda, Docker, and pre-commit support.

The 2026 V4.0 changelog records a major overhaul of how `latexindent.pl` finds code blocks, with user-setting changes and performance and interaction improvements. CTAN records version 4.0.2 dated 2026-06-06.

### 采用历史

latexindent.pl is distributed through CTAN and is included in TeX Live and MiKTeX. Homebrew packages it as `latexindent`, and the upstream README documents standalone executables for Windows, Ubuntu Linux, and macOS, along with Conda, Docker, and pre-commit workflows.

Its adoption tracks the rise of formatter expectations in developer tooling: LaTeX authors increasingly want editor, CI, and pre-commit formatting support similar to language formatters such as gofmt, Black, or Prettier.

### 使用方式

Users run `latexindent.pl myfile.tex` for a default formatting pass, often with `-l` to load YAML settings, `-o` to write a separate output file, or pre-commit hooks to format files during Git workflows. The documentation emphasizes testing output carefully before overwriting important documents.

### 为什么软件包爱好者会关心

latexindent.pl is package-nerd significant because it brings modern formatter ergonomics to TeX source: reproducible layout, YAML configuration, editor integration, pre-commit hooks, and CI-friendly command-line behavior.

It also has a packaging wrinkle maintainers care about: despite the Homebrew formula name `latexindent`, the upstream executable and documentation consistently center `latexindent.pl` and its Perl module/settings bundle.

### 时间线

- 2012-08-28: GitHub repository created.
- 2022-01-21: CTAN announcement recorded version 3.15.
- 2026-03-15: V4.0 released as a major code-block-detection overhaul.
- 2026-06-06: V4.0.2 released.
- 2026-06-08: CTAN announced the 4.0.2 update.

### Related projects

- Related projects and platforms include CTAN, TeX Live, MiKTeX, latexindent.pl's Read the Docs documentation, pre-commit, Conda, Docker, and editor or CI workflows that enforce TeX source formatting.

### 来源

- <https://api.github.com/repos/cmhughes/latexindent.pl>
- <https://api.github.com/repos/cmhughes/latexindent.pl/tags?per_page=20>
- <https://ctan.org/pkg/latexindent?lang=en>
- <https://latexindentpl.readthedocs.io/en/latest/sec-introduction.html>
- <https://raw.githubusercontent.com/cmhughes/latexindent.pl/main/documentation/changelog.md>
- <https://raw.githubusercontent.com/cmhughes/latexindent.pl/main/readme.md>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/indentconfig.yaml, ~/.indentconfig.yaml, localSettings.yaml in the target file directory, current working directory
## 其他软件包管理器记录

- Scoop - main/latexindent: normalized package name match | Scoop official bucket manifest trees: bucket/latexindent.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/latexindent.yml](https://github.com/mxcl/pkgdb/blob/main/combined/latexindent.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
