texlive[72769] Master/texmf-dist: setspaceenhanced (5nov24)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 5 21:18:50 CET 2024


Revision: 72769
          https://tug.org/svn/texlive?view=revision&revision=72769
Author:   karl
Date:     2024-11-05 21:18:50 +0100 (Tue, 05 Nov 2024)
Log Message:
-----------
setspaceenhanced (5nov24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/setspaceenhanced/README.md
    trunk/Master/texmf-dist/doc/latex/setspaceenhanced/setspaceenhanced.pdf
    trunk/Master/texmf-dist/source/latex/setspaceenhanced/setspaceenhanced.dtx
    trunk/Master/texmf-dist/tex/latex/setspaceenhanced/setspaceenhanced.sty

Modified: trunk/Master/texmf-dist/doc/latex/setspaceenhanced/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/setspaceenhanced/README.md	2024-11-05 20:18:42 UTC (rev 72768)
+++ trunk/Master/texmf-dist/doc/latex/setspaceenhanced/README.md	2024-11-05 20:18:50 UTC (rev 72769)
@@ -1,8 +1,8 @@
 # Package `setspaceenhanced`
 
-Copyright © 2008–2023 Markus Kohm
+Copyright © 2008–2024 Markus Kohm
 
-Release: 2023-10-09 v1.02
+Release: 2024-11-05 v1.03
 
 License: LPPL 1.3c
 
@@ -115,7 +115,7 @@
 can also become a developer and, e.g., make new test files to the
 packages. See the [`l3build`](https://ctan.org/pkg/l3build) manual for more
 information about tests. If you've created a new test and think that it would
-be useful. Please either do a pull request or [add a new
+be useful, please either do a pull request or [add a new
 issue](https://github.com/komascript/third-party-enhancements/issues/new/choose)
 and include your test file.
 
@@ -155,6 +155,10 @@
 
 # Changes
 
+Following only important changes, which are relevant for average users, will
+be listed. [The complete history can be found in the
+repository.](https://github.com/komascript/third-party-enhancements/commits/main/setspaceenhanced)
+
 v1.01 2023-09-19:
 
 - option `fontsize` has been renamed to `keepfontsize` because of

Modified: trunk/Master/texmf-dist/doc/latex/setspaceenhanced/setspaceenhanced.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/setspaceenhanced/setspaceenhanced.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/setspaceenhanced/setspaceenhanced.dtx	2024-11-05 20:18:42 UTC (rev 72768)
+++ trunk/Master/texmf-dist/source/latex/setspaceenhanced/setspaceenhanced.dtx	2024-11-05 20:18:50 UTC (rev 72769)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % setspaceenhanced.dtx
-% Copyright © 2008–2023 Markus Kohm
+% Copyright © 2008–2024 Markus Kohm
 %
 % This work is a KOMA-Script spin-off.  For the original sources of
 % KOMA-Script's `float.hak' see file `scrhack.dtx' in the KOMA-Script
@@ -32,7 +32,7 @@
 %</dtx>
 %<*dtx|package>
 %<package>\ProvidesExplPackage{setspaceenhanced}
-  {2023-10-09}{1.02}
+  {2024-11-05}{1.03}
   {%
 %<*dtx>
     sources and unpack driver of
@@ -349,7 +349,12 @@
   \opt{byselectfont} or \opt{byselectfont=true}. This will use the generic
   \LaTeX{} hook \texttt{selectfont} to reactivate \cs{onehalfspacing} or
   \cs{doublespacing} after every \cs{selectfont} if the font size has been
-  changed.
+  changed. However note, this is only done if baselineskip is not less than
+  the font size. So for a font selection like |\fontsize{6}{0}\selectfont| the
+  factor recalculation is ignored, because it does not make sense.\footnote{In
+    my opinion using a baselineskip less than the font size never makes
+    sense. But \LaTeX{} itself uses baselineskip 0 inside the definition of
+    \cs{LaTeX}.}
 \item[doublespacing=\meta{real}]%
   \DescribeOption{onehalfspacing}%
   \hfill initial=\texttt{nan}, default=\emph{empty}\\
@@ -607,6 +612,7 @@
 %
 % \begin{macro}{\@@_calc_stretch:}
 % \ExplSyntaxOff
+% \changes{v1.03}{2024/11/05}{special case \cs{f at baselineskip} < \cs{f at size}}
 % This macro is used to (re-)calculate the stretch factor
 % \cs{@@\_calcstretch} if the currently used constant is not
 % \texttt{nan}.
@@ -615,10 +621,16 @@
   {
     \fp_if_nan:nF { \g_@@_fp }
       {
-        \fp_set:Nn \g_@@_linespread_fp
+        \fp_compare:nNnTF { \dim_to_fp:n \f at baselineskip } < \f at size
           {
-            \f at size / \dim_to_fp:n { \f at baselineskip } * \g_@@_fp
+            \fp_set_eq:NN \g_@@_fp \g_@@_linespread_fp
           }
+          {  
+            \fp_set:Nn \g_@@_linespread_fp
+              {
+                \f at size / \dim_to_fp:n { \f at baselineskip } * \g_@@_fp
+              }
+          }
       }
   }
 %    \end{macrocode}
@@ -636,8 +648,7 @@
       {
         \cs_if_exist:NT \size at update
           {
-            \fp_set:Nn \l_tmpa_fp { \f at linespread }
-            \fp_compare:nNnT \g_@@_linespread_fp = \l_tmpa_fp
+            \fp_compare:nNnT \g_@@_linespread_fp = \f at linespread
               {
                 \@@_calc_stretch:
                 \set at fontsize

Modified: trunk/Master/texmf-dist/tex/latex/setspaceenhanced/setspaceenhanced.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/setspaceenhanced/setspaceenhanced.sty	2024-11-05 20:18:42 UTC (rev 72768)
+++ trunk/Master/texmf-dist/tex/latex/setspaceenhanced/setspaceenhanced.sty	2024-11-05 20:18:50 UTC (rev 72769)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesExplPackage{setspaceenhanced}
-  {2023-10-09}{1.02}
+  {2024-11-05}{1.03}
   {%
     improved setspace package%
   }
@@ -70,10 +70,16 @@
   {
     \fp_if_nan:nF { \g__setspaceenhanced_fp }
       {
-        \fp_set:Nn \g__setspaceenhanced_linespread_fp
+        \fp_compare:nNnTF { \dim_to_fp:n \f at baselineskip } < \f at size
           {
-            \f at size / \dim_to_fp:n { \f at baselineskip } * \g__setspaceenhanced_fp
+            \fp_set_eq:NN \g__setspaceenhanced_fp \g__setspaceenhanced_linespread_fp
           }
+          {
+            \fp_set:Nn \g__setspaceenhanced_linespread_fp
+              {
+                \f at size / \dim_to_fp:n { \f at baselineskip } * \g__setspaceenhanced_fp
+              }
+          }
       }
   }
 \hook_gput_code:nnn { selectfont } { setspaceenhanced }
@@ -82,8 +88,7 @@
       {
         \cs_if_exist:NT \size at update
           {
-            \fp_set:Nn \l_tmpa_fp { \f at linespread }
-            \fp_compare:nNnT \g__setspaceenhanced_linespread_fp = \l_tmpa_fp
+            \fp_compare:nNnT \g__setspaceenhanced_linespread_fp = \f at linespread
               {
                 \__setspaceenhanced_calc_stretch:
                 \set at fontsize



More information about the tex-live-commits mailing list.