Skip to main content

LaTeX Subfigs Combiner

Python script for combining LaTeX figures composed of subfigures


What

This package provides a simple Python script for combining LaTeX figures composed of subfigures into single PDF files, i.e. one PDF per composite figure.

Why

If you have ever tried to publish on scientific journals, you have probably encountered at least one journal that either does not accept LaTeX subfigures or will combine your composite figures during production with a very high chance of making a mess (both scenarios are completely unreasonable, but yet they happen sometimes). Of course, you really like those shiny composite LaTeX figures and do not want to waste time painstakingly stitching them together by hand (e.g. using Inkscape). This Python script provides an hands-free automated solution to this problem.

How

The job is done by parsing the given TeX file, extracting the preamble, setting the page style to empty, extracting the figure environments that contain subfigures, compiling to a PDF via latexmk, and then crop each figure to a separate PDF file using pdfcrop.


Installation

Easy peasy via pip or equivalent

pip install latex-subfigs-combiner

Usage

In a terminal, simply run combine-subfigs on your LaTeX main file

combine-subfigs /path/to/my/awesome/paper.tex

This will produce all the composite figures in a directory named composite-figures at the location you called the script from.

By default, the output figures will be named as fig_1.pdf, fig_2.pdf, etc. If you want to change the output directory or the filename prefix fig_ of the figures, you can use the optional arguments --target_dir and --prefix, respectively. Execute combine-subfigs -h for more details.


Tips are welcomed! :love_you_gesture:

If you found this useful, feel free to offer me a beer :beer: via PayPal or send me a few sats :zap:.

Metadata

Release files for latex-subfigs-combiner 1.0.0

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

Source distribution (sdist)

Source distribution for latex-subfigs-combiner 1.0.0
File Size Uploaded Provenance Actions
latex-subfigs-combiner-1.0.0.tar.gz 5.0 kB Without provenance Details for latex-subfigs-combiner-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for latex-subfigs-combiner 1.0.0
File Interpreter ABI Platform Actions
latex_subfigs_combiner-1.0.0-py3-none-any.whl Python 3 none any Details for latex_subfigs_combiner-1.0.0-py3-none-any.whl

Total release size: 10.5 kB

Release files / latex-subfigs-combiner-1.0.0.tar.gz

Download URL latex-subfigs-combiner-1.0.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
da3393b9e8e60668aed319a7e336054438197eac68529ae44fc5ba83763ec553
BLAKE2b-256 checksum
How to use checksums
16bd993d80f25b5dcdd9ca9288eb8d2e1bc25ffda17602641d6362513636b15f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.6.9 Linux/5.4.0-54-generic

Release files / latex_subfigs_combiner-1.0.0-py3-none-any.whl

Download URL latex_subfigs_combiner-1.0.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8c72a7c5c0252d9fd1db22da3ee868bba639496a066cb356c91d1b335958e60
BLAKE2b-256 checksum
How to use checksums
4754e9296d8249a1af17637ddfecba6f95d025c54278d91bb7a278a34c817a77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.6.9 Linux/5.4.0-54-generic

Security for latex-subfigs-combiner 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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