Parse and index LaTeX files
This library parses and indexes includes and macros in latex files. This package can be used as a command line tool or an API. The following are parsed and reported:
- Package imports using
\usepackageto create dependency trees. - Macro defined with
\newcommand.
Documentation
See the full documentation. The API reference is also available.
Obtaining
The library can be installed with pip from the pypi repository:
pip3 install zensols.latidx
Usage
This package can be used as a command line tool or an API.
Command Line
To get the dependencies of a LaTeX project (in this case using the test case project for the example), use
latidx deps test-resources/proj
Output:
root
+-- child.sty
+-- root.tex
+-- child.sty
+-- orphan.sty
API
>>> from pathlib import Path
from pathlib import Path
>>> from zensols.latidx import LatexIndexer, ApplicationFactory
from zensols.latidx import LatexIndexer, ApplicationFactory
>>> idx: LatexIndexer = ApplicationFactory.get_indexer()
idx: LatexIndexer = ApplicationFactory.get_indexer()
>>> proj = idx.create_project((Path('test-resources') / 'proj',))
proj = idx.create_project((Path('test-resources') / 'proj',))
>>> proj.write()
proj.write()
files:
path: test-resources/proj/root.tex
usepackages:
child @ 16
orphan @ 46
newcommands:
rootcmd @ 90
...
Changelog
An extensive changelog is available here.
Community
Please star this repository and let me know how and where you use this API. Contributions as pull requests, feedback, and any input is welcome.
License
Copyright (c) 2024 - 2026 Paul Landes
Metadata
Release files for zensols-latidx 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zensols_latidx-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for zensols_latidx-0.2.0-py3-none-any.whl |
Release files / zensols_latidx-0.2.0-py3-none-any.whl
| Download URL | zensols_latidx-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2531c03e4c29a6ca143a592a9b5e4c869482f0bb497308d8a338c8805b6403dc
|
|
BLAKE2b-256 checksum How to use checksums |
fdbbcfbd46e928c5b2df0f67e92ef4d948b7dfeeabb3eff1511e9bc568262b05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for zensols-latidx 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.