Skip to main content

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 \input and \include commands 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
)

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)

Source distribution for elsevier-latex-preparation 0.2.1
File Size Uploaded
elsevier_latex_preparation-0.2.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elsevier-latex-preparation 0.2.1
File Interpreter ABI Platform
elsevier_latex_preparation-0.2.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.8

2 release files

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