summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/ltfiles.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/base/ltfiles.dtx')
-rw-r--r--macros/latex-dev/base/ltfiles.dtx20
1 files changed, 18 insertions, 2 deletions
diff --git a/macros/latex-dev/base/ltfiles.dtx b/macros/latex-dev/base/ltfiles.dtx
index 4dee83c4d6..4c24716df6 100644
--- a/macros/latex-dev/base/ltfiles.dtx
+++ b/macros/latex-dev/base/ltfiles.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2021/08/25 v1.2o 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}}%
@@ -892,7 +900,15 @@
\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}