Skip to main content

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

Metadata

Release files for lateflat 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lateflat 0.1.3
File Size Uploaded Provenance Actions
lateflat-0.1.3.tar.gz 8.5 kB Without provenance Details for lateflat-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lateflat 0.1.3
File Interpreter ABI Platform Actions
lateflat-0.1.3-py3-none-any.whl Python 3 none any Details for lateflat-0.1.3-py3-none-any.whl

Total release size: 20.5 kB

Release files / lateflat-0.1.3.tar.gz

Download URL lateflat-0.1.3.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
050fe0627d85d557879ff249e36bc69042e30651e8014a71826fb84131983e3c
BLAKE2b-256 checksum
How to use checksums
68620fb1abe213c1f1875db4039b3c0b6fd806d101966ce2fb57f92782ada82a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / lateflat-0.1.3-py3-none-any.whl

Download URL lateflat-0.1.3-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6a832f30649d9940edbe98c731f3edccb880cced23f2754bac696df50eb137a
BLAKE2b-256 checksum
How to use checksums
1a55ae2ac605ad3c4304199ac04ebc00a4019c2267ff5fa3ed735c8f05528a96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for lateflat 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page