[latex3-commits] [git/LaTeX3-latex3-latex2e] softhyphen: Add \textsofthyphen (db00e613)

Marcel Fabian Krüger tex at 2krueger.de
Wed Apr 15 19:48:01 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : softhyphen
Link       : https://github.com/latex3/latex2e/commit/db00e613796f16d4b8a865e1b49c1a38d0b63cda

>---------------------------------------------------------------

commit db00e613796f16d4b8a865e1b49c1a38d0b63cda
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Wed Apr 15 19:43:33 2020 +0200

    Add \textsofthyphen


>---------------------------------------------------------------

db00e613796f16d4b8a865e1b49c1a38d0b63cda
 base/inputenc.dtx | 20 ++++++++++----------
 base/ltspace.dtx  | 13 +++++++++----
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/base/inputenc.dtx b/base/inputenc.dtx
index 01a8303e..53c34fa3 100644
--- a/base/inputenc.dtx
+++ b/base/inputenc.dtx
@@ -970,7 +970,7 @@
 \DeclareInputText{187}{\v t}
 \DeclareInputText{172}{\@tabacckludge'Z}
 \DeclareInputText{188}{\@tabacckludge'z}
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{189}{\H{}}
 \DeclareInputText{174}{\v Z}
 \DeclareInputText{190}{\v z}
@@ -1090,7 +1090,7 @@
 \DeclareInputText{187}{\u g}
 \DeclareInputText{172}{\^J}
 \DeclareInputText{188}{\^\j}
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{189}{\textonehalf}
 % \DeclareInputText{174}{\notdef}
 % \DeclareInputText{190}{\notdef}
@@ -1201,7 +1201,7 @@
 \DeclareInputText{170}{\@tabacckludge=E}
 \DeclareInputText{171}{\c G}
 \DeclareInputText{172}{\textTstroke}%% Northern Sami
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{174}{\v Z}
 \DeclareInputText{175}{\@tabacckludge={}}
 \DeclareInputText{176}{\textdegree}
@@ -1329,7 +1329,7 @@
 \DeclareInputText{187}{\guillemetright}
 \DeclareInputMath{172}{\lnot}
 \DeclareInputText{188}{\textonequarter}
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{189}{\textonehalf}
 \DeclareInputText{174}{\textregistered}
 \DeclareInputText{190}{\textthreequarters}
@@ -1619,7 +1619,7 @@
 %
 %    \begin{macrocode}
 \DeclareInputText{224}{\@tabacckludge'O}
-\DeclareInputText{240}{\-}
+\DeclareInputText{240}{\textsofthyphen}
 \DeclareInputText{225}{\ss}
 \DeclareInputMath{241}{\pm}
 \DeclareInputText{226}{\^O}
@@ -1744,7 +1744,7 @@
 %
 %    \begin{macrocode}
 \DeclareInputText{224}{\@tabacckludge'O}
-\DeclareInputText{240}{\-}
+\DeclareInputText{240}{\textsofthyphen}
 \DeclareInputText{225}{\ss}
 \DeclareInputText{241}{\H{}}
 \DeclareInputText{226}{\^O}
@@ -2517,7 +2517,7 @@
 \DeclareInputText{171}{\guillemetleft}
 \DeclareInputText{187}{\guillemetright}
 \DeclareInputMath{172}{\lnot}
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{174}{\textregistered}
 \DeclareInputText{175}{\@tabacckludge={}}
 \DeclareInputText{191}{\textquestiondown}
@@ -2657,7 +2657,7 @@
 \DeclareInputText{170}{\textcommabelow S}
 \DeclareInputText{171}{\guillemetleft}
 \DeclareInputText{172}{\@tabacckludge'Z}
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{174}{\@tabacckludge'z}
 \DeclareInputText{175}{\.Z}
 \DeclareInputText{176}{\textdegree}
@@ -2815,7 +2815,7 @@
 \DeclareInputText{170}{\c S}
 \DeclareInputText{171}{\guillemetleft}
 \DeclareInputMath{172}{\lnot}
-\DeclareInputText{173}{\-}% soft hyphen
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{174}{\textregistered}
 \DeclareInputText{175}{\.Z}
 \DeclareInputText{176}{\textdegree}
@@ -2956,7 +2956,7 @@
 \DeclareInputText{170}{\c R}
 \DeclareInputText{171}{\guillemetleft}
 \DeclareInputMath{172}{\lnot}
-\DeclareInputText{173}{\-}
+\DeclareInputText{173}{\textsofthyphen}
 \DeclareInputText{174}{\textregistered}
 \DeclareInputText{175}{\AE}
 \DeclareInputText{176}{\textdegree}
diff --git a/base/ltspace.dtx b/base/ltspace.dtx
index 93e152a2..981a5ba6 100644
--- a/base/ltspace.dtx
+++ b/base/ltspace.dtx
@@ -1218,17 +1218,22 @@
 % \end{macro}
 % \end{macro}
 %
-% \changes{v1.3m}{2020/04/15}{Made softhyphen active in TU engines}
+% \begin{macro}{\textsofthyphen}
+% \changes{v1.3m}{2020/04/11}{Macro added}
 %
-%   For Unicode engines, make the Unicode soft hyphen an active
-%   character defined as \cs{-}.
+%   This is a robust command that has the same effect as inserting a
+%   soft hyphen in the input. By default, it becomes \cs{-}.
+%   For Unicode engines, we also make the Unicode soft hyphen an active
+%   character defined as \cs{textsofthyphen}.
 %
 %    \begin{macrocode}
+\DeclareRobustCommand{\textsofthyphen}{\-}
 \ifx\Umathcode\@undefined\else
   \catcode "AD=13
-  \def^^ad{\-}
+  \def^^ad{\textsofthyphen{}}
 \fi
 %    \end{macrocode}
+% \end{macro}
 %
 % \begin{macro}{\obeycr}
 % \begin{macro}{\restorecr}





More information about the latex3-commits mailing list.