From 1c0ccf47a6c4aa86902790cb920f603f7747b2b0 Mon Sep 17 00:00:00 2001 From: Tuminha <83960151+Tuminha@users.noreply.github.com> Date: Thu, 4 Jun 2026 12:49:26 +0200 Subject: [PATCH] Finalize manuscript render workflow --- .gitignore | 2 +- Makefile | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 45257ae..595187a 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ artifacts/*.npy artifacts/*.db logs/*.log reports/*.pdf +reports/*.html # Keep .gitkeep files !.gitkeep @@ -80,4 +81,3 @@ optuna_study.db *.bak *_OLD.* README_OLD.md - diff --git a/Makefile b/Makefile index 872cc2d..2941f76 100644 --- a/Makefile +++ b/Makefile @@ -117,13 +117,22 @@ manuscript: @echo "Rendering manuscript if pandoc is installed..." $(PYTHON) scripts/05_number_manuscript_lines.py @if command -v pandoc >/dev/null 2>&1; then \ + ENGINE=""; \ + if command -v xelatex >/dev/null 2>&1; then \ + ENGINE="xelatex"; \ + elif command -v tectonic >/dev/null 2>&1; then \ + ENGINE="tectonic"; \ + fi; \ + if [ -z "$$ENGINE" ]; then \ + echo "pandoc is installed, but no PDF engine found. Install xelatex or tectonic."; \ + exit 1; \ + fi; \ mkdir -p reports; \ pandoc docs/publication/ARTICLE_DRAFT.md \ - --number-sections \ - --pdf-engine=xelatex \ + --pdf-engine=$$ENGINE \ -V geometry:margin=1in \ -o reports/manuscript_publication_repair.pdf; \ - echo "Rendered reports/manuscript_publication_repair.pdf"; \ + echo "Rendered reports/manuscript_publication_repair.pdf using $$ENGINE"; \ else \ echo "pandoc is not installed; manuscript source is docs/publication/ARTICLE_DRAFT.md"; \ fi