Skip to main content

LaTeX manuscript compilation system for scientific documents with MCP server

Project description

SciTeX Writer

A LaTeX compilation system for academic manuscripts with automatic versioning, diff generation, and cross-platform reproducibility.

Part of the fully open-source SciTeX project: https://scitex.ai

Demo

Demo Video Thumbnail

โ–ถ๏ธ Click thumbnail to watch video demo

๐Ÿ“„ Full demo (org) | Full demo (pdf) | Manuscript output | Revision output

Quick Start

git clone https://github.com/ywatanabe1989/scitex-writer.git
./scitex-writer/scripts/compile.sh manuscript
Output Structure
./scitex-writer/
โ”œโ”€โ”€ 00_shared/                  # Shared resources across all documents
โ”‚   โ”œโ”€โ”€ title.tex               # Manuscript title
โ”‚   โ”œโ”€โ”€ authors.tex             # Author names and affiliations
โ”‚   โ”œโ”€โ”€ keywords.tex            # Keywords for the manuscript
โ”‚   โ”œโ”€โ”€ journal_name.tex        # Target journal name
โ”‚   โ”œโ”€โ”€ bib_files/              # Multiple .bib files (auto-merged and deduplicated)
โ”‚   โ”œโ”€โ”€ latex_styles/           # Common LaTeX configurations
โ”‚   โ””โ”€โ”€ templates/              # LaTeX document templates
โ”‚
โ”œโ”€โ”€ 01_manuscript/              # Main manuscript
โ”‚   โ”œโ”€โ”€ contents/               # Modular content sections
โ”‚   โ”‚   โ”œโ”€โ”€ abstract.tex
โ”‚   โ”‚   โ”œโ”€โ”€ introduction.tex
โ”‚   โ”‚   โ”œโ”€โ”€ methods.tex
โ”‚   โ”‚   โ”œโ”€โ”€ results.tex
โ”‚   โ”‚   โ”œโ”€โ”€ discussion.tex
โ”‚   โ”‚   โ”œโ”€โ”€ figures/            # Figure captions + media
โ”‚   โ”‚   โ””โ”€โ”€ tables/             # Table captions + CSV data
โ”‚   โ”œโ”€โ”€ archive/                # Version history (gitignored)
โ”‚   โ”œโ”€โ”€ manuscript.tex          # Compiled LaTeX
โ”‚   โ”œโ”€โ”€ manuscript_diff.tex     # Change-tracked version
โ”‚   โ””โ”€โ”€ manuscript.pdf          # Output PDF
โ”‚
โ”œโ”€โ”€ 02_supplementary/           # Supplementary materials
โ”‚   โ”œโ”€โ”€ contents/               # Supplementary content sections
โ”‚   โ”‚   โ”œโ”€โ”€ supplementary_methods.tex
โ”‚   โ”‚   โ”œโ”€โ”€ supplementary_results.tex
โ”‚   โ”‚   โ”œโ”€โ”€ figures/            # Supplementary figures
โ”‚   โ”‚   โ””โ”€โ”€ tables/             # Supplementary tables
โ”‚   โ”œโ”€โ”€ archive/                # Version history (gitignored)
โ”‚   โ”œโ”€โ”€ supplementary.tex       # Compiled LaTeX
โ”‚   โ””โ”€โ”€ supplementary.pdf       # Output PDF
โ”‚
โ”œโ”€โ”€ 03_revision/                # Revision response letter
โ”‚   โ”œโ”€โ”€ contents/               # Reviewer responses
โ”‚   โ”‚   โ”œโ”€โ”€ editor/             # E_01_comments.tex, E_01_response.tex
โ”‚   โ”‚   โ”œโ”€โ”€ reviewer1/          # R1_01_comments.tex, R1_01_response.tex
โ”‚   โ”‚   โ””โ”€โ”€ reviewer2/          # R2_01_comments.tex, R2_01_response.tex
โ”‚   โ”œโ”€โ”€ archive/                # Version history (gitignored)
โ”‚   โ”œโ”€โ”€ revision.tex            # Compiled LaTeX
โ”‚   โ””โ”€โ”€ revision.pdf            # Output PDF
โ”‚
โ”œโ”€โ”€ config/                     # Configuration files
โ”‚   โ””โ”€โ”€ config_manuscript.yaml  # Citation style, engine settings
โ”‚
โ””โ”€โ”€ scripts                     # Compilation scripts
    โ”œโ”€โ”€ containers/             # Container image builds (Apptainer/Singularity)
    โ”œโ”€โ”€ installation/           # Environment setup and dependency installation
    โ”œโ”€โ”€ maintenance/            # Repository maintenance (usage, update, demos)
    โ”œโ”€โ”€ powershell/             # Windows PowerShell scripts
    โ”œโ”€โ”€ python/                 # Python utilities
    โ””โ”€โ”€ shell/                  # Core compilation scripts
    

Features

Details
Feature Description
Separated Files Modular sections (abstract, intro, methods, results, discussion)
Built-in Templates Pre-configured manuscript, supplementary materials, and revision
Bibliography Multi-file with auto-deduplication, 20+ citation styles
Assets Parallel figure/table processing (PNG, PDF, SVG, Mermaid, CSV)
Multi-Engine Auto-selects best engine (Tectonic 1-3s, latexmk 3-6s, 3-pass 12-18s)
Cross-Platform Linux, macOS, WSL2, Docker, Singularity, HPC clusters

Usage

PDF Compilation
# Basic compilation
./scripts/shell/compile_manuscript.sh          # Manuscript
./scripts/shell/compile_supplementary.sh       # Supplementary
./scripts/shell/compile_revision.sh            # Revision letter

# Performance options
./scripts/shell/compile_manuscript.sh --draft      # Fast single-pass
./scripts/shell/compile_manuscript.sh --no-figs    # Skip figures
./scripts/shell/compile_manuscript.sh --no-tables  # Skip tables
./scripts/shell/compile_manuscript.sh --no-diff    # Skip diff generation

# Engine selection
./scripts/shell/compile_manuscript.sh --engine tectonic  # Fastest
./scripts/shell/compile_manuscript.sh --engine latexmk   # Standard
./scripts/shell/compile_manuscript.sh --engine 3pass     # Most compatible

# Development
./scripts/shell/compile_manuscript.sh --watch  # Hot-reload on file changes
./scripts/shell/compile_manuscript.sh --clean  # Remove cache
Figures
  1. Place media files in 01_manuscript/contents/figures/caption_and_media/:

    01_example_figure.png
    01_example_figure.tex  # Caption file
    
  2. Caption file format (01_example_figure.tex):

    %% Figure caption
    \caption{Your figure caption here. Explain panels (A, B, C) if applicable.}
    \label{fig:example_figure_01}
    
  3. Supported formats: PNG, JPEG, PDF, SVG, TIFF, Mermaid (.mmd)

  4. Figures auto-compile and include in FINAL.tex

Tables
  1. Place CSV + caption in 01_manuscript/contents/tables/caption_and_media/:

    01_example_table.csv
    01_example_table.tex  # Caption file
    
  2. CSV auto-converts to LaTeX table format

  3. Caption file format (01_example_table.tex):

    %% Table caption
    \caption{Your table caption. Define abbreviations used.}
    \label{tab:example_table_01}
    
References

Organize references in multiple .bib files - they auto-merge with deduplication:

00_shared/bib_files/
โ”œโ”€โ”€ methods_refs.bib      # Method-related references
โ”œโ”€โ”€ field_background.bib  # Background literature
โ””โ”€โ”€ my_papers.bib         # Your own publications

Change citation style in config/config_manuscript.yaml:

  • unsrtnat (numbered, order of citation)
  • plainnat (numbered, alphabetical)
  • apalike (author-year, APA style)
  • IEEEtran (IEEE format)
  • naturemag (Nature style)

Installation

Python Package (MCP Server)
# Install from PyPI
pip install scitex-writer

# Verify installation (CLI or Python module)
scitex-writer --version
python -m scitex_writer version

# Check MCP setup
scitex-writer mcp doctor
python -m scitex_writer mcp doctor

# Start MCP server
scitex-writer mcp start
python -m scitex_writer mcp start

Add to Claude Desktop config (~/.config/Claude/claude_desktop_config.json):

Option 1: CLI command

{
  "mcpServers": {
    "scitex-writer": {
      "command": "scitex-writer",
      "args": ["mcp", "start"]
    }
  }
}

Option 2: Python module

{
  "mcpServers": {
    "scitex-writer": {
      "command": "python",
      "args": ["-m", "scitex_writer", "mcp", "start"]
    }
  }
}
Ubuntu/Debian
sudo apt-get install texlive-latex-extra latexdiff parallel imagemagick ghostscript
macOS
brew install texlive latexdiff parallel imagemagick ghostscript
HPC / Containers
# Module system
module load texlive latexdiff parallel

# Docker
docker run -v $(pwd):/work scitex-writer

# Singularity/Apptainer
singularity run scitex-writer.sif

Documentation

Details
Guide Description
Installation Setup for all environments
Quick Start Common workflows
Content Creation Writing manuscripts
Bibliography Reference management
Architecture Technical details

SciTeX
AGPL-3.0 ยท ywatanabe@scitex.ai

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

scitex_writer-0.1.1.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

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

scitex_writer-0.1.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file scitex_writer-0.1.1.tar.gz.

File metadata

  • Download URL: scitex_writer-0.1.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for scitex_writer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 841619d82904c46c707abab298b0799c2c3b83d429523d49413d8621a5730b44
MD5 c036ed17535b19bb8bbea5c50b9d8419
BLAKE2b-256 8e027ede86ec1ec4b5ff0786598a8f75c23bdcd7fe479682bc9b67223329b28e

See more details on using hashes here.

File details

Details for the file scitex_writer-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: scitex_writer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for scitex_writer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30348cef66d1bd1b9ee72a105d58e5c30960783bab3296bfd3c2d22ad172205c
MD5 cc1a105fcc92ce47d1d5c85d096a307f
BLAKE2b-256 6b9992aa90f2a168bf5473e353bae90329b0137e1c4368e851caedcffffc936e

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