https://github.com/fchauvel/flap
Flattening LaTeX projects
https://github.com/fchauvel/flap
flatten latex post-processing
Last synced: 11 months ago
JSON representation
Flattening LaTeX projects
- Host: GitHub
- URL: https://github.com/fchauvel/flap
- Owner: fchauvel
- License: gpl-3.0
- Created: 2015-08-12T19:12:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-30T15:02:09.000Z (almost 5 years ago)
- Last Synced: 2025-04-30T15:50:05.595Z (11 months ago)
- Topics: flatten, latex, post-processing
- Language: Python
- Homepage: https://fchauvel.github.io/flap
- Size: 543 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FLaP — Flat LaTeX Projects
[](https://pypi.python.org/pypi/FLaP)
[](http://www.gnu.org/licenses/gpl-3.0)
[](https://github.com/fchauvel/flap/actions)
[](https://codecov.io/gh/fchauvel/flap)
[](https://www.codacy.com/app/fchauvel/flap/dashboard)
[](https://pypistats.org/packages/flap)
FlaP is a simple utility that flattens LaTeX projects. It takes a
well-organised LaTeX project—one you so carefully crafted—and
merged it into a vulgar single LaTeX file in a 'flat' directory.
- *Why?* Some publishers require one such flat structure when you
submit the sources of your manuscript, and I got tired to flatten
the sources by hand.
- *Another one?* There already a couple of tools that merge latex
projects such as [latexpand](http://www.ctan.org/pkg/latexpand),
[flatex](http://www.ctan.org/pkg/flatex) or
[flatten](http://www.ctan.org/pkg/flatten). As far as I know, they
only merge TeX files, without moving graphics around. I learned
recently about
[texDirflatten](http://www.ctan.org/pkg/texdirflatten), which
seems to be an alternative, but I haven't tried it.
## Installation
FLaP *requires* Python 3 (3.6, 3.6, 3.8 and 3.9 are tested). The easiest way to install latest
official release is to use pip using:
```shell-session
$ pip install flap
```
Alternatively, you get the latest development version using:
```shell-session
$ pip install git+https://github.com/fchauvel/flap.git
```
Should you want to look at the code, you may download the sources
distribution and use
```shell-session
$ git clone https://github.com/fchauvel/flap.git
$ cd flap
$ python setup.py install .`
```
## Usage Example
For the newest (development) version, use:
```shell-session
$ flap project/main.tex output/directory
```
Prior to v0.4.1 (included), we invoke FLaP using:
```shell-session
$ python -m flap project/main.tex output/directory
```
See also the [online documentation](http://fchauvel.github.io/flap).
## Contact Us
If you give FLaP a try, please report any bugs, issues or feature request using the [issue tracker](https://github.com/fchauvel/flap/issues).