From 085271aaf9917d7116be9774c6cd0a117aa4111e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 5 Apr 2023 03:02:06 +0000 Subject: CTAN sync 202304050302 --- macros/latex/contrib/ragged2e/README.md | 3 ++- macros/latex/contrib/ragged2e/ragged2e.dtx | 36 ++++++++++++++++++----------- macros/latex/contrib/ragged2e/ragged2e.pdf | Bin 700154 -> 701509 bytes 3 files changed, 24 insertions(+), 15 deletions(-) (limited to 'macros/latex/contrib/ragged2e') diff --git a/macros/latex/contrib/ragged2e/README.md b/macros/latex/contrib/ragged2e/README.md index c60c60c531..ceeb824e7f 100644 --- a/macros/latex/contrib/ragged2e/README.md +++ b/macros/latex/contrib/ragged2e/README.md @@ -2,7 +2,7 @@ Copyright (C) Martin Schröder, 1996–2019, Marei Peischl (peiTeX) , 2021–2023 - ragged2e 2023/02/25 v3.4 + ragged2e 2023/04/04 v3.5 *************************************************************************** @@ -42,5 +42,6 @@ or want to report a suggestion for improvement, please visit * 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 * 3.4 Bugfix: Remove spurious spaces (Thanks to Enrico Gregorio for reporting) + * 3.5 Bugfix: Resolving performance issues created in v3.3 diff --git a/macros/latex/contrib/ragged2e/ragged2e.dtx b/macros/latex/contrib/ragged2e/ragged2e.dtx index 6ca9b7fc3d..00fdf28be9 100644 --- a/macros/latex/contrib/ragged2e/ragged2e.dtx +++ b/macros/latex/contrib/ragged2e/ragged2e.dtx @@ -31,7 +31,7 @@ % \iffalse \NeedsTeXFormat{LaTeX2e}[2021/06/01] %\ProvidesPackage{ragged2e} -% [2023/02/25 v3.4 ragged2e Package] +% [2023/04/04 v3.5 ragged2e Package] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -81,7 +81,7 @@ \end{document} % % \fi -% \CheckSum{518} +% \CheckSum{527} % %% \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 @@ -1085,8 +1085,9 @@ % \cs{RaggedSpaceskip} and % \cs{RaggedXSpaceskip}} % \changes{v2.01}{2003/02/20}{Removed the setting of \cs{xspaceskip}} +% \changes{v3.5}{2023/04/04}{Add mechanism to deactivate \cs{\@raggedtwoe@everyselectfont}} % \begin{macrocode} -\newcommand{\@raggedtwoe@everyselectfont}{% +\newcommand{\@raggedtwoe@everyselectfont@active}{% \if@raggedtwoe@spaceskip % \end{macrocode} % If no command defined by \package{ragged2e} is in use, we do @@ -1127,10 +1128,13 @@ {\@raggedtwoe@localhooktrue} {\EverySelectfont{\@raggedtwoe@everyselectfont}} % \end{macrocode} -% We define a command to only add the local hook with the ragged2e commands. -% This will keep the impact local. +% The hook is added globally but will be inactive when none of the ragged2e comands is used. +% \changes{v3.5}{2023/04/04}{Globally add inactive hook} % \begin{macrocode} -\newcommand*{\@raggedtwoe@addlocalhook}{} +\let\@raggedtwoe@everyselectfont\relax +\if@raggedtwoe@localhook + \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% +\fi % \end{macrocode} % \end{macro} % @@ -1214,6 +1218,7 @@ % \end{Quote} % Finally we signal the code inserted into \cs{selectfont} that % we are active and call that code directly. +% \changes{v3.5}{2023/04/04}{Bugfix: Only activate the global hook} % \changes{v3.4}{2023/02/25}{Bugfix: remove spurious space} % \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active} % \changes{v3.1}{2021/12/15}{Robustify the user macros (Thanks to Markus Kohm for the hint)} @@ -1222,7 +1227,7 @@ % \begin{macrocode} \DeclareRobustCommand{\Centering}{% \if@raggedtwoe@localhook - \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \let\@raggedtwoe@everyselectfont\@raggedtwoe@everyselectfont@active% \fi \ifx\\\@raggedtwoe@savedcr \let\\\@raggedtwoe@centercrNoindent @@ -1242,15 +1247,16 @@ % \begin{macro}{\RaggedLeft} % \cs{RaggedLeft} is like \cs{Centering}; it only uses other % parameters. +% \changes{v3.5}{2023/04/04}{Bugfix: Only activate the global hook} % \changes{v3.4}{2023/02/25}{Bugfix: remove spurious space} -% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active.} -% \changes{v3.1}{2021/12/15}{Robustify the user macros} +% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active} +% \changes{v3.1}{2021/12/15}{Robustify the user macros (Thanks to Markus Kohm for the hint)} % \changes{v2.00}{2003/01/04}{Call \cs{@raggedtwoe@everyselectfont} % and switch \cs{@gnewline}} % \begin{macrocode} \DeclareRobustCommand{\RaggedLeft}{% \if@raggedtwoe@localhook - \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \let\@raggedtwoe@everyselectfont\@raggedtwoe@everyselectfont@active% \fi \ifx\\\@raggedtwoe@savedcr \let\\\@raggedtwoe@centercrNoindent @@ -1270,15 +1276,16 @@ % \begin{macro}{\RaggedRight} % \cs{RaggedRight} is like \cs{Centering}; it only uses other % parameters. +% \changes{v3.5}{2023/04/04}{Bugfix: Only activate the global hook} % \changes{v3.4}{2023/02/25}{Bugfix: remove spurious space} -% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active.} +% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active} % \changes{v3.1}{2021/12/15}{Robustify the user macros (Thanks to Markus Kohm for the hint)} % \changes{v2.00}{2003/01/04}{Call \cs{@raggedtwoe@everyselectfont} % and switch \cs{@gnewline}} % \begin{macrocode} \DeclareRobustCommand{\RaggedRight}{% \if@raggedtwoe@localhook - \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \let\@raggedtwoe@everyselectfont\@raggedtwoe@everyselectfont@active% \fi \ifx\\\@raggedtwoe@savedcr \let\\\@raggedtwoe@centercrNoindent @@ -1298,14 +1305,15 @@ % \begin{macro}{\justifying} % \cs{justifying} switches back to the defaults used by \LaTeX{} for % typesetting justyfied text. +% \changes{v3.5}{2023/04/04}{Bugfix: Only activate the global hook} % \changes{v3.4}{2023/02/25}{Bugfix: remove spurious space} -% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active.} +% \changes{v3.3}{2023/02/22}{Apply hook only when a ragged2e command is active} % \changes{v3.1}{2021/12/15}{Robustify the user macros (Thanks to Markus Kohm for the hint)} % \changes{v2.00}{2003/01/04}{New macro} % \begin{macrocode} \DeclareRobustCommand{\justifying}{% \if@raggedtwoe@localhook - \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \let\@raggedtwoe@everyselectfont\@raggedtwoe@everyselectfont@active% \fi \let\\\@raggedtwoe@savedcr \let\@gnewline\@raggedtwoe@saved@gnewline diff --git a/macros/latex/contrib/ragged2e/ragged2e.pdf b/macros/latex/contrib/ragged2e/ragged2e.pdf index b104f464d3..eb9b619346 100644 Binary files a/macros/latex/contrib/ragged2e/ragged2e.pdf and b/macros/latex/contrib/ragged2e/ragged2e.pdf differ -- cgit v1.2.3