[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7309] XeTeX PDF destination name
From: |
trueroad |
Subject: |
[7309] XeTeX PDF destination name |
Date: |
Mon, 8 Aug 2016 23:17:09 +0000 (UTC) |
Revision: 7309
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7309
Author: trueroad
Date: 2016-08-08 23:17:09 +0000 (Mon, 08 Aug 2016)
Log Message:
-----------
XeTeX PDF destination name
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-08-08 23:10:43 UTC (rev 7308)
+++ trunk/ChangeLog 2016-08-08 23:17:09 UTC (rev 7309)
@@ -1,5 +1,17 @@
2016-08-08 Masamichi Hosoda <address@hidden>
+ * doc/texinfo.tex (\setpdfdestname): New macro for XeTeX.
+ (\pdfdestname): Escaped PDF destination name
+ is set by \setpdfdestname.
+ (\setpdfoutlinetext): New macro for XeTeX.
+ (\pdfoutlinetext): Converted and escaped outline text
+ is set by \setpdfoutlinetext.
+ (\pdfmkdest): Use \setpdfdestname.
+ (\dopdfoutline): Use \setpdfdestname and \setpdfoutlinetext.
+ (\xrefX): Use \setpdfdestname.
+
+2016-08-08 Masamichi Hosoda <address@hidden>
+
* doc/texinfo.tex (\setpdfdestname): New macro for pdfTeX and LuaTeX.
(\pdfdestname): Escaped PDF destination name
is set by \setpdfdestname.
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2016-08-08 23:10:43 UTC (rev 7308)
+++ trunk/doc/texinfo.tex 2016-08-08 23:17:09 UTC (rev 7309)
@@ -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-08-08.22}
+\def\texinfoversion{2016-08-08.23}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1672,7 +1672,8 @@
\def\pdfdest name#1 xyz{%
\special{pdf:dest (#1) address@hidden /XYZ @xpos @ypos null]}%
}
- \def\pdfmkdest#1{{%
+ %
+ \def\setpdfdestname#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
@@ -1686,37 +1687,37 @@
\fi
\def\pdfdestname{#1}%
\txiescapepdf\pdfdestname
- \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
- % by default, use black for everything.
- \def\urlcolor{\rgbBlack}
- \def\linkcolor{\rgbBlack}
- \def\endlink{\setcolor{\maincolor}\pdfendlink}
- %
- \def\dopdfoutline#1#2#3#4{{%
+ \def\setpdfoutlinetext#1{{%
\turnoffactive
% Always use Unicode characters in title texts.
\def\pdfoutlinetext{#1}%
% For XeTeX, xdvipdfmx converts to UTF-16.
% So we do not convert.
\txiescapepdf\pdfoutlinetext
- \iftxiuseunicodedestname
- % Pass through Unicode characters.
- \else
- % Use ASCII approximations in destination names.
- \passthroughcharsfalse
+ }}
+ %
+ \def\pdfmkdest#1{%
+ \setpdfdestname{#1}%
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }
+ %
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \def\linkcolor{\rgbBlack}
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ \setpdfoutlinetext{#1}
+ \setpdfdestname{#3}
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{#4}%
\fi
- \def\pdfoutlinedest{#3}%
- \ifx\pdfoutlinedest\empty
- \def\pdfoutlinedest{#4}%
- \fi
- % Use UTF-8 or ASCII
- \txiescapepdf\pdfoutlinedest
%
\special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
- << /S /GoTo /D (\pdfoutlinedest) >> >> }%
- }}
+ << /S /GoTo /D (\pdfdestname) >> >> }%
+ }
%
\def\pdfmakeoutlines{%
\begingroup
@@ -8947,18 +8948,10 @@
%
% This (wrongly) does not take account of leading or trailing
% spaces in #1, which should be ignored.
- \iftxiuseunicodedestname
- % Pass through Unicode characters.
- \else
- % Use ASCII approximations in destination names.
- \passthroughcharsfalse
- \fi
- \def\pdfxrefdest{#1}%
+ \setpdfdestname{#1}%
%
- \ifx\pdfxrefdest\empty
- \def\pdfxrefdest{Top}% no empty targets
- \else
- \txiescapepdf\pdfxrefdest % escape PDF special chars
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{Top}% no empty targets
\fi
%
\leavevmode
@@ -8972,10 +8965,10 @@
% this command line option is no longer necessary
% because we can use the `dvipdfmx:config' special.
\special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
- << /S /GoToR /F (\the\filename.pdf) /D (\pdfxrefdest) >> >>}%
+ << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
\else
\special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
- << /S /GoTo /D (\pdfxrefdest) >> >>}%
+ << /S /GoTo /D (\pdfdestname) >> >>}%
\fi
}%
\setcolor{\linkcolor}%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7309] XeTeX PDF destination name,
trueroad <=