josephwright / etoolbox

Tool-box for LaTeX programmers using e-TeX
LaTeX Project Public License v1.3c
41 stars 7 forks source link

\AtEndPreamble can't be nested anymore with current dev release #27

Closed mrpiggi closed 4 years ago

mrpiggi commented 4 years ago

Something like

\listfiles
\RequirePackage{latexbug}
\documentclass{article}
\usepackage{etoolbox}
\AtEndPreamble{%
  \typeout{+++++ early}%
  \AtEndPreamble{%
    \typeout{+++++ late}%
  }%
}
\begin{document}
test
\end{document}

does work with the current latex kernel but not with the new hook management in the dev release. See https://github.com/latex3/latex2e/issues/360

FrankMittelbach commented 4 years ago

@josephwright can you please alter the definition for \AtEndPreamble? I coded the wrong hook in the draft:

begindocument/before This hook executed at the very start of \document, one can think of it as a hook for code at the end of the preamble section and this is how it it is used by etoolbox’s \AtEndPreamble.

josephwright commented 4 years ago

Fixed by 29abc29ef202966abe777f2dc8dd023de90cb375.