[latex3-commits] [git/LaTeX3-latex3-latex2e] copyedits-chris: ltpara.dtx: more queries on the code (475d6bbb)

Chris Rowley car222222 at github.github.io
Wed Oct 6 15:17:12 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : copyedits-chris
Link       : https://github.com/latex3/latex2e/commit/475d6bbb036703ee8cd1ddd61a7daa679e231929

>---------------------------------------------------------------

commit 475d6bbb036703ee8cd1ddd61a7daa679e231929
Author: Chris Rowley <car222222 at users.noreply.github.com>
Date:   Wed Oct 6 20:17:12 2021 +0700

    ltpara.dtx: more queries on the code
    
    And some doc changes.


>---------------------------------------------------------------

475d6bbb036703ee8cd1ddd61a7daa679e231929
 base/ltpara.dtx | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/base/ltpara.dtx b/base/ltpara.dtx
index 3309aebb..53192c2a 100644
--- a/base/ltpara.dtx
+++ b/base/ltpara.dtx
@@ -970,6 +970,8 @@
 \cs_new_protected:Npn \para_end: {
 %    \end{macrocode}
 %
+%    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
 %    (i.e., doing typesetting) and not also in inner mode (i.e.,
 %    making paragraphs and not building an \cs{hbox}.
@@ -979,8 +981,12 @@
 %       { \bool_not_p:n { \mode_if_inner_p: } }
 %       { ...
 %    \end{macrocode}
+%
+%    TEMP NOTE: It looks as if the above code is actually used
+%       (including the … ) !! 
+%
 %    Since this is executed for each and every paragraph in a document
-%    we try to stay as fast as possible, So we are aren't using the
+%    we try to stay as fast as possible, so we do not use the
 %    above construct but two conditionals instead. Using low-level
 %    \cs{if_mode...} conditions would be even faster but has the
 %    danger to conflict with conditionals in the user hooks.
@@ -1025,9 +1031,13 @@
 %    If there was a glue item at the end of the list then
 %    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:]
 %
 %
@@ -1055,21 +1065,27 @@
 %    (if there was some). If we don't do this and the
 %    horizontal list ends in several glue items we would end up removing 
 %    two glue items instead of just the last one, which would be wrong.  
-%    We use glue (rather than a kern) as that will be removed by the primitive
-%    par.
+%    We use glue (rather than a kern) as that will be removed by the 
+%    primitive.
 %
 %    There is however one other \TeX{} optimization that hurts: in a
 %    sequence like this \verb=$$ ... $$ \par=  \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
-%    away. The space between \verb=$$= and \cs{par} got already
+%    away. 
+%    The space between \verb=$$= and \cs{par} got already
 %    dropped during the display processing so the \cs{par} is not
 %    removing any space and appending \cs{parfillskip}, instead it
-%    simply goes silently to vmode. Now if we would have added something (to
+%    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
-%    just containing \cs{parfillskip}.
+%    just containing a penalty and \cs{parfillskip}.
 %
 %    We therefore check if the current hlist does end in glue
 %    (\cs{tex_lastnodetype:D} has the value \texttt{11}) and





More information about the latex3-commits mailing list.