From c84aa59f3cdf68baf9351d9c543b6ae8a47cc3d1 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 15 Dec 2021 21:31:28 +0000
Subject: ragged2e (15dec21)

git-svn-id: svn://tug.org/texlive/trunk@61313 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/ragged2e/ragged2e.dtx  | 29 ++++++++++++++--------
 1 file changed, 18 insertions(+), 11 deletions(-)

(limited to 'Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx')

diff --git a/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx b/Master/texmf-dist/source/latex/ragged2e/ragged2e.dtx
index 5c3408cf12f..397b810b401 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}[2017/03/29]
 %<package>\ProvidesPackage{ragged2e}
-%<package>         [2021/02/05 v3.0 ragged2e Package]
+%<package>         [2021/12/15 v3.1 ragged2e Package]
 %
 %<*driver>
 \documentclass[a4paper]{ltxdoc}
@@ -209,14 +209,17 @@
 %  \subsection{\LaTeX}
 %  ^^A
 %  \LaTeX{} defines e.\,g.\ \cs{raggedright} as follows:
+%  \changes{v3.1}{2021/12/15}{Use the updated definition of \cs{raggedright}}
 %    \begin{macrocode}
 %<*latex>
-\def\raggedright{%
-   \let\\=\@centercr
-   \@rightskip\@flushglue
-   \rightskip\@rightskip
-   \leftskip\z@
-   \parindent\z@}
+\DeclareRobustCommand
+	\raggedright{%
+	\let\\\@centercr
+	\@rightskip\@flushglue
+	\rightskip\@rightskip
+	\finalhyphendemerits=\z@
+	\leftskip\z@skip
+	\parindent\z@}
 %    \end{macrocode}
 %  Initially, \cs{@flushglue} is defined as
 %    \begin{macrocode}
@@ -1180,10 +1183,11 @@
 %  \end{Quote}
 %  Finally we signal the code inserted into \cs{selectfont} that
 %  we are active and call that code directly.
+%  \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}
-\newcommand{\Centering}{%
+\DeclareRobustCommand{\Centering}{%
    \ifx\\\@raggedtwoe@savedcr
       \let\\\@centercr
    \fi
@@ -1202,10 +1206,11 @@
 %  \begin{macro}{\RaggedLeft}
 %  \cs{RaggedLeft} is like \cs{Centering}; it only uses other
 %  parameters.
+%  \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}
-\newcommand{\RaggedLeft}{%
+\DeclareRobustCommand{\RaggedLeft}{%
    \ifx\\\@raggedtwoe@savedcr
       \let\\\@centercr
    \fi
@@ -1224,10 +1229,11 @@
 %  \begin{macro}{\RaggedRight}
 %  \cs{RaggedRight} is like \cs{Centering}; it only uses other
 %  parameters.
+%  \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}
-\newcommand{\RaggedRight}{%
+\DeclareRobustCommand{\RaggedRight}{%
    \ifx\\\@raggedtwoe@savedcr
       \let\\\@centercr
    \fi
@@ -1246,9 +1252,10 @@
 %  \begin{macro}{\justifying}
 %  \cs{justifying} switches back to the defaults used by \LaTeX{} for
 %  typesetting justyfied text.
+%  \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}
-\newcommand{\justifying}{%
+\DeclareRobustCommand{\justifying}{%
    \let\\\@raggedtwoe@savedcr
    \let\@gnewline\@raggedtwoe@saved@gnewline
    \leftskip\z@
-- 
cgit v1.2.3

