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.1.tar.gz (7.0 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.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for elsevier_latex_preparation-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1c9c78def1c5b5a575d846246cdd988842b78bb16b491d5a509aa3b9908738cd
MD5 46a914aa0d8166597218c9f54306c222
BLAKE2b-256 3a6a9a254036597108aa90a090afe56d1db461e0a27c4514c16b50d3886e097c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elsevier_latex_preparation-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29985fff5c85d1a89cc4ed9b11349ea006052e2158563b5e889aaa4e99d9946f
MD5 76c238d3ffd007fcc992e7651856972b
BLAKE2b-256 10a03182e36c682c5095b9303b57dec62a5d6a8c5cc96dbe284475d6fcfa7d7d

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