Extract sections from TeX and create TeX documents.
Project description
TeX Extractor
A CLI tool to extract specific sections from a TeX document and format them as a new document.
Installation
Available from PyPi, you can install by running:
pip install tex_extractor
Example Use Case
Let's say we have taken notes for a particular subject in a document measure-theory/measure-theory.tex. You may want to revise all of the definitions for the course, so you can run
texextract measure-theory measure-definitions --section definition --title "Measure Theory Definitions"
This will output a document measure-definitions/measure-definitions.tex which contains only the definitions.
You can specify multiple sections, e.g.
texextract measure-theory measure-theorems --section theorem --section lemma --section proposition --title "Measure Theory Theorems"
API Reference
╰─❯ texextract --help
Usage: texextract [OPTIONS] [INPUT] [OUTPUT]
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────╮
│ input [INPUT] Path to input .tex file or to its parent folder │
│ output [OUTPUT] Output file path. This can be a path to a .tex file, or a folder │
│ name. The output is a folder unless --file-only is passed. │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────╮
│ --title -t TEXT If given, overrides the title of the input document. │
│ --author -a TEXT If given, overrides the author of the input document. │
│ --section -s TEXT Name of the environment to be picked out. Can be given │
│ multiple times. │
│ --file-only -F The output .tex file is not wrapped in a folder. │
│ --strict -S Do not tolerate invalid .tex input. │
│ --force -f Ovewrite an existing .tex file. │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or │
│ customize the installation. │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
Project details
Release history Release notifications | RSS feed
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 tex_extractor-1.0.2.tar.gz.
File metadata
- Download URL: tex_extractor-1.0.2.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff47c3ad5af5b88efdaf55a59d0ca593c3dccb91104be16f267c4f01658dc805
|
|
| MD5 |
ff4797ba99e3a37b99e9e0643ca1a195
|
|
| BLAKE2b-256 |
d834559f539179ed8a52626d0c2cc585dba0676cbc612b48ef728e43b33971dc
|
File details
Details for the file tex_extractor-1.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: tex_extractor-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d7cb5301a6f61d7321a4096689be6c63a28b522a2fe3465ef7011d4d26200e
|
|
| MD5 |
46ee5bd6128919284852465f98825d1d
|
|
| BLAKE2b-256 |
e05fbdd3c97767dae4e0c584f9d87304ccff30101262ca03300bb7d643f4c15b
|