LaTeX File Merger and Resource Copier for Elsevier Submission ✨📄
This Python tool processes a main LaTeX file and its included resources,
preparing it for submission to Elsevier Editorial Manager.
Elsevier requires manuscripts to be uploaded as a single .tex file
with all references (images, bibliography files, etc.) in a single folder
without subfolders. 🚫🗂
This script merges all \input and \include commands into the main LaTeX file
and copies all referenced files into a flat destination folder. 🗂️️
Features 🌟
- Resolves
\inputand\includecommands recursively 🔄 - Copies all referenced resources (images 🖼️, bibliography files 📚, and others) into a single folder
- Updates LaTeX file paths to point to the new flat folder 🛣️
- Ignores commands that do not reference external files 🚫
- Optional callbacks for progress ⏱️ and file counters 🔢
- Tkinter GUI interface with:
- File selection dialogs 📂
- Progress bar 📊
- Counters for images, bibliography, and other files
- Clickable counters that open a window showing copied files 👀
- Designed to produce a folder ready for Elsevier Editorial Manager ✅
Installation ️
Can be installed via pip:
pip install elsevier-latex-preparation
Usage (GUI) 🖱️
Run the GUI:
from elsevier_latex_preparation import run_gui
run_gui()
Usage (Programmatic) 💻
from elsevier_latex_preparation import merge_latex_and_move_ref
# Path to the main LaTeX file
main_file = "path/to/main.tex"
# Destination folder where the single-file LaTeX package will be created
destination_folder = "path/to/destination"
# Optional callbacks for progress and file tracking
def progress_callback(percent):
print(f"Progress: {percent:.2f}% ⏳")
def files_counter(files_list):
print(f"Copied files: {len(files_list)} 📂")
def merger_callback(merged_list):
print(f"Merged files: {len(merged_list)} 📂")
# Merge LaTeX file and copy resources
merge_latex_and_move_ref(
main_file,
destination_folder,
progress_callback=progress_callback,
files_copied_counter_callback=files_counter,
merge_tracker_callback=merger_callback
)
Metadata
Release files for elsevier-latex-preparation 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elsevier_latex_preparation-0.2.1.tar.gz | 7.0 kB | Without provenance | Details for elsevier_latex_preparation-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elsevier_latex_preparation-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for elsevier_latex_preparation-0.2.1-py3-none-any.whl |
Total release size: 15.2 kB
Release files / elsevier_latex_preparation-0.2.1.tar.gz
| Download URL | elsevier_latex_preparation-0.2.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c9c78def1c5b5a575d846246cdd988842b78bb16b491d5a509aa3b9908738cd
|
|
BLAKE2b-256 checksum How to use checksums |
3a6a9a254036597108aa90a090afe56d1db461e0a27c4514c16b50d3886e097c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / elsevier_latex_preparation-0.2.1-py3-none-any.whl
| Download URL | elsevier_latex_preparation-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29985fff5c85d1a89cc4ed9b11349ea006052e2158563b5e889aaa4e99d9946f
|
|
BLAKE2b-256 checksum How to use checksums |
10a03182e36c682c5095b9303b57dec62a5d6a8c5cc96dbe284475d6fcfa7d7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for elsevier-latex-preparation 0.2.1
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.