Open moewew opened 5 years ago
In case it helps, https://github.com/wspr/herries-press/compare/master...moewew:issue34 contains a possible fix for this issue.
Why did the patch change \def
to \xdef
? Now the setting leaks out of the appendix, see https://tex.stackexchange.com/questions/617916/reference-name-issue-with-multiple-appendices
If I switch back to \def with
\usepackage{etoolbox}
\makeatletter
\patchcmd\@resets@pp{\xdef}{\def}{}{\fail}
\patchcmd\@resets@ppsub{\xdef}{\def}{}{\fail}
\makeatother
The example compiles again.
As detailed in the linked https://tex.stackexchange.com/a/461142/35864 the \xdef
came from hyperref
's definition of \appendix
, but since that is a switch and with appendices
we have an environment a local \edef
(or possibly only \def
- since expansion then happens when the file is written) might make more sense here.
Via https://tex.stackexchange.com/q/461125/35864 and ultimately as it turns out a few other questions, most notably https://tex.stackexchange.com/q/67627/35864, https://tex.stackexchange.com/q/58848/35864, https://tex.stackexchange.com/q/41649/35864
The following MWE fails for me (with pdfLaTeX)
with many error messages of the form
The issue seems to be the use of the localised term
\appendixname
as anchor in\Hy@chapapp
instead of a safe ASCII-only like\Hy@appendixstring
.