[latex3-commits] [latex2e-public] r1382 - guard (and use) empty base in \DeclareTextComposite
noreply at latex-project.org
noreply at latex-project.org
Sun Feb 19 14:04:23 CET 2017
Author: carlisle
Date: 2017-02-19 14:04:23 +0100 (Sun, 19 Feb 2017)
New Revision: 1382
Modified:
trunk/base/changes.txt
trunk/base/ltoutenc.dtx
Log:
guard (and use) empty base in \DeclareTextComposite
Modified: trunk/base/changes.txt
===================================================================
--- trunk/base/changes.txt 2017-02-18 19:28:44 UTC (rev 1381)
+++ trunk/base/changes.txt 2017-02-19 13:04:23 UTC (rev 1382)
@@ -8,6 +8,12 @@
# 2017/01/01 PL 2 Release
#########################
+2017-02-19 David Carlisle <latex-bugs at latex-project.org>
+
+ * ltoutenc.dtx: Guard against empty base in
+ \DeclareTextCompositeCommand, and \add at unicode@accent.
+ Declare \^{} and \~{} in tuenc.def.
+
2017-02-18 Joseph Wright <latex-bugs at latex-project.org>
* ltluatex.dtx: parametrise Lua access to register
Modified: trunk/base/ltoutenc.dtx
===================================================================
--- trunk/base/ltoutenc.dtx 2017-02-18 19:28:44 UTC (rev 1381)
+++ trunk/base/ltoutenc.dtx 2017-02-19 13:04:23 UTC (rev 1382)
@@ -38,14 +38,14 @@
%<TU>\ProvidesFile{tuenc.def}
%<package>\ProvidesPackage{fontenc}
%<TS1sty>\ProvidesPackage{textcomp}
-%<OT1|T1|OMS|OML|OT4|TU|package|TS1sty> [2017/02/12 v2.0e
+%<OT1|T1|OMS|OML|OT4|TU|package|TS1sty> [2017/02/19 v2.0f
%<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file]
%<package|TS1sty> Standard LaTeX package]
%
%<*driver>
% \fi
\ProvidesFile{ltoutenc.dtx}
- [2017/02/12 v2.0e LaTeX Kernel (font encodings)]
+ [2017/02/19 v2.0f LaTeX Kernel (font encodings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutenc.dtx}
@@ -892,7 +892,7 @@
\expandafter\reserved at b\expandafter{\reserved at a{##1}}%
\fi
\expandafter\def\csname\expandafter\string\csname
- #2\endcsname\string#1-\string#3\endcsname{#4}}
+ #2\endcsname\string#1-\string#3\@empty\endcsname{#4}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -1662,6 +1662,8 @@
% {Added \cs{r} A}
% \changes{v1.96}{2002/10/28}{%
% coding change, to follow bug fix by DEK in plain.tex (pr/3469)}
+% \changes{v2.0f}{2017/02/19}{%
+% add \cs{@empty} to guard against 3rd argument being empty}
% \begin{macrocode}
\DeclareTextCompositeCommand{\r}{OT1}{A}
{\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen at -1ex%
@@ -2646,6 +2648,9 @@
% \changes{v2.0c}{2017/01/24}{Declare TU composites for i and j}
% \changes{v2.0d}{2017/01/24}{Declare macron composites for YyGg}
% \changes{v2.0e}{2017/02/12}{Declare fallback code for \cs{textasteriskcentered}}
+% \changes{v2.0f}{2017/02/19}{%
+% declare composites with empty base for \cs{^} and \cs{~},
+% use same slots for \cs{textasciicircum} ans \cs{textasciitilde}}
%
% The TU encoding was originally introduced in the contributed
% package \texttt{fontspec} as a Unicode encoding for XeTeX and
@@ -2735,7 +2740,9 @@
% Declare accent command to use a postpended combining character
% rather than the TeX |\accent| primitive
% \begin{macrocode}
-\def\add at unicode@accent#1#2{#2\char#1\relax}
+\def\add at unicode@accent#1#2{%
+ \relax\detokenize{#2}^^a0\else#2\fi
+ \char#1\relax}
% \end{macrocode}
%
% \begin{macrocode}
@@ -2749,10 +2756,12 @@
\DeclareTextSymbol{\textless} \UnicodeEncodingName{"003C}
\DeclareTextSymbol{\textgreater} \UnicodeEncodingName{"003E}
\DeclareTextSymbol{\textbackslash} \UnicodeEncodingName{"005C}
+\DeclareTextSymbol{\textasciicircum} \UnicodeEncodingName{"005E}
\DeclareTextSymbol{\textunderscore} \UnicodeEncodingName{"005F}
\DeclareTextSymbol{\textbraceleft} \UnicodeEncodingName{"007B}
\DeclareTextSymbol{\textbar} \UnicodeEncodingName{"007C}
\DeclareTextSymbol{\textbraceright} \UnicodeEncodingName{"007D}
+\DeclareTextSymbol{\textasciitilde} \UnicodeEncodingName{"007E}
\DeclareTextSymbol{\textexclamdown} \UnicodeEncodingName{"00A1}
\DeclareTextSymbol{\textcent} \UnicodeEncodingName{"00A2}
\DeclareTextSymbol{\textsterling} \UnicodeEncodingName{"00A3}
@@ -2808,9 +2817,7 @@
\DeclareTextComposite{\=} \UnicodeEncodingName{Y}{"0232}
\DeclareTextComposite{\=} \UnicodeEncodingName{y}{"0232}
\DeclareTextSymbol{\j} \UnicodeEncodingName{"0237}
-\DeclareTextSymbol{\textasciicircum} \UnicodeEncodingName{"02C6}
\DeclareTextSymbol{\textasciicaron} \UnicodeEncodingName{"02C7}
-\DeclareTextSymbol{\textasciitilde} \UnicodeEncodingName{"02DC}
\DeclareTextSymbol{\textasciibreve} \UnicodeEncodingName{"02D8}
\DeclareTextSymbol{\textacutedbl} \UnicodeEncodingName{"02DD}
\DeclareTextSymbol{\textgravedbl} \UnicodeEncodingName{"02F5}
@@ -2912,6 +2919,11 @@
% \end{macrocode}
%
% \begin{macrocode}
+\DeclareTextComposite{\^} \UnicodeEncodingName {}{"005E}
+\DeclareTextComposite{\~} \UnicodeEncodingName {}{"007E}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareTextComposite{\`} \UnicodeEncodingName{A}{"00C0}
\DeclareTextComposite{\'} \UnicodeEncodingName{A}{"00C1}
\DeclareTextComposite{\^} \UnicodeEncodingName{A}{"00C2}
More information about the latex3-commits
mailing list