summaryrefslogtreecommitdiff
path: root/macros/latex/base/ltpara.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/base/ltpara.dtx')
-rw-r--r--macros/latex/base/ltpara.dtx49
1 files changed, 28 insertions, 21 deletions
diff --git a/macros/latex/base/ltpara.dtx b/macros/latex/base/ltpara.dtx
index f76352fb91..b915856462 100644
--- a/macros/latex/base/ltpara.dtx
+++ b/macros/latex/base/ltpara.dtx
@@ -14,21 +14,14 @@
%
%%% From File: ltpara.dtx
%
-% \begin{macrocode}
-\def\ltparaversion{v1.0l}
-\def\ltparadate{2023/01/30}
-% \end{macrocode}
%<*driver>
+% \fi
+\ProvidesFile{ltpara.dtx}
+ [2024/06/23 v1.0n LaTeX Kernel (paragraph hooks)]
+% \iffalse
+%
\documentclass{l3doc}
-
-%\usepackage{ltpara}
-
-% Fixing footnotes in functions and variables: this should be in l3doc!
-
-\newcommand\fixfootnote[2]{\footnotemark
- \AddToHookNext{env/#1/after}{\footnotetext{#2}}}
-\AddToHook{env/function/begin}{\def\footnote{\fixfootnote{function}}}
-\AddToHook{env/variable/begin}{\def\footnote{\fixfootnote{variable}}}
+\GetFileInfo{ltpara.dtx}
\EnableCrossrefs
\CodelineIndex
@@ -45,7 +38,7 @@
%
%
% \title{The \texttt{ltpara.dtx} code\thanks{This file has version
-% \ltparaversion\ dated \ltparadate, \copyright\ \LaTeX\
+% \fileversion\ dated \filedate, \copyright\ \LaTeX\
% Project.}}
% \author{Frank Mittelbach}
%
@@ -811,9 +804,11 @@
\hook_use:n {para/begin}
% \end{macrocode}
% If we aren't in horizontal mode any longer the hooks above misbehaved.
+% \changes{v1.0m}{2023/11/16}{Correct error message: hook
+% left horizontal not vertical mode (gh/1182)}
% \begin{macrocode}
\if_mode_horizontal: \else:
- \msg_error:nnnn { hooks }{ para-mode }{begin}{vertical} \fi:
+ \msg_error:nnnn { hooks }{ para-mode }{begin}{horizontal} \fi:
% \end{macrocode}
% Finally we reinsert the indentation box (unless suppressed) and
% then call \cs{everypar} the way legacy \LaTeX\ code expects it.
@@ -824,6 +819,18 @@
\@@_handle_indent:
% \the \everypar % <--- done differently below
}
+% \end{macrocode}
+% \changes{v1.0n}{2024/06/23}
+% {Append \cs{everypar} toks to \cs{g_@@_standard_everypar_tl},
+% rollback 2023/06/01 (gh/1386)}
+% \begin{macrocode}
+%<latexrelease>\cs_set:Npn \@@_tmp:w #1#2#3#4#5 { }
+%<latexrelease>\tl_gput_right:Nx \g_@@_standard_everypar_tl {
+%<latexrelease> \exp_not:N \the
+%<latexrelease> \exp_not:N \toks
+%<latexrelease> \exp_after:wN \@@_tmp:w \token_to_meaning:N \everypar
+%<latexrelease> \c_space_tl
+%<latexrelease>}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2021/06/01}
%<latexrelease> {\g_@@_standard_everypar_tl}{minipage~ fix}
@@ -845,7 +852,7 @@
%<latexrelease> \@kernel@before@para@begin
%<latexrelease> \hook_use:n {para/begin}
%<latexrelease> \if_mode_horizontal: \else:
-%<latexrelease> \msg_error:nnnn { hooks }{ para-mode }{begin}{vertical} \fi:
+%<latexrelease> \msg_error:nnnn { hooks }{ para-mode }{begin}{horizontal} \fi:
%<latexrelease> \@@_handle_indent:
%<latexrelease>}
% \end{macrocode}
@@ -922,10 +929,10 @@
% the paragraph text starts.
% \begin{macrocode}
\tl_gput_right:Nx \g_@@_standard_everypar_tl {
- \exp_not:N \the
- \exp_not:N \toks
- \the \allocationnumber
- \c_space_tl
+ \exp_not:N \the
+ \exp_not:N \toks
+ \the \allocationnumber
+ \c_space_tl
}
% \end{macrocode}
% \end{macro}
@@ -1261,7 +1268,7 @@
% redo the \cs{everypar} setting from the kernel, otherwise that
% gets lost (as it happens before that file is loaded).
% \begin{macrocode}
-\everypar{\@nodocument} %% To get an error if text appears before the
+\everypar{\@nodocument} %% To get an error if text appears before the \document
% \end{macrocode}
%
%