diff options
Diffstat (limited to 'macros/latex/contrib/ragged2e/ragged2e.dtx')
-rw-r--r-- | macros/latex/contrib/ragged2e/ragged2e.dtx | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/macros/latex/contrib/ragged2e/ragged2e.dtx b/macros/latex/contrib/ragged2e/ragged2e.dtx index 817f1d6676..6ca9b7fc3d 100644 --- a/macros/latex/contrib/ragged2e/ragged2e.dtx +++ b/macros/latex/contrib/ragged2e/ragged2e.dtx @@ -2,7 +2,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Copyright (C) Martin Schröder, 1996–2019 -% Marei Peischl (peiTeX) <marei@peitex.de>, 2021–2023 +% Marei Peischl (peiTeX) <marei@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> [2023/02/22 v3.3 ragged2e Package] +%<package> [2023/02/25 v3.4 ragged2e Package] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -43,7 +43,7 @@ \usepackage{tabularx} \makeatletter \IfFileExists{gitHeadInfo.gin}{ - \newcommand*{\GI@githeadinfo@file}{gitHeadInfo.gin} + \newcommand*{\GI@githeadinfo@file}{gitHeadInfo.gin} }{} \makeatother \usepackage{gitinfo2} @@ -218,13 +218,13 @@ % \begin{macrocode} %<*latex> \DeclareRobustCommand - \raggedright{% - \let\\\@centercr - \@rightskip\@flushglue - \rightskip\@rightskip - \finalhyphendemerits=\z@ - \leftskip\z@skip - \parindent\z@} + \raggedright{% + \let\\\@centercr + \@rightskip\@flushglue + \rightskip\@rightskip + \finalhyphendemerits=\z@ + \leftskip\z@skip + \parindent\z@} % \end{macrocode} % Initially, \cs{@flushglue} is defined as % \begin{macrocode} @@ -558,7 +558,7 @@ % \item[\normalfont\package{everysel}\,\cite{everysel}](only if format older than 2021/01/05) % It has been used to distinguish between monospaced and proportional % fonts as long as the LaTeX kernel did not provide the functionality with lthooks \cite{lthooks-doc}. -% Formats newer than 2021/01/05 do no longer depend on everysel. +% Formats newer than 2021/01/05 do no longer depend on everysel. % \item[\normalfont\package{footmisc}\,\cite{footmisc}] % It is used by the \option{footnotes} and the % \option{document} options; at least version~5.00 (2002/08/28) @@ -1124,8 +1124,8 @@ % \begin{macrocode} \newif\if@raggedtwoe@localhook \IfFormatAtLeastTF{2021/01/05} - {\@raggedtwoe@localhooktrue} - {\EverySelectfont{\@raggedtwoe@everyselectfont}} + {\@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. @@ -1165,8 +1165,8 @@ % the content structure for tagging. % \begin{macrocode} \def\@raggedtwoe@centercrNoindent{% - \AddToHookNext{para/begin}{\OmitIndent}% - \@centercr% + \AddToHookNext{para/begin}{\OmitIndent}% + \@centercr% } % \end{macrocode} % \end{macro} @@ -1192,7 +1192,7 @@ \reserved@e {\reserved@f #1}\nobreak \hskip\z@ \break \else \reserved@e {\reserved@f #1}% - \@raggedtwoe@centercrNoindent + \@raggedtwoe@centercrNoindent \fi \fi } @@ -1214,14 +1214,16 @@ % \end{Quote} % Finally we signal the code inserted into \cs{selectfont} that % we are active and call that code directly. +% \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)} % \changes{v2.00}{2003/01/04}{Call \cs{@raggedtwoe@everyselectfont} % and switch \cs{@gnewline}} % \begin{macrocode} \DeclareRobustCommand{\Centering}{% - \if@raggedtwoe@localhook - \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont} - \fi + \if@raggedtwoe@localhook + \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \fi \ifx\\\@raggedtwoe@savedcr \let\\\@raggedtwoe@centercrNoindent \fi @@ -1240,14 +1242,16 @@ % \begin{macro}{\RaggedLeft} % \cs{RaggedLeft} is like \cs{Centering}; it only uses other % parameters. +% \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{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} - \fi + \if@raggedtwoe@localhook + \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \fi \ifx\\\@raggedtwoe@savedcr \let\\\@raggedtwoe@centercrNoindent \fi @@ -1266,14 +1270,16 @@ % \begin{macro}{\RaggedRight} % \cs{RaggedRight} is like \cs{Centering}; it only uses other % parameters. +% \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)} % \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} - \fi + \if@raggedtwoe@localhook + \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \fi \ifx\\\@raggedtwoe@savedcr \let\\\@raggedtwoe@centercrNoindent \fi @@ -1292,13 +1298,15 @@ % \begin{macro}{\justifying} % \cs{justifying} switches back to the defaults used by \LaTeX{} for % typesetting justyfied text. +% \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)} % \changes{v2.00}{2003/01/04}{New macro} % \begin{macrocode} \DeclareRobustCommand{\justifying}{% - \if@raggedtwoe@localhook - \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont} - \fi + \if@raggedtwoe@localhook + \AddToHook{selectfont}[ragged2e]{\@raggedtwoe@everyselectfont}% + \fi \let\\\@raggedtwoe@savedcr \let\@gnewline\@raggedtwoe@saved@gnewline \leftskip\z@ |