[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: fix issue and more docu (1916f615)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Feb 15 18:10:02 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/1916f61595ef6eb127694770d75465abcb5ff5ad

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

commit 1916f61595ef6eb127694770d75465abcb5ff5ad
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Jan 30 18:20:30 2023 +0100

    fix issue and more docu


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

1916f61595ef6eb127694770d75465abcb5ff5ad
 base/changes.txt      |  6 ++++++
 base/doc/ltnews37.tex | 19 +++++++++++++++++++
 base/ltpara.dtx       |  5 +++--
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index e28029ef..a0f52146 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2023-01-30  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltpara.dtx (subsection{Providing hooks for paragraphs}):
+	Backout \parskip at top of minipage if it shouldn't be there
+	but is due to whatsits (gh/989)
+
 2023-01-16 Yukai Chou <muzimuzhi at gmail.com>
 
 	* ltnews.cls:
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index e1dff604..a00c2c94 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -385,6 +385,25 @@ the previous release, but only now documented in a newletter.
 \githubissue{967}
 
 
+\subsection{Improve spacing at top of \env{minipages}}
+
+A list and several other document elements add some vertical space in
+front of them. However this should not happen at the beginning of a
+box (such as a \env{minipage}) and normally it doesnn't, because
+\TeX{} automatically drops such spaces at the start of a vertical
+list. However, if there is some invisible material, sich as a
+\cs{color} command, some \pkg{hyperref} anchor, a \cs{write} or
+something else, then list is no longer empty and \TeX{} no longer drops
+spaces, hence the difference.
+
+With the new paragraph handling introduced in 2021 it is now finally
+possible to detect and avoid this problem and apply appropriate
+counter measures so that from now on the spacing will be always
+correct.
+%
+\githubissue{989}
+
+
 
 \section{Changes to packages in the \pkg{amsmath} category}
 
diff --git a/base/ltpara.dtx b/base/ltpara.dtx
index e0d43fd1..80d5fd19 100644
--- a/base/ltpara.dtx
+++ b/base/ltpara.dtx
@@ -14,7 +14,7 @@
 %%% From File: ltpara.dtx
 %
 %    \begin{macrocode}
-\def\ltparaversion{v1.0k}
+\def\ltparaversion{v1.0l}
 \def\ltparadate{2023/01/30}
 %    \end{macrocode}
 %<*driver>
@@ -783,12 +783,13 @@
 %    the new paragraph handling we are in a better position: while we
 %    still don't know if there is such a space or not, we know know
 %    that we have just created an empty paragraph. Thus, if we now set
-%    \cs{parskip} to \texttt{-\parskip} the two will cancel each other
+%    \cs{parskip} to \texttt{-}\cs{parskip} the two will cancel each other
 %    if present and if the first was ignored because the vertical list
 %    was empty, then the second will be ignored too because it is
 %    still empty. Of course, we don't want to cancel always but only
 %    at the start of a minipage and that is signaled with the
 %    \texttt{@minipage} switch.
+% \changes{v1.0l}{2023/01/30}{Backout \cs{parskip} at top of minipage (gh/989)}
 %    \begin{macrocode}
     \skip_set:Nn \tex_parskip:D
          {\if at minipage -\tex_parskip:D \else \c_zero_skip \fi:}





More information about the latex3-commits mailing list.