diff options
author | Karl Berry <karl@freefriends.org> | 2023-04-04 20:12:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-04-04 20:12:02 +0000 |
commit | 223b4f3317b36773937aa82b8ad3f4344cb38696 (patch) | |
tree | 459f1f8b10f0c0c64ed90351bdd9595a21c71383 /Master/texmf-dist/source/latex/ragged2e | |
parent | 51ba34542862fbf7dfac40fd52fd8bed8b2c7dcf (diff) |
ragged2e (4apr23)
git-svn-id: svn://tug.org/texlive/trunk@66760 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/ragged2e')
-rw-r--r-- | Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx b/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx index 6ca9b7fc3d8..00fdf28be91 100644 --- a/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx +++ b/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx @@ -31,7 +31,7 @@ % \iffalse \NeedsTeXFormat{LaTeX2e}[2021/06/01] %<package>\ProvidesPackage{ragged2e} -%<package> [2023/02/25 v3.4 ragged2e Package] +%<package> [2023/04/04 v3.5 ragged2e Package] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -81,7 +81,7 @@ \end{document} %</driver> % \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 |