From e936f0a8d8006336565eed0bc74126200bd53620 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Fri, 3 Jul 2026 01:20:33 +0200 Subject: [PATCH] Add mylatexformat commands --- Justfile | 6 ++++++ preamble.tex | 29 ++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Justfile b/Justfile index 0845127..d702f5e 100644 --- a/Justfile +++ b/Justfile @@ -10,3 +10,9 @@ build: clean: find . -type d \( -name build -o -name svg-inkscape -o -name .aux -o -name .out \) -exec rm -rf {} + + +format: + lualatex -ini -jobname=thesis "&lualatex" mylatexformat.ltx thesis.tex + +clean-format: + rm thesis.fmt thesis.log thesis.tex.bbl thesis.tex.blg diff --git a/preamble.tex b/preamble.tex index 673e89d..91a760d 100644 --- a/preamble.tex +++ b/preamble.tex @@ -21,12 +21,6 @@ \usepackage{flafter} \usepackage{placeins} % \FloatBarrier to flush floats -% Math -\usepackage{amsmath,amsthm} % Don't load amssymb with concmath-otf -\usepackage{mathtools} % Extension of amsmath -\usepackage{unicode-math} -\usepackage{lualatex-math} - % Tables \usepackage{booktabs} % \usepackage{tabularx} @@ -43,10 +37,25 @@ \usepackage[minted]{tcolorbox} \tcbuselibrary{skins} % breakable +% Math +\usepackage{amsmath,amsthm} % Don't load amssymb with concmath-otf +\usepackage{mathtools} % Extension of amsmath +\mathtoolsset{showonlyrefs} +\usepackage{xpatch} +\makeatletter +\xpretocmd\HyRef@autoref{\noeqref{#2}}{}{} % showonlyrefs mit \autoref +\makeatother + +% lua-uni-stage-tables.lua:141: attempt to perform arithmetic on a string value (local 'key') +\csname endofdump\endcsname + +\usepackage{unicode-math} +\usepackage{lualatex-math} + % Typography +\usepackage[babel,final,protrusion=true,expansion=true,tracking=false,kerning=false,spacing=false]{microtype} % \usepackage{fontspec} \usepackage{concmath-otf} -\usepackage[babel,final,protrusion=true,expansion=true,tracking=false,kerning=false,spacing=false]{microtype} \setmonofont{MonoLisa Alt}[Scale=MatchLowercase] % Pagestyle @@ -97,12 +106,6 @@ \renewcommand{\textfraction}{0.07} % allow down to ..% of text \renewcommand{\floatpagefraction}{0.7} % fill at least ..% of float pages (must be less than \topfraction) -\mathtoolsset{showonlyrefs} -\usepackage{xpatch} -\makeatletter -\xpretocmd\HyRef@autoref{\noeqref{#2}}{}{} % showonlyrefs mit \autoref -\makeatother - \makeatletter\newcommand{\tcb@cnt@codeblockautorefname}{Listing}\makeatother % Silence some warning spam