PyTeXMK (Python TeX Make) is an automated LaTeX compilation tool written in Python, inspired by latexmk. It intelligently determines the number of compilation passes based on auxiliary file changes, paired with colored terminal output and automatic scheduling of bibliography and index toolchains, enabling a streamlined one-click LaTeX compilation workflow.
Core features:
- Multi-engine compilation support: Full support for XeLaTeX, PdfLaTeX, and LuaLaTeX, flexibly switchable via command-line arguments or magic comments
- Intelligent multi-pass detection: Automatically compares .aux/.out auxiliary file contents and parses log rerun warnings to ensure stable convergence of cross-references, bookmarks, page counts and more
- Automatic bibliography processing: Supports automatic scheduling of multiple backends including bibtex and biblatex (biber)
- Index and glossary compilation: Supports glossaries, nomencl, makeidx and other formats, with automatic selection of xindy or makeindex backends
- Magic comment configuration: Specify compilation engine, main file, output directory, auxiliary directory and other parameters directly via comments in the TeX main file
- Smart cleaning: Multiple cleaning modes available, supporting precise cleanup of auxiliary files by directory scope and file extension
- Error log parsing: Automatically parses LaTeX logs upon compilation failure to accurately locate error positions
- LaTeX diff comparison: Compares two TeX source files and generates PDF documents with revision marks
- PDF repair and preview: Automatically repairs corrupted PDF files, and supports auto-preview with the default reader after compilation
- Multi-language interface: Default Chinese interface with full internationalization extensibility
- Two-level configuration system: Supports user-level and project-level TOML configuration files, with all compilation parameters fully customizable
- Multi-subproject management: Manage multiple independent LaTeX subprojects under a single root directory, with automatic scanning and batch compilation support
- Automatic version check: Built-in update detection to retrieve the latest version immediately