You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, .sta file, which (if exists) contains the collected sub-preambles, is read at begin of document (\AtBeginDocument). Since theses preambles may load packages by themselves, loading .sta in \AtBeginDocument maybe too late. See discussions in latex3/hyperref#242 and question 670638 on TeX-SX.
In LaTeX2e 2020-10-01, a hook management system is introduced hence \AtBeginDocument becomes a thin wrapper of \AddToHook{begindocument}. This hook system also provides a better position to load packages at the end of preamble: hook begindocument/before. In older LaTeX2e, this hook can be emulated by \AtEndPreamble from etoolbox package.
A proposal that only makes code changes (comment are not adapted):
diff --git a/standalone.sty b/standalone.sty
index 557f254..497a571 100644
--- a/standalone.sty+++ b/standalone.sty@@ -933,7 +933,11 @@
% The |standalone| macros are defined to be without effect. If `sorting' is enabled \cs{usepackage} is temporarily
% redefined to ignore any given options, which where already passed (\cs{PassOptionsToPackage}) beforehand.
% \begin{macrocode}
-\AtBeginDocument{%+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}+\IfFormatAtLeastTF{2020-10-01}+ {\AddToHook{begindocument/before}}+ {\RequirePackage{etoolbox}\AtEndPreamble}+{%
\let\subpreamble\@gobble
\let\endsubpreamble\relax
\let\standalonepreambles\relax
The text was updated successfully, but these errors were encountered:
Currently,
.sta
file, which (if exists) contains the collected sub-preambles, is read at begin of document (\AtBeginDocument
). Since theses preambles may load packages by themselves, loading.sta
in\AtBeginDocument
maybe too late. See discussions in latex3/hyperref#242 and question 670638 on TeX-SX.In LaTeX2e 2020-10-01, a hook management system is introduced hence
\AtBeginDocument
becomes a thin wrapper of\AddToHook{begindocument}
. This hook system also provides a better position to load packages at the end of preamble: hookbegindocument/before
. In older LaTeX2e, this hook can be emulated by\AtEndPreamble
frometoolbox
package.A proposal that only makes code changes (comment are not adapted):
The text was updated successfully, but these errors were encountered: