summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/ltpara.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/base/ltpara.dtx')
-rw-r--r--macros/latex-dev/base/ltpara.dtx46
1 files changed, 18 insertions, 28 deletions
diff --git a/macros/latex-dev/base/ltpara.dtx b/macros/latex-dev/base/ltpara.dtx
index 9802bfd63a..a2da67198a 100644
--- a/macros/latex-dev/base/ltpara.dtx
+++ b/macros/latex-dev/base/ltpara.dtx
@@ -15,7 +15,7 @@
%
% \begin{macrocode}
\def\ltparaversion{v1.0k}
-\def\ltparadate{2021/10/19}
+\def\ltparadate{2021/11/11}
% \end{macrocode}
%<*driver>
\documentclass{l3doc}
@@ -23,6 +23,7 @@
%\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}}}
@@ -429,16 +430,6 @@
% \cs{endgraf} was changed to provide this additional functionality
% (along with \cs{par} remaining subject to its current meaning).
%
-% TEMP NOTE: Maybe endgraf should not be changed by LaTeX as it is
-% essentially not at all a part of LaTeX.
-% If it is too dangerous to leave it as
-% a synonym for the primitive, then we could just disable it.
-% [FMi:]
-% not in my opinion. It is used in many places and the redefinition is safe and does the right thing.
-% disabling it just means it breaks a lot of stuff for no reason.
-% [FMi:]
-% Note that the 2e kernel has been completely purged of endgrafs.
-%
% The \pkg{expl3} name for this functionality is \cs{para_end:}.
% \end{function}
%
@@ -613,8 +604,8 @@
%
% \subsubsection{Mark the first paragraph of each \env{itemize}}
%
-% The code for this is rather simple. We apply hook code that is
-% executed only once inside a hook that is executed at the begin of
+% The code for this is rather simple. We supply some code that is
+% executed only once inside a hook at the start of
% each \env{itemize}. We explicitly change the color back and
% forth so that we don't introduce grouping around the paragraph.
%\begin{verbatim}
@@ -953,7 +944,6 @@
% default meaning (in the past this was the initex primitive) while
% \cs{par} is the current meaning which maybe does something else.
%
-% TEMP NOTE: See earlier note re endgraf.
%
% We are now going to change this default meaning to instead run
% \cs{para_end:}, which ultimately executes the initex
@@ -970,6 +960,7 @@
\cs_new_protected:Npn \para_end: {
% \end{macrocode}
%
+% CCC Maybe needs more explanation.
% TEMP NOTE: What should happen if in outer hmode with an empty hlist?
%
% The only case we care about is when we are in horizontal mode
@@ -1028,18 +1019,21 @@
% it should get removed before the hook code gets added so we have
% to arrange for this removal.
%
-% TEMP NOTE: maybe a ‘nobreak’ should also be added?
-%
-% [FMi:]
-% sounds wrong to me, why?
-% [CCC:] See email: because the hook may add some material,
-% such as glue that might produce an unintended linebreak.
-% [FMi:]
+% As in other simular cases, it maybe best to add here
+% a \cs{nobreak} in case the hook itself adds glue and thus
+% creates a non-explicit and unwanted potential breakpoont.
+% On the other hand (as has been argued) the code in the hook
+% should perhaps have the responsibility for adding such a
+% guard penalty in this casse.
+% This needs further analysis and decisions (as in emails).
%
+% In either case, good documentation of these hooks is essential,
+% covering what the hook may or should provide and all
+% such related considerations convernimg the content.
%
% There is not much point in checking if there was really a glue
% item at the end of the horizontal list, instead we simply try to
-% remove one using \cs{tex_unskip:D}, if there wasn't one this will
+% remove one using \cs{tex_unskip:D}: if there wasn't one this will
% do nothing.
% \begin{macrocode}
\tex_unskip:D
@@ -1065,7 +1059,8 @@
% primitive.
%
% There is however one other \TeX{} optimization that hurts: in a
-% sequence like this \verb=$$ ... $$ \par= \TeX{} will be in
+% sequence like this \verb=$$ ... $$ \par= (with \cs{par} being the primitive)
+% \TeX{} will be in
% horizontal mode after the display, ready to receive further
% paragraph text, but since the \cs{par} follows immediately there
% is a ``null'' paragraph at the end and \TeX{} simply throws that
@@ -1075,9 +1070,6 @@
% removing any space and appending \cs{parfillskip}, instead it
% simply goes silently to vmode.
%
-% TEMP NOTE: Is this actually how it works?
-% For any current definition of par?
-%
% Now if we would have added something (to
% prevent glue removal) that would look to \TeX{} like material
% after the display and so we would end up with an empty paragraph
@@ -1196,8 +1188,6 @@
% occasionally) and \cs{endgraf}, which is another name for the
% ``default'' action of \cs{par}.
%
-% TEMP NOTE: re endgraf again.
-%
% \begin{macrocode}
\cs_set_eq:NN \par \para_end:
\cs_set_eq:NN \@@par \para_end: