texlive[66067] Master/texmf-dist: ragged2e (23feb23)

commits+karl at tug.org commits+karl at tug.org
Thu Feb 23 00:30:40 CET 2023


Revision: 66067
          http://tug.org/svn/texlive?view=revision&revision=66067
Author:   karl
Date:     2023-02-23 00:30:40 +0100 (Thu, 23 Feb 2023)
Log Message:
-----------
ragged2e (23feb23)

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

Modified: trunk/Master/texmf-dist/doc/latex/ragged2e/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ragged2e/README.md	2023-02-22 23:30:26 UTC (rev 66066)
+++ trunk/Master/texmf-dist/doc/latex/ragged2e/README.md	2023-02-22 23:30:40 UTC (rev 66067)
@@ -1,8 +1,8 @@
-# The `ragged2e' package
+# The `ragged2e` package
 
-Copyright (C) Martin Schröder, 1996–2019, Marei Peischl (peiTeX)  <marei at peitex.de>, 2021–2022
+Copyright (C) Martin Schröder, 1996–2019, Marei Peischl (peiTeX)  <marei at peitex.de>, 2021–2023
 
- ragged2e 2022/11/13 v3.2
+ ragged2e 2023/02/22 v3.3
 
 ***************************************************************************
 
@@ -40,5 +40,6 @@
    * 3.0 Move from everysel package to lthooks
    * 3.1 Robustify the user macros (Thanks for Markus Kohm for the hint)
    * 3.2 Fix bug adding a parskip when using `\newline` within the raggged2e alignments (Thanks to Maurice Hansen for reporting)
+   * 3.3 Only modify the alignment when one of the ragged2e commands is active
 
 

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

Modified: trunk/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx	2023-02-22 23:30:26 UTC (rev 66066)
+++ trunk/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx	2023-02-22 23:30:40 UTC (rev 66067)
@@ -2,7 +2,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 % Copyright (C) Martin Schröder, 1996–2019
-% 				Marei Peischl (peiTeX)  <marei at peitex.de>, 2021–2022
+% 				Marei Peischl (peiTeX)  <marei at peitex.de>, 2021–2023
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3c
@@ -31,7 +31,7 @@
 % \iffalse
 \NeedsTeXFormat{LaTeX2e}[2021/06/01]
 %<package>\ProvidesPackage{ragged2e}
-%<package>         [2022/11/13 v3.2 ragged2e Package]
+%<package>         [2023/02/22 v3.3 ragged2e Package]
 %
 %<*driver>
 \documentclass[a4paper]{ltxdoc}
@@ -41,6 +41,11 @@
 \usepackage{url}
 \usepackage{array}
 \usepackage{tabularx}
+\makeatletter
+\IfFileExists{gitHeadInfo.gin}{
+	\newcommand*{\GI at githeadinfo@file}{gitHeadInfo.gin}
+}{}
+\makeatother
 \usepackage{gitinfo2}
 \usepackage{geometry}
 \usepackage{booktabs}
@@ -76,7 +81,7 @@
 \end{document}
 %</driver>
 % \fi
-% \CheckSum{490}
+% \CheckSum{518}
 %
 %% \CharacterTable
 %% {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -134,7 +139,7 @@
 %  \title{\unskip
 %     The \textsf{ragged2e}-package^^A
 %     \thanks{^^A
-%        The version number of this file is \fileversion, 
+%        The version number of this file is \fileversion,
 %        revision~\#\gitAbbrevHash, last revised \protect\gitAuthorIsoDate.}^^A
 %     }
 %  \author{Martin Schröder\\\url{https://gitlab.com/TeXhackse/ragged2e}\thanks{maintained by Marei Peischl}}
@@ -144,7 +149,7 @@
 % ^^A -----------------------------
 %
 %  \begin{abstract}
-%     This package provides new commands and environments for setting 
+%     This package provides new commands and environments for setting
 %     ragged text which are easy to configure to allow hyphenation.
 %     An earlier attempt to do this was the style
 %     \package{raggedright}\,\cite{raggedri} by the same author.
@@ -167,11 +172,11 @@
 %  \changes{v3.0}{2021/02/05}{Change maintenance status}
 %  \section{The problem}
 %  ^^A
-%  \LaTeX{} has three commands (\cs{centering}, \cs{raggedleft}, and 
+%  \LaTeX{} has three commands (\cs{centering}, \cs{raggedleft}, and
 %  \cs{raggedright}) and three environments (\env{center},
 %  \env{flushleft}, and \env{flushright}) to typeset ragged text.
 %  The environments are based upon the commands (\env{center} uses
-%  \cs{centering}, \env{flushleft} \cs{raggedright}, and 
+%  \cs{centering}, \env{flushleft} \cs{raggedright}, and
 %  \env{flushright} \cs{raggedleft}).
 %
 %  These commands have, however, one serious flaw: they render
@@ -287,8 +292,8 @@
 %  \DescribeMacro{\Centering}
 %  \DescribeMacro{\RaggedLeft}
 %  \DescribeMacro{\RaggedRight}
-%  \cs{Centering}, \cs{RaggedLeft}, and \cs{RaggedRight} can be used in 
-%  the same way as \cs{centering}, \cs{raggedleft}, and 
+%  \cs{Centering}, \cs{RaggedLeft}, and \cs{RaggedRight} can be used in
+%  the same way as \cs{centering}, \cs{raggedleft}, and
 %  \cs{raggedright}:
 %  Just type the command, and after that the whole text will be set
 %  centered, ragged-left or ragged-right.
@@ -320,23 +325,23 @@
 %                              \cs{RaggedXSpaceskip}}%
 %  \begin{tabularx}{\linewidth}{lX}\toprule
 %     Command           & Uses\tabularnewline \midrule
-%     \cs{Centering}    & \cs{CenteringLeftskip}, 
+%     \cs{Centering}    & \cs{CenteringLeftskip},
 %                         \cs{CenteringRightskip},
 %                         \cs{CenteringParfillskip},
 %                         \cs{CenteringParindent}
 %                         \tabularnewline
-%     \cs{RaggedLeft}   & \cs{RaggedLeftLeftskip}, 
+%     \cs{RaggedLeft}   & \cs{RaggedLeftLeftskip},
 %                         \cs{RaggedLeftRightskip},
 %                         \cs{RaggedLeftParfillskip},
 %                         \cs{RaggedLeftParindent}
 %                         \tabularnewline
-%     \cs{RaggedRight}  & \cs{RaggedRightLeftskip}, 
+%     \cs{RaggedRight}  & \cs{RaggedRightLeftskip},
 %                         \cs{RaggedRightRightskip},
 %                         \cs{RaggedRightParfillskip},
 %                         \cs{RaggedRightParindent}
 %                         \tabularnewline
-%     \cs{justifying}   & \cs{JustifyingParfillskip}, 
-%                         \cs{JustifyingParindent} 
+%     \cs{justifying}   & \cs{JustifyingParfillskip},
+%                         \cs{JustifyingParindent}
 %                         \tabularnewline
 %     \bottomrule
 %  \end{tabularx}
@@ -350,7 +355,7 @@
 %  \DescribeMacro{\CenteringLeftskip}
 %  \DescribeMacro{\RaggedLeftLeftskip}
 %  \DescribeMacro{\RaggedRightLeftskip}
-%  These are the \cs{leftskip}s inserted by \cs{Centering}, 
+%  These are the \cs{leftskip}s inserted by \cs{Centering},
 %  \cs{RaggedLeft}, and \cs{RaggedRight}.
 %  \begin{Quote}
 %     \setlength{\tabcolsep}{.25em}
@@ -394,8 +399,8 @@
 %     \cite[p.~274]{KnuthTeXa}
 %     \end{tabularx}
 %  \end{Quote}
-%  The normal setting for \cs{parfillskip} is |0pt plus 1fil|; the 
-%  parameters are provided for testing combinations of 
+%  The normal setting for \cs{parfillskip} is |0pt plus 1fil|; the
+%  parameters are provided for testing combinations of
 %  \cs{}\{|left|$\mid$|right|\}|skip| and \cs{parfillskip}.
 %
 %  \DescribeMacro{\CenteringParindent}
@@ -492,29 +497,29 @@
 %  This package has the following options:
 %  \changes{v2.00}{2003/01/04}{Allow all-lowercase versions of
 %                              options and removed documentation of
-%                              mixed-case versions.} 
+%                              mixed-case versions.}
 %  \nopagebreak
 %  \begin{description}
 %     \item[\normalfont\option{originalcommands}]
-%        The \LaTeX-commands \cs{centering}, \cs{raggedleft}, and 
-%        \cs{raggedright} and the \LaTeX-environments \env{center}, 
+%        The \LaTeX-commands \cs{centering}, \cs{raggedleft}, and
+%        \cs{raggedright} and the \LaTeX-environments \env{center},
 %        \env{flushleft}, and \env{flushright} remain unchanged.\newline
 %        It is the default.
 %     \item[\normalfont\option{newcommands}]
-%        The \LaTeX-commands \cs{centering}, \cs{raggedleft}, and 
-%        \cs{raggedright} and the \LaTeX-environments \env{center}, 
+%        The \LaTeX-commands \cs{centering}, \cs{raggedleft}, and
+%        \cs{raggedright} and the \LaTeX-environments \env{center},
 %        \env{flushleft}, and \env{flushright} are set equal to their
 %        counterparts defined by \package{ragged2e}.
 %        Thus \cs{raggedright} invokes \cs{RaggedRight}.
-%        The original commands can be accessed unter the Names 
+%        The original commands can be accessed unter the Names
 %        \cs{LaTeX}\meta{original name}, e.\,g.\ \cs{LaTeXraggedright}.
 %     \item[\normalfont\option{originalparameters}]
-%        The parameters used by the commands implemented by 
-%        \package{ragged2e} are initialized with the default settings 
+%        The parameters used by the commands implemented by
+%        \package{ragged2e} are initialized with the default settings
 %        used by \LaTeX.
 %     \item[\normalfont\option{newparameters}]
-%        The parameters used by the commands implemented by 
-%        \package{ragged2e} are initialized with the default settings 
+%        The parameters used by the commands implemented by
+%        \package{ragged2e} are initialized with the default settings
 %        defined by \package{ragged2e}.\newline
 %        It is the default.
 %     \item[\normalfont\option{raggedrightboxes}]
@@ -583,7 +588,7 @@
 %  (\url{rsieger at awi-bremerhaven.de}) this package might not
 %  be.\newline
 %  Markus Kohm (\url{markus.kohm at gmx.de}) provided the code for
-%  \cs{@gnewline}.\newline 
+%  \cs{@gnewline}.\newline
 %  Frank Mittelbach (\url{frank.mittelbach at latex-project.org})
 %  provided the impetus for version~2.00.\newline
 %  Rolf Niepraschk (\url{Rolf.Niepraschk at gmx.de}) and Hubert Gäßlein
@@ -661,7 +666,7 @@
 % ^^A -----------------------------
 %
 %  \section{The implementation}
-%  \changes{v2.00}{2003/01/10}{Removed spaces and unneeded braces 
+%  \changes{v2.00}{2003/01/10}{Removed spaces and unneeded braces
 %                              from \cs{setlength}; replaced
 %                              \texttt{plus} with \cs{@plus}}
 %  \changes{v2.02}{2003/02/24}{Removed \cs{setlength}}
@@ -677,7 +682,7 @@
 %  \subsection{Initial Code}
 %  ^^A
 %  \begin{macro}{\if at raggedtwoe@originalcommands}
-%  \cs{if at raggedtwoe@originalcommands} is used to flag the use of the 
+%  \cs{if at raggedtwoe@originalcommands} is used to flag the use of the
 %  \option{originalcommands} or \option{newcommands} option.
 %    \begin{macrocode}
 \newif\if at raggedtwoe@originalcommands
@@ -685,7 +690,7 @@
 %  \end{macro}
 %
 %  \begin{macro}{\if at raggedtwoe@originalparameters}
-%  \cs{if at raggedtwoe@originalparameters} is used to flag the use of the 
+%  \cs{if at raggedtwoe@originalparameters} is used to flag the use of the
 %  \option{originalparameters} or \option{newparameters} option.
 %    \begin{macrocode}
 \newif\if at raggedtwoe@originalparameters
@@ -711,7 +716,7 @@
 %
 %  \subsubsection{\option{originalcommands} option}
 %  ^^A
-%  The \option{originalcommands} and \option{newcommands} options 
+%  The \option{originalcommands} and \option{newcommands} options
 %  control the meaning of the \LaTeX-commands for ragged text:
 %  If \option{newcommands} is used the \LaTeX-commands are set equal
 %  to the commands defined by \package{ragged2e}.
@@ -749,7 +754,7 @@
 %  \changes{v2.00}{2003/01/04}{New option \option{raggedrightboxes}}%
 %  The option \option{raggedrightboxes} sets all
 %  \cs{parbox}es, \env{minipage}s, \cs{marginpar}s and |p|-columns of
-%  \env{tabular}s and \env{array}s using \cs{RaggedRight}. 
+%  \env{tabular}s and \env{array}s using \cs{RaggedRight}.
 %  This is done by redefining \cs{@arrayparboxrestore}.
 % \begin{macro}{\@raggedtwoe at raggedrightboxes@opt}
 % \cs{@raggedtwoe at raggedrightboxes@opt} is the code executed via
@@ -771,9 +776,9 @@
     \parindent\z@ \parskip\z at skip
     \everypar{}%
     \linewidth\hsize
-    \@totalleftmargin\z@ 
+    \@totalleftmargin\z@
     \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
-    \parfillskip\@flushglue 
+    \parfillskip\@flushglue
     \lineskip\normallineskip
     \lineskiplimit\normallineskiplimit
     \baselineskip\normalbaselineskip
@@ -794,7 +799,7 @@
     \parskip\z at skip
     \everypar{}%
     \linewidth\hsize
-    \@totalleftmargin\z@ 
+    \@totalleftmargin\z@
     \RaggedRight
     \lineskip\normallineskip
     \baselineskip\normalbaselineskip
@@ -908,7 +913,7 @@
 %
 %  \subsection{Executing options}
 %  ^^A
-%  The default options are \option{originalcommands} and 
+%  The default options are \option{originalcommands} and
 %  \option{newparameters}.
 %    \begin{macrocode}
 \ExecuteOptions{originalcommands,newparameters}
@@ -1043,7 +1048,7 @@
 %
 %  \subsection{Distinguishing between monospaced and proportional fonts}
 %  ^^A
-%  To set ragged text with proportional fonts \emph{and} monospaced 
+%  To set ragged text with proportional fonts \emph{and} monospaced
 %  fonts correctly, we must distinguish between these two kinds of
 %  fonts \emph{everytime} a font is loaded.
 %  Otherwise the settings for e.\,g.\ a proportional fonts would be
@@ -1059,14 +1064,14 @@
 %  We do the setting with the help of \package{everysel}\,\cite{everysel},
 %  which allows us to define code which is (hopefully) executed after
 %  every fontchange in a \LaTeX{} document.\footnote{^^A
-%     It \emph{is} executed after every \cs{selectfont}, so if you stay 
-%     within NFSS and don't declare your fonts with commands like 
+%     It \emph{is} executed after every \cs{selectfont}, so if you stay
+%     within NFSS and don't declare your fonts with commands like
 %     \cs{newfont} and then switch to them, it will work.}
 %
 %  \begin{macro}{\if at raggedtwoe@spaceskip}
 %  \cs{if at raggedtwoe@spaceskip} signals the use of commands defined by
 %  \package{ragged2e} to the command inserted into \cs{selectfont}.
-%  It is set to true by these commands and restored to false by \TeX{} 
+%  It is set to true by these commands and restored to false by \TeX{}
 %  when the scope of them ends.
 %    \begin{macrocode}
 \newif\if at raggedtwoe@spaceskip
@@ -1074,7 +1079,7 @@
 %  \end{macro}
 %
 %  \begin{macro}{\@raggedtwoe at everyselectfont}
-%  \cs{@raggedtwoe at everyselectfont} is our code inserted into 
+%  \cs{@raggedtwoe at everyselectfont} is our code inserted into
 %  \cs{selectfont}.
 %  \changes{v2.00}{2003/01/26}{Completely redesigned and removed
 %                              \cs{RaggedSpaceskip} and
@@ -1099,7 +1104,7 @@
     \else
 %    \end{macrocode}
 %  For proportional fonts we make the interword space rigid by setting
-%  \cs{spaceskip} to \cs{fontdimen2}. 
+%  \cs{spaceskip} to \cs{fontdimen2}.
 %    \begin{macrocode}
       \spaceskip\fontdimen\tw@\font
     \fi
@@ -1115,11 +1120,18 @@
 %    \end{macrocode}
 % If our kernel is new enough we use the kernel hook directly instead of the everysel macro.
 % \changes{v3.00}{2021/02/05}{Use kernel hook if available}
+% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active.}
 %    \begin{macrocode}
+\newif\if at raggedtwoe@localhook
 \IfFormatAtLeastTF{2021/01/05}
-	{\AddToHook{selectfont}{\@raggedtwoe at everyselectfont}}
+	{\@raggedtwoe at localhooktrue}
 	{\EverySelectfont{\@raggedtwoe at everyselectfont}}
 %    \end{macrocode}
+% We define a command to only add the local hook with the ragged2e commands.
+% This will keep the impact local.
+%    \begin{macrocode}
+\newcommand*{\@raggedtwoe at addlocalhook}{}
+%     \end{macrocode}
 %  \end{macro}
 %
 %
@@ -1137,7 +1149,7 @@
 %
 %  \begin{macro}{\@raggedtwoe at saved@gnewline}
 %  \changes{v2.00}{2003/01/04}{New macro}
-%  We save the definition of \cs{@gnewline} in 
+%  We save the definition of \cs{@gnewline} in
 %  \cs{@raggedtwoe at saved@gnewline}.
 %    \begin{macrocode}
 \let\@raggedtwoe at saved@gnewline\@gnewline
@@ -1168,7 +1180,7 @@
 %    \begin{macrocode}
 \newcommand*{\@raggedtwoe at gnewline}[1]{%
   \ifvmode
-    \@nolnerr 
+    \@nolnerr
   \else
     \unskip
     \ifmmode
@@ -1207,6 +1219,9 @@
 %                              and switch \cs{@gnewline}}
 %    \begin{macrocode}
 \DeclareRobustCommand{\Centering}{%
+	\if at raggedtwoe@localhook
+		\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+	\fi
    \ifx\\\@raggedtwoe at savedcr
       \let\\\@raggedtwoe at centercrNoindent
    \fi
@@ -1230,6 +1245,9 @@
 %                              and switch \cs{@gnewline}}
 %    \begin{macrocode}
 \DeclareRobustCommand{\RaggedLeft}{%
+	\if at raggedtwoe@localhook
+		\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+	\fi
    \ifx\\\@raggedtwoe at savedcr
       \let\\\@raggedtwoe at centercrNoindent
    \fi
@@ -1253,6 +1271,9 @@
 %                              and switch \cs{@gnewline}}
 %    \begin{macrocode}
 \DeclareRobustCommand{\RaggedRight}{%
+	\if at raggedtwoe@localhook
+		\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+	\fi
    \ifx\\\@raggedtwoe at savedcr
       \let\\\@raggedtwoe at centercrNoindent
    \fi
@@ -1275,6 +1296,9 @@
 %  \changes{v2.00}{2003/01/04}{New macro}
 %    \begin{macrocode}
 \DeclareRobustCommand{\justifying}{%
+	\if at raggedtwoe@localhook
+		\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+	\fi
    \let\\\@raggedtwoe at savedcr
    \let\@gnewline\@raggedtwoe at saved@gnewline
    \leftskip\z@
@@ -1297,7 +1321,7 @@
 %  \begin{environment}{FlushLeft}
 %  \begin{environment}{FlushRight}
 %  The environments \env{Center}, \env{FlushLeft}, and \cs{FlushRight}
-%  are implemented like their counterparts in \LaTeX: Start a 
+%  are implemented like their counterparts in \LaTeX: Start a
 %  \env{trivlist} and switch on the right command.
 %  \changes{v2.02}{2003/02/24}{Use \cs{trivlist} \ldots{}
 %                              \cs{endtrivlist} instead of
@@ -1327,7 +1351,7 @@
 %  \end{environment}
 %  \end{environment}
 %  \begin{environment}{justify}
-%  \env{justify} is similar to the other environments: Start a 
+%  \env{justify} is similar to the other environments: Start a
 %  \env{trivlist} and use \cs{justifying}.
 %  \changes{v2.00}{2003/01/04}{New environment}
 %  \changes{v2.02}{2003/02/24}{Use \cs{trivlist} \ldots{}
@@ -1349,7 +1373,7 @@
 %
 %  \subsection{Overloading the \LaTeX-commands}
 %  ^^A
-%  If the option \option{newcommands} is used, we save the original 
+%  If the option \option{newcommands} is used, we save the original
 %  \LaTeX-commands and environments for ragged text and overload them.
 %  \changes{v2.04}{2003/03/02}{Save more commands}
 %  \changes{v2.1}{2003/10/08}{bugfix: \cs{Flushleft} instead of
@@ -1364,13 +1388,13 @@
    \let\raggedleft\RaggedLeft
    \let\raggedright\RaggedRight
    \let\LaTeXcenter\center
-   \let\endLaTeXcenter\endcenter 
+   \let\endLaTeXcenter\endcenter
    \let\LaTeXflushleft\flushleft
    \let\endLaTeXflushleft\endflushleft
    \let\LaTeXflushright\flushright
    \let\endLaTeXflushright\endflushright
    \let\center\Center
-   \let\endcenter\endCenter 
+   \let\endcenter\endCenter
    \let\flushleft\FlushLeft
    \let\endflushleft\endFlushLeft
    \let\flushright\FlushRight

Modified: trunk/Master/texmf-dist/source/latex/ragged2e/ragged2e.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/ragged2e/ragged2e.ins	2023-02-22 23:30:26 UTC (rev 66066)
+++ trunk/Master/texmf-dist/source/latex/ragged2e/ragged2e.ins	2023-02-22 23:30:40 UTC (rev 66067)
@@ -1,7 +1,7 @@
 \input docstrip.tex
 
 \preamble
-Copyright (C) 1996–2019 Martin Schröder, 2021–2022 Marei Peischl (peiTeX)  <marei at peitex.de>
+Copyright (C) 1996–2019 Martin Schröder, 2021–2023 Marei Peischl (peiTeX)  <marei at peitex.de>
 
 This work may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either version 1.3c

Modified: trunk/Master/texmf-dist/tex/latex/ragged2e/ragged2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ragged2e/ragged2e.sty	2023-02-22 23:30:26 UTC (rev 66066)
+++ trunk/Master/texmf-dist/tex/latex/ragged2e/ragged2e.sty	2023-02-22 23:30:40 UTC (rev 66067)
@@ -5,7 +5,7 @@
 %% The original source files were:
 %%
 %% ragged2e.dtx  (with options: `package')
-%% Copyright (C) 1996–2019 Martin Schröder, 2021–2022 Marei Peischl (peiTeX)  <marei at peitex.de>
+%% Copyright (C) 1996–2019 Martin Schröder, 2021–2023 Marei Peischl (peiTeX)  <marei at peitex.de>
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3c
@@ -28,7 +28,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}[2021/06/01]
 \ProvidesPackage{ragged2e}
-         [2022/11/13 v3.2 ragged2e Package]
+         [2023/02/22 v3.3 ragged2e Package]
 %% \CharacterTable
 %% {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %%  Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -178,9 +178,11 @@
     \spaceskip\z@
   \fi
   }
+\newif\if at raggedtwoe@localhook
 \IfFormatAtLeastTF{2021/01/05}
-{\AddToHook{selectfont}{\@raggedtwoe at everyselectfont}}
+{\@raggedtwoe at localhooktrue}
 {\EverySelectfont{\@raggedtwoe at everyselectfont}}
+\newcommand*{\@raggedtwoe at addlocalhook}{}
 \let\@raggedtwoe at savedcr\\
 \let\@raggedtwoe at saved@gnewline\@gnewline
 \def\@raggedtwoe at centercrNoindent{%
@@ -201,6 +203,9 @@
   \fi
   }
 \DeclareRobustCommand{\Centering}{%
+\if at raggedtwoe@localhook
+\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+\fi
    \ifx\\\@raggedtwoe at savedcr
       \let\\\@raggedtwoe at centercrNoindent
    \fi
@@ -214,6 +219,9 @@
    \@raggedtwoe at everyselectfont
    }
 \DeclareRobustCommand{\RaggedLeft}{%
+\if at raggedtwoe@localhook
+\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+\fi
    \ifx\\\@raggedtwoe at savedcr
       \let\\\@raggedtwoe at centercrNoindent
    \fi
@@ -227,6 +235,9 @@
    \@raggedtwoe at everyselectfont
    }
 \DeclareRobustCommand{\RaggedRight}{%
+\if at raggedtwoe@localhook
+\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+\fi
    \ifx\\\@raggedtwoe at savedcr
       \let\\\@raggedtwoe at centercrNoindent
    \fi
@@ -240,6 +251,9 @@
    \@raggedtwoe at everyselectfont
    }
 \DeclareRobustCommand{\justifying}{%
+\if at raggedtwoe@localhook
+\AddToHook{selectfont}[ragged2e]{\@raggedtwoe at everyselectfont}
+\fi
    \let\\\@raggedtwoe at savedcr
    \let\@gnewline\@raggedtwoe at saved@gnewline
    \leftskip\z@



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