Skip to main content

Merge LaTeX files and resources for Elsevier Editorial Manager submission

Project description

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
)

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

elsevier_latex_preparation-0.2.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

elsevier_latex_preparation-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file elsevier_latex_preparation-0.2.0.tar.gz.

File metadata

File hashes

Hashes for elsevier_latex_preparation-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ad87acb42441dabbf1cb6b00c2a120158e37602a1669676917d121a4cf051a86
MD5 9231dcc0e55de4001fdfcce6f7e80e29
BLAKE2b-256 87fbbdd7894b588d33ea1f715f9d65457c137df3fd086231fdb47cf947fa3786

See more details on using hashes here.

File details

Details for the file elsevier_latex_preparation-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for elsevier_latex_preparation-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45119965ff60def0924715be3a63539b8427b5ea6b8512c291f594f520869132
MD5 afc1339daf05e537ac02fc3015a48cb0
BLAKE2b-256 df330380d970499916cf466db3365b7b236a36d0a371142aabdc85d5e7b6a97b

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