[latex3-commits] [latex2e-public] r1383 - ascii quotes in TU encoding

noreply at latex-project.org noreply at latex-project.org
Sun Feb 19 15:53:09 CET 2017


Author: carlisle
Date: 2017-02-19 15:53:09 +0100 (Sun, 19 Feb 2017)
New Revision: 1383

Modified:
   trunk/base/changes.txt
   trunk/base/ltoutenc.dtx
Log:
ascii quotes in TU encoding

Modified: trunk/base/changes.txt
===================================================================
--- trunk/base/changes.txt	2017-02-19 13:04:23 UTC (rev 1382)
+++ trunk/base/changes.txt	2017-02-19 14:53:09 UTC (rev 1383)
@@ -13,6 +13,8 @@
 	* ltoutenc.dtx: Guard against empty base in
 	\DeclareTextCompositeCommand, and \add at unicode@accent.
 	Declare \^{} and \~{} in tuenc.def.  
+	Declare \textquotesingle, \textasciigrave and
+	\textquotedbl for TU encoding (\remove at tlig version)
 
 2017-02-18  Joseph Wright  <latex-bugs at latex-project.org>
 

Modified: trunk/base/ltoutenc.dtx
===================================================================
--- trunk/base/ltoutenc.dtx	2017-02-19 13:04:23 UTC (rev 1382)
+++ trunk/base/ltoutenc.dtx	2017-02-19 14:53:09 UTC (rev 1383)
@@ -2649,8 +2649,10 @@
 % \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{~},
+%     declare composites with empty base for hat and tilde,
 %     use same slots for \cs{textasciicircum} ans \cs{textasciitilde}}
+% \changes{v2.0f}{2017/02/19}{%
+%     declare straight quotes using new \cs{remove at tlig} command}
 %
 % The TU encoding was originally introduced in the contributed
 % package \texttt{fontspec} as a Unicode encoding for XeTeX and
@@ -2714,6 +2716,29 @@
 % LuaTeX.
 %    \begin{macrocode}
     \def\UnicodeFontTeXLigatures{+tlig;}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+    \def\reserved at a#1{%
+      \def\@remove at tlig##1{\@remove at tlig@##1\@nil#1\@nil\relax}
+      \def\@remove at tlig@##1#1{\@remove at tlig@@##1}}
+    \edef\reserved at b{\detokenize{+tlig;}}
+    \expandafter\reserved at a\expandafter{\reserved at b}
+    \def\@remove at tlig@@#1\@nil#2\relax{#1}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+    \def\remove at tlig#1{%
+      \begingroup
+      \font\reserved at a
+      \expandafter\@remove at tlig\expandafter{\fontname\font}%
+      \reserved at a
+      \char#1\relax
+      \endgroup
+    }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
   \fi
 \else
 %    \end{macrocode}
@@ -2724,6 +2749,10 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+  \def\remove at tlig#1{\XeTeXglyph\numexpr\XeTeXcharglyph#1\relax}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \fi
 %    \end{macrocode}
 %
@@ -2752,6 +2781,15 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\DeclareTextCommand\textquotesingle \UnicodeEncodingName{%
+                                                \remove at tlig{"0027}}
+\DeclareTextCommand\textasciigrave  \UnicodeEncodingName{%
+                                                \remove at tlig{"0060}}
+\DeclareTextCommand\textquotedbl    \UnicodeEncodingName{%
+                                                \remove at tlig{"0022}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \DeclareTextSymbol{\textdollar}          \UnicodeEncodingName{"0024}
 \DeclareTextSymbol{\textless}            \UnicodeEncodingName{"003C}
 \DeclareTextSymbol{\textgreater}         \UnicodeEncodingName{"003E}



More information about the latex3-commits mailing list