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.1.8.tar.gz (6.5 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.1.8-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for elsevier_latex_preparation-0.1.8.tar.gz
Algorithm Hash digest
SHA256 c199dd6977bedf61b42e79cb39bf1eb3161887354850f7fbc46ca73487cbe1ac
MD5 156d32980cec364bd24620627e7361f0
BLAKE2b-256 88d9ddbfaacb7787095e016b53d5999abebe81e6bfe43510d3e2511f5614d368

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elsevier_latex_preparation-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c7098c4e954b40ab266d8b0cdf409bfce490095828c507d0a2a335765a8f13d2
MD5 f1eaad2f8a57698ecab47afd1143086a
BLAKE2b-256 56e35594dd3a6b9131769e85081d0d63fdee38149269981952d345575589be76

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