Summary of issue
I followed the guide linked in this answer, and it works perfectly for me. However, I find that if I use a precompiled preamble, and then specify \includeonly{}
, the full document is still compiled.
Is there something obvious I'm missing?
MWE
File: main.tex
%&preamble
\includeonly{part1}
\begin{document}
\include{part1}
\include{part2}
\end{document}
File: preamble.tex
\documentclass{article}
\usepackage{amsmath}
\csname endofdump\endcsname
File: part1.tex
Part 1.
File: part2.tex
Part 2.
Precompilation
I precompiled the preamble using pdftex -ini -jobname="preamble" "&pdflatex" mylatexformat.ltx "preamble.tex"
If you change %&preamble
in main.tex
to \input{preamble}
, it works as expected.
System info
Compiled under the LaTeX Workshop extension for Visual Studio Code on Windows 10, using latexmk.