Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tdegeus/texplain
Copy TeX-file and included figures to a separate (flattened) folder
https://github.com/tdegeus/texplain
formatter latex pre-commit python
Last synced: 4 days ago
JSON representation
Copy TeX-file and included figures to a separate (flattened) folder
- Host: GitHub
- URL: https://github.com/tdegeus/texplain
- Owner: tdegeus
- License: mit
- Created: 2017-02-17T13:02:11.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T08:33:59.000Z (8 months ago)
- Last Synced: 2024-10-13T22:35:28.978Z (23 days ago)
- Topics: formatter, latex, pre-commit, python
- Language: Python
- Homepage: https://texplain.readthedocs.io
- Size: 273 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![ci](https://github.com/tdegeus/texplain/workflows/CI/badge.svg)](https://github.com/tdegeus/texplain/actions)
[![Documentation Status](https://readthedocs.org/projects/texplain/badge/?version=latest)](https://texplain.readthedocs.io/en/latest/?badge=latest)
[![pre-commit](https://github.com/tdegeus/texplain/workflows/pre-commit/badge.svg)](https://github.com/tdegeus/texplain/actions)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/texplain.svg)](https://anaconda.org/conda-forge/texplain)**Documentation: [https://texplain.readthedocs.io](texplain.readthedocs.io)**
# Usage
## command-line
* [texindent](https://texplain.readthedocs.io/en/latest/tools.html#texindent):
Automatic indentation and formatting of a TeX-file.* [texcleanup](https://texplain.readthedocs.io/en/latest/tools.html#texcleanup):
Apply any of the following options to a TeX-file:- Remove all comments or comment-lines.
- Modify all occurrences of a command, for example to change `\TG{deleted}{inserted}` to `inserted`.
- Rename a label.
- Ensure common prefixes for all labels.
- Ensure usage of `\cref` instead of `\ref`.* [texplain](https://texplain.readthedocs.io/en/latest/tools.html#texplain):
Create a directory with a TeX-file and only its dependencies
(those figure-files and references that are actually included).
This is particularly useful to create a clean version to submit to a journal.## pre-commit
* [texcleanup](https://texplain.readthedocs.io/en/latest/tools.html#texcleanup):
```yaml
repos:
- repo: https://github.com/tdegeus/texplain
rev: v0.8.0
hooks:
- id: texcleanup
args: [--format-labels, --use-cleveref]
```* [texindent](https://texplain.readthedocs.io/en/latest/tools.html#texindent):
```yaml
repos:
- repo: https://github.com/tdegeus/texplain
rev: v0.8.0
hooks:
- id: texindent
args: []
```## Python
All of these tools wrap around a
[Python module](https://texplain.readthedocs.io/en/latest/module.html)
that you can use just as well!# Disclaimer
This library is free to use under the
[MIT license](https://github.com/tdegeus/texplain/blob/master/LICENSE).
Any additions are very much appreciated, in terms of suggested functionality, code, documentation,
testimonials, word-of-mouth advertisement, etc.
Bug reports or feature requests can be filed on [GitHub](https://github.com/tdegeus/texplain).
As always, the code comes with no guarantee.
None of the developers can be held responsible for possible mistakes.Download:
[.zip file](https://github.com/tdegeus/texplain/zipball/master) |
[.tar.gz file](https://github.com/tdegeus/texplain/tarball/master).(c - [MIT](https://github.com/tdegeus/texplain/blob/master/LICENSE)) T.W.J. de Geus (Tom) |
[email protected] |
www.geus.me |
[github.com/tdegeus/texplain](https://github.com/tdegeus/texplain)# Getting texplain
## Using conda
```bash
conda install -c conda-forge texplain
```## Using PyPi
```bash
python -m pip install texplain
```## From source
```bash
# Download texplain
git checkout https://github.com/tdegeus/texplain.git
cd texplain# Install
python -m pip install .
```