[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7053] XeTeX Unicode PDF destination name support
From: |
Masamichi Hosoda |
Subject: |
[7053] XeTeX Unicode PDF destination name support |
Date: |
Tue, 22 Mar 2016 14:45:55 +0000 |
Revision: 7053
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7053
Author: trueroad
Date: 2016-03-22 14:45:55 +0000 (Tue, 22 Mar 2016)
Log Message:
-----------
XeTeX Unicode PDF destination name support
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-03-22 07:04:31 UTC (rev 7052)
+++ trunk/ChangeLog 2016-03-22 14:45:55 UTC (rev 7053)
@@ -1,3 +1,9 @@
+2016-03-22 Masamichi Hosoda <address@hidden>
+
+ * doc/texinfo.tex (\iftxiuseunicodedestname): New switch.
+ (\pdfmkdest, \dopdfoutline, \pdfmakeoutlines):
+ Add XeTeX Unicode PDF destination name support.
+
2016-03-21 Gavin Smith <address@hidden>
* doc/texinfo.tex (\scanexp): Simply call \scanmacro instead of
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2016-03-22 07:04:31 UTC (rev 7052)
+++ trunk/doc/texinfo.tex 2016-03-22 14:45:55 UTC (rev 7053)
@@ -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-03-22.07}
+\def\texinfoversion{2016-03-22.14}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1515,9 +1515,23 @@
%
% For XeTeX
%
+\newif\iftxiuseunicodedestname
\ifx\XeTeXrevision\thisisundefined
\else
%
+ % XeTeX version check
+ %
+ \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99995}>-1
+ % XeTeX 0.99995+ contains xdvipdfmx 20160307+.
+ % It can handle Unicode destination name for PDF.
+ \txiuseunicodedestnametrue
+ \else
+ % XeTeX < 0.99995 can not handle Unicode destination name for PDF
+ % because xdvipdfmx 20150315 has UTF-16 convert issue.
+ % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+ \txiuseunicodedestnamefalse
+ \fi
+ %
% PDF outline support
%
\pdfmakepagedesttrue \relax
@@ -1528,15 +1542,25 @@
\def\pdfmkdest#1{{%
% We have to set dummies so commands such as @code, and characters
% such as \, aren't expanded when present in a section title.
- \indexnofonts % For avoiding UTF-16 convert issue of xdvipdfmx 20150315.
+ \indexnofonts
+ \iftxiuseunicodedestname
+ \def\pdfdestname{#1}% Pass through Unicode characters.
+ \else
+ \edef\pdfdestname{#1}% Replace Unicode characters to ASCII.
+ \fi
+ \turnoffactive
\makevalueexpandable
% In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
% Therefore \txiescapepdf is not necessary.
- \safewhatsit{\pdfdest name{#1} xyz}%
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
\def\dopdfoutline#1#2#3#4{%
- \edef\pdfoutlinedest{#3}%
+ \iftxiuseunicodedestname
+ \def\pdfoutlinedest{#3}% Pass through Unicode characters.
+ \else
+ \edef\pdfoutlinedest{#3}% Replace Unicode characters to ASCII.
+ \fi
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\fi
@@ -1577,7 +1601,7 @@
% In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
% Therefore, the encoding and the language may not be considered.
%
- \indexnofonts % For avoiding UTF-16 convert issue of xdvipdfmx 20150315.
+ \indexnofonts
\setupdatafile
% We can have normal brace characters in the PDF outlines, unlike
% Texinfo index files. So set that up.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7053] XeTeX Unicode PDF destination name support,
Masamichi Hosoda <=