Closed kbauer closed 6 years ago
Thanks for the issue, and for the fix! You taught me about this precompilation mechanism. This is a straightforward fix indeed, merged in (abede86) with a few minor corrections. Will be integrated into the next release (1.0.7), once I process all your other issues. :-)
LaTeX has a mechanism, where preambles can be precompiled for faster subsequent compilation, that can be summarized as
document_preamble.tex
.pdflatex -ini "&pdflatex" "document_preamble" "\\dump"
creating adocument_preamble.fmt
binary dump of several megabytes.document.tex
, load this "format" file by starting the file with%&document_preamble
. Otherwise it is compiled withpdflatex document
as usual.Expected behavior
.axp
file should be created.document.tex
,document.axp
should be created.Actual behavior
document_preamble.axp
is created.document.tex
, no.axp
file is created, leading to a "no such file" error when the appendix is typeset.Cause
The axp file is created as
\jobname.axp
at the time, when theapxproof
is loaded, i.e. when\usepackage{apxproof}
is expanded. When working with precompiled preambles, at that time\jobname
isdocument_preamble
instead ofdocument
.If nothing else prevents it, the obvious fix would be to defer the initialization of the
.axp
file with an\AtBeginDocument
.