Python port of the xindy (flexible index) processor.
Project description
PyXindy (Python port of xindy)
Python reimplementation of xindy, the flexible index processor originally written in CLISP. PyXindy aims to be a drop-in replacement where the original xindy is difficult to install or integrate (for example with Tectonic or minimal TeX setups).
Background and history
- makeindex: introduced in 1987 by Pehong Chen, bundled with TeX distributions through the late 1980s and 1990s as the default indexer for LaTeX. It remains widely available in TeX Live and MiKTeX.
- xindy: created in the mid-1990s (first public releases in 1996) by Joachim Schrod to handle multilingual indexing, flexible sort rules, and markup targets beyond TeX (SGML/HTML). Version 2.x has shipped with TeX Live since the early 2000s.
Together they form a decades-old toolchain; PyXindy keeps the mature behavior while modernizing the implementation and packaging.
Why PyXindy port
- Easier installation: pure-Python stack, no CLISP dependency, plays nicely with
uv,pip, and containerized CI. - Better integration: Tectonic and other minimal TeX environments can use xindy-like features without installing a full TeX Live.
- Maintainability: Python codebase lowers the barrier for contributors and makes testing/CI straightforward.
- Extensibility: reuses the historical xindy modules/styles while making it simpler to experiment with new features or diagnostics.
Usage
lualatex document.tex
uv run xindy -M path/to/style.xdy -o document.ind document.raw
lualatex document.tex
Quick commands
-
Generate an index from
.rawwith a.xdystyle:uv run xindy-py -M path/to/style.xdy -o output.ind path/to/index.raw
-
Convert a TeX
.idxfile to.raw:uv run texindy-py path/to/input.idx -o output.raw
-
Use the makeindex-compatible interface:
uv run makeindex-py path/to/input.idx -o output.ind -t output.ilg -c
Entry points
xindy-py: core processor; reads.rawplus.xdystyle and renders the formatted index.texindy-py: TeX converter; turns.idxinto.rawsuitable for xindy processing.makeindex-py: makeindex-compatible wrapper layered on the xindy engine; accepts common-c/-l/-o/-tflags.makeglossaries-py: glossaries helper; inspects LaTeX.auxto drivemakeindex-py/xindy for glossary files.
Historical xindy modules/styles (vendor/xindy-2.1/modules) are resolved automatically via require. The wrapper makeindex-py supports the usual -l/-c/-o/-t flags.
xindy CLI
uv run xindy-py [-M style.xdy] [-o output.ind] [-L searchpath] [-C encoding] [-l logfile] [-t] input.raw
-M/--module/--style:.xdystyle to use (defaults to<raw>.xdy)-o/--output: output target (stdoutif omitted)-L/--searchpath: extra search paths forrequire(merged withXINDY_SEARCHPATH)-C/--codepage: output encoding (default: utf-8)-l/--log: write a brief log file-t/--trace: show Python tracebacks on errors
tex2xindy
uv run texindy-py input.idx -o output.raw --input-encoding latin-1 --output-encoding utf-8
- Handles hierarchies
!, display@, encap|, basic TeX macros/escapes, crossrefssee{target}→:xref. - Emits
:tkeywhen the displayed form differs from the sort key.
makeindex4
uv run makeindex-py input.idx -o output.ind -t output.ilg [-c] [-l]
-c: compress spaces in keys (makeindex behavior)-l: ignore spaces for sorting (addssort-rule " " "")--debug: print tracebacks; otherwise errors are summarized and written to the.ilglog- Generates a temporary style, detects attributes/crossrefs, loads
tex/makeidx4.xdy.
Examples
-
Replay a historical fixture:
uv run xindy-py -M vendor/xindy-2.1/tests/ex1.xdy \ -o /tmp/ex1.ind vendor/xindy-2.1/tests/ex1.raw
-
Chain
.idx → .indin one command:uv run makeindex-py vendor/xindy-2.1/tests/infII.idx -o /tmp/infII.ind
Development
-
Create a virtual environment and install dependencies:
uv sync --extra dev # or: pip install -e .[dev]
-
Run tests and linters:
uv run pytest uv run ruff check
-
Smoke-test the binary:
python -m xindy --version
The roadmap is tracked in PLAN.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyxindy-0.0.4.tar.gz.
File metadata
- Download URL: pyxindy-0.0.4.tar.gz
- Upload date:
- Size: 51.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0522b898950e2eaa71a78e68c2d20f27d6e5d463b94eb73c204db03467048334
|
|
| MD5 |
d01ec0fd27b1fa4ae0c4727bea7fe964
|
|
| BLAKE2b-256 |
831087cbd9cb1e9db4a0540bf027ad8c428a6a1a7718ab8bc82be97d63d1d7bd
|
Provenance
The following attestation bundles were made for pyxindy-0.0.4.tar.gz:
Publisher:
ci.yml on yves-chevallier/pyxindy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyxindy-0.0.4.tar.gz -
Subject digest:
0522b898950e2eaa71a78e68c2d20f27d6e5d463b94eb73c204db03467048334 - Sigstore transparency entry: 768345137
- Sigstore integration time:
-
Permalink:
yves-chevallier/pyxindy@3311b9ea8ee54861d2c91176485c48b20aa8988d -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/yves-chevallier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3311b9ea8ee54861d2c91176485c48b20aa8988d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyxindy-0.0.4-py3-none-any.whl.
File metadata
- Download URL: pyxindy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 69.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3494c940005079134631a3276a10626906cc5a31c9b73ba84e6e4f4cb5619245
|
|
| MD5 |
5fb4beae54212cb42e675d7d5cbbb04e
|
|
| BLAKE2b-256 |
1893706e5b52f09d590dcc93cd7b6ec787b8a7a19b276c8aea71dd41957252c8
|
Provenance
The following attestation bundles were made for pyxindy-0.0.4-py3-none-any.whl:
Publisher:
ci.yml on yves-chevallier/pyxindy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyxindy-0.0.4-py3-none-any.whl -
Subject digest:
3494c940005079134631a3276a10626906cc5a31c9b73ba84e6e4f4cb5619245 - Sigstore transparency entry: 768345140
- Sigstore integration time:
-
Permalink:
yves-chevallier/pyxindy@3311b9ea8ee54861d2c91176485c48b20aa8988d -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/yves-chevallier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3311b9ea8ee54861d2c91176485c48b20aa8988d -
Trigger Event:
push
-
Statement type: