Skip to main content

A small library and API for LaTeX organization

Project description

Parse and index LaTeX files

PyPI Python 3.11 Build Status

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 \usepackage to 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.

License

MIT License

Copyright (c) 2024 - 2025 Paul Landes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zensols.latidx-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file zensols.latidx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zensols.latidx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for zensols.latidx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae4af1415200a910e1464cb9647e0e7efc220ebc069109c9ef01660605390bd5
MD5 a3b7fc6104369b13a680cc0d174c882f
BLAKE2b-256 28eba27b74eb46e90b471f506132601ec61fccc7d07370e4a66f9477861767d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page