[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7004] switch in \DeclareUnicodeCharacterNative
From: |
Gavin D. Smith |
Subject: |
[7004] switch in \DeclareUnicodeCharacterNative |
Date: |
Mon, 08 Feb 2016 17:50:12 +0000 |
Revision: 7004
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7004
Author: gavin
Date: 2016-02-08 17:50:11 +0000 (Mon, 08 Feb 2016)
Log Message:
-----------
switch in \DeclareUnicodeCharacterNative
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-02-08 13:37:10 UTC (rev 7003)
+++ trunk/ChangeLog 2016-02-08 17:50:11 UTC (rev 7004)
@@ -1,6 +1,20 @@
2016-02-08 Masamichi Hosoda <address@hidden>
* doc/texinfo.tex:
+ Native Unicode replace switching instead of re-definition.
+
+ (\ifpassthroughchars): New switch.
+ (\DeclareUnicodeCharacterNative):
+ Integrate \DeclareUnicodeCharacterNativeThru.
+ Add capable to switch replace / pass-through characters.
+ (\DeclareUnicodeCharacterNativeThru): Remove.
+ (\nativeunicodechardefsthru): Remove.
+ (\passthroughcharacters):
+ Use switch instead of \nativeunicodechardefsthru.
+
+2016-02-08 Masamichi Hosoda <address@hidden>
+
+ * doc/texinfo.tex:
Improve XeTeX PDF outline support.
(\pdfmkdest): Add \indexnofonts and \makevalueexpandable.
(\dopdfoutline): Add \turnoffactive.
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2016-02-08 13:37:10 UTC (rev 7003)
+++ trunk/doc/texinfo.tex 2016-02-08 17:50:11 UTC (rev 7004)
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2016-02-08.13}
+\def\texinfoversion{2016-02-08.17}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -10816,15 +10816,32 @@
\unicodechardefs
}
+\newif\ifpassthroughchars
+\passthroughcharsfalse
+
% For native Unicode (XeTeX and LuaTeX)
-% Definition macro to replace the Unicode character
+% Definition macro to replace / pass-through the Unicode character
%
\def\DeclareUnicodeCharacterNative#1#2{%
\catcode"#1=\active
+ \def\dodeclareunicodecharacternative##1##2##3{%
+ \begingroup
+ \uccode`\~="##2\relax
+ \uppercase{\gdef~}{%
+ \ifpassthroughchars
+ ##1%
+ \else
+ ##3%
+ \fi
+ }
+ \endgroup
+ }
\begingroup
- \uccode`\~="#1\relax
- \uppercase{\gdef~}{#2}%
- \endgroup}
+ \uccode`\.="#1\relax
+ \uppercase{\def\UTFNativeTmp{.}}%
+ \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
+ \endgroup
+}
% Native Unicode (XeTeX and LuaTeX) character replacing definitions
% It makes the setting that replace the Unicode characters.
@@ -10833,27 +10850,6 @@
\unicodechardefs
}
-% For native Unicode (XeTeX and LuaTeX)
-% Definition macro not to make the Unicode character expand to a non-active
-% token with the same character code. Used when writing to auxiliary files.
-%
-\def\DeclareUnicodeCharacterNativeThru#1#2{%
- \catcode"#1=\active
- \begingroup
- \uccode`\.="#1\relax
- \uppercase{\endgroup \def\UTFNativeTmp{.}}%
- \begingroup
- \uccode`\~="#1\relax
- \uppercase{\endgroup \edef~}{\UTFNativeTmp}%
-}
-
-% Native Unicode (XeTeX and LuaTeX) character ``through'' definitions.
-% It makes the setting that does not replace the Unicode characters.
-\def\nativeunicodechardefsthru{%
- \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeThru
- \unicodechardefs
-}
-
% For native Unicode (XeTeX and LuaTeX). Make the character token expand
% to the sequences given in \unicodechardefs for printing.
\def\DeclareUnicodeCharacterNativeAtU#1#2{%
@@ -10941,7 +10937,7 @@
\iftxiusebytewiseio
\nonasciistringdefs
\else
- \nativeunicodechardefsthru
+ \passthroughcharstrue
\fi
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7004] switch in \DeclareUnicodeCharacterNative,
Gavin D. Smith <=