Skip to main content

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


Download files

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

Source Distribution

lateflat-0.1.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

lateflat-0.1.3-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file lateflat-0.1.3.tar.gz.

File metadata

  • Download URL: lateflat-0.1.3.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for lateflat-0.1.3.tar.gz
Algorithm Hash digest
SHA256 050fe0627d85d557879ff249e36bc69042e30651e8014a71826fb84131983e3c
MD5 89c859d0af0dcceeb562212dbfa386d9
BLAKE2b-256 68620fb1abe213c1f1875db4039b3c0b6fd806d101966ce2fb57f92782ada82a

See more details on using hashes here.

File details

Details for the file lateflat-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: lateflat-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for lateflat-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a832f30649d9940edbe98c731f3edccb880cced23f2754bac696df50eb137a
MD5 a0182e9205faf576c6d6be1e2a14a329
BLAKE2b-256 1a55ae2ac605ad3c4304199ac04ebc00a4019c2267ff5fa3ed735c8f05528a96

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