A command-line tool to flatten LaTeX projects into a single root directory for easy submission.
Project description
lateflat
lateflat is a command-line tool to flatten a LaTeX project into a single root directory, simplifying organization for project submission.
Features
- Merges all files in a LaTeX project into a single directory.
- Updates
\input
and\includegraphics
paths for compatibility in the flattened structure. - Supports easy integration into CI/CD pipelines for automated submission preparations.
Installation
Requires Python 3.7 or higher. Install using:
pip install lateflat
Usage
To flatten a LaTeX project (including the article file named main.tex):
lateflat <path_to_your_latex_project>
This will organize all files in <path_to_your_latex_project> into a single main article file along with supplementary files (such as images, .sty, .cls, and .bib) in a submission-ready directory.
Additionally, it can output a zipped version of the flattened project directory if needed, making it easy to submit as a single article file along with supplementary files.
Example Directory Structure
Assume your original LaTeX project structure is as follows:
project/
├── main.tex
├── sections/
│ ├── intro.tex
│ ├── methods.tex
│ └── results.tex
├── figures/
│ ├── fig1.png
│ └── fig2.png
│── custom.sty
│── formatting.cls
└── references.bib
After running lateflat project
, the structure will be flattened to:
project/
└──submit/
│ ├── main.tex # including contents of intro.tex, methods.tex and result.tex
│ ├── fig1.png
│ ├── fig2.png
│ ├── custom.sty
│ ├── formatting.cls
│ └── references.bib
└── other files
In this flattened structure, all files are moved to a single root directory (submit
), with \input
and \includegraphics
paths in main.tex
updated accordingly.
License
This project is licensed under the terms of the Apache License. See LICENSE for details.
Contributing
Feel free to contribute! Fork the repository, make a pull request, or open an issue to discuss potential features.
Contact
Maintainer: Nkzono99
Repository: GitHub - lateflat
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
File details
Details for the file lateflat-0.1.1.tar.gz
.
File metadata
- Download URL: lateflat-0.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a162aae156710e5a206b23507c70f07f631e98d6d20e7ba4f5a8c3d248ba5cc |
|
MD5 | 91988d9dfa69999f02af139169cee7fa |
|
BLAKE2b-256 | e1df94993bd73d00de48f980b28a748fa3b68de3777f4d78c4d6f927ec30533b |
File details
Details for the file lateflat-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: lateflat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4fcee2e29e730930178990310e5cca365c219adee5fe90631466586d09727ca |
|
MD5 | 5340e4a19d3e5ccba808739e11aa937c |
|
BLAKE2b-256 | c8fc2a2a1b30be86f10a452f8f0020b7c25524abb5a7baf97e45424cbe07dcfc |