diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltfiles.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/ltfiles.dtx | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltfiles.dtx b/Master/texmf-dist/source/latex/base/ltfiles.dtx index bcaac582208..4c24716df65 100644 --- a/Master/texmf-dist/source/latex/base/ltfiles.dtx +++ b/Master/texmf-dist/source/latex/base/ltfiles.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltfiles.dtx} - [2021/04/17 v1.2m LaTeX Kernel (File Handling)] + [2021/10/14 v1.2p LaTeX Kernel (File Handling)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltfiles.dtx} @@ -823,8 +823,16 @@ % % \changes{v1.2j}{2020/10/04}{Quotes around the aux file name removed, % they are not needed and upset BibTeX (gh/400)} +% \changes{v1.2p}{2021/10/14}{Warn about use in preamble} % \begin{macrocode} \def\@include#1 {% +% \end{macrocode} +% +% \begin{macrocode} +\ifx\@nodocument\relax +% \end{macrocode} +% +% \begin{macrocode} \clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}% @@ -850,16 +858,19 @@ % \end{macrocode} % Execute the \texttt{before} hooks just after we switched the % \texttt{.aux} file \ldots +% \changes{v1.2n}{2021/07/23}{Make include/name/before a one-time hook} +% \changes{v1.2o}{2021/08/25}{Standardise generic hook names (gh/648)} % \begin{macrocode} \UseHook{include/before}% - \UseHook{include/before/#1}% + \UseOneTimeHook{include/#1/before}% %----------------------------------------- \@input@{#1.tex}% %----------------------------------------- % \end{macrocode} % \ldots{} then \texttt{end} hooks \ldots +% \changes{v1.2n}{2021/07/23}{Make include/name/end a one-time hook} % \begin{macrocode} - \UseHook{include/end/#1}% + \UseOneTimeHook{include/#1/end}% \UseHook{include/end}% %----------------------------------------- \clearpage @@ -869,8 +880,9 @@ % followed by another \cs{clearpage} just in case new material got % added (after all we need to be in well defined state after the % \cs{include}). +% \changes{v1.2n}{2021/07/23}{Make include/name/after a one-time hook} % \begin{macrocode} - \UseHook{include/after/#1}% + \UseOneTimeHook{include/#1/after}% \UseHook{include/after}% \clearpage %----------------------------------------- @@ -888,7 +900,23 @@ \deadcycles\z@ \@nameuse{cp@#1}% \fi - \let\@auxout\@mainaux} + \let\@auxout\@mainaux +% \end{macrocode} +% +% \begin{macrocode} +\else +\@latex@warning{% + \noexpand\include should only be used after \string\begin{document}}% +\@input@{#1}% +\fi} +% \end{macrocode} +% +% \changes{v1.2o}{2021/08/25}{Declare non-generic include hooks} +% Now declare the non-generic \hook{include} hooks used above: +% \begin{macrocode} +\NewHook{include/before} +\NewReversedHook{include/end} +\NewReversedHook{include/after} %<latexrelease>\EndIncludeInRelease %</2ekernel|latexrelease> % \end{macrocode} |