diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-08 01:16:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-08 01:16:09 +0000 |
commit | 0adf66fc426457e6bccec989503b6e2f2aafc630 (patch) | |
tree | 5a105c9e47c24d5c5b999d7fda94bdd46869040d /Build/source/build-aux | |
parent | 1a436ff76449deb5309038f32ab2824203c9cead (diff) |
tl-update-auto
git-svn-id: svn://tug.org/texlive/trunk@41821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/build-aux')
-rw-r--r-- | Build/source/build-aux/texinfo.tex | 246 |
1 files changed, 155 insertions, 91 deletions
diff --git a/Build/source/build-aux/texinfo.tex b/Build/source/build-aux/texinfo.tex index 059bbbfd892..9ff8c372aee 100644 --- a/Build/source/build-aux/texinfo.tex +++ b/Build/source/build-aux/texinfo.tex @@ -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-03.21} +\def\texinfoversion{2016-08-06.12} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -1108,8 +1108,13 @@ where each line of input produces a line of output.} % For LuaTeX % +\newif\iftxiuseunicodedestname +\txiuseunicodedestnamefalse % For pdfTeX etc. + \ifx\luatexversion\thisisundefined \else + % Use Unicode destination names + \txiuseunicodedestnametrue % Escape PDF strings UTF-8 to UTF-16 \begingroup \catcode`\%=12 @@ -1314,11 +1319,21 @@ output) for that.)} \indexnofonts \makevalueexpandable \turnoffactive - \ifx\luatexversion\thisisundefined - % pdfTeX: Use ASCII approximations in destination names. - \passthroughcharsfalse + \iftxiuseunicodedestname + \ifx \declaredencoding \latone + % Pass through Latin-1 characters. + % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode. + \else + \ifx \declaredencoding \utfeight + % Pass through Unicode characters. + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \fi + \fi \else - % LuaTeX: Pass through Unicode characters. + % Use ASCII approximations in destination names. + \passthroughcharsfalse \fi \def\pdfdestname{#1}% \txiescapepdf\pdfdestname @@ -1353,32 +1368,64 @@ output) for that.)} % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. { - \ifx\luatexversion\thisisundefined \else - \turnoffactive % LuaTeX can use Unicode strings for PDF + \turnoffactive + \ifx \declaredencoding \latone + % The PDF format can use an extended form of Latin-1 in bookmark + % strings. See Appendix D of the PDF Reference, Sixth Edition, for + % the "PDFDocEncoding". + \passthroughcharstrue + % Pass through Latin-1 characters. + % LuaTeX: Convert to Unicode + % pdfTeX: Use Latin-1 as PDFDocEncoding + \edef\pdfoutlinetext{#1}% + \iftxiuseunicodedestname + % Pass through Latin-1 characters. + % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode. + \edef\pdfoutlinedest{#3}% + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \edef\pdfoutlinedest{#3}% + \fi + \else + \ifx \declaredencoding \utfeight + \ifx\luatexversion\thisisundefined + % For pdfTeX with UTF-8. + % TODO: the PDF format can use UTF-16 in bookmark strings, + % but the code for this isn't done yet. + % Use ASCII approximations. + \passthroughcharsfalse + \edef\pdfoutlinetext{#1}% + \edef\pdfoutlinedest{#3}% + \else + % For LuaTeX with UTF-8. + % Pass through Unicode characters for title texts. + \passthroughcharstrue + \edef\pdfoutlinetext{#1}% + \iftxiuseunicodedestname + % Pass through Unicode characters for destination names. + \edef\pdfoutlinedest{#3}% + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \edef\pdfoutlinedest{#3}% + \fi + \fi + \else + % For non-Latin-1 or non-UTF-8 encodings. + % Use ASCII approximations. + \passthroughcharsfalse + \edef\pdfoutlinetext{#1}% + \edef\pdfoutlinedest{#3}% + \fi \fi - \edef\pdfoutlinedest{#3}% + % \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi - % - % Also escape PDF chars in the display string. - \bgroup - \ifx \declaredencoding \latone - % The PDF format can use an extended form of Latin-1 in bookmark - % strings. See Appendix D of the PDF Reference, Sixth Edition, for - % the "PDFDocEncoding". - \passthroughcharstrue - \fi - \ifx \declaredencoding \utfeight - % TODO: the PDF format can use UTF-16 in bookmark strings, but the - % code for this isn't done yet. - \fi - \globaldefs=1 - \edef\pdfoutlinetext{#1}% - \txiescapepdf\pdfoutlinetext - \egroup + \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } @@ -1539,7 +1586,6 @@ output) for that.)} % % For XeTeX % -\newif\iftxiuseunicodedestname \ifx\XeTeXrevision\thisisundefined \else % @@ -1616,13 +1662,15 @@ output) for that.)} % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts + \makevalueexpandable + \turnoffactive \iftxiuseunicodedestname - \def\pdfdestname{#1}% Pass through Unicode characters. + % Pass through Unicode characters. \else - \edef\pdfdestname{#1}% Replace Unicode characters with ASCII. + % Use ASCII approximations in destination names. + \passthroughcharsfalse \fi - \turnoffactive - \makevalueexpandable + \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} @@ -1632,25 +1680,26 @@ output) for that.)} \def\linkcolor{\rgbBlack} \def\endlink{\setcolor{\maincolor}\pdfendlink} % - \def\dopdfoutline#1#2#3#4{% + \def\dopdfoutline#1#2#3#4{{% + \turnoffactive + % Always use Unicode characters in title texts. + \def\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext \iftxiuseunicodedestname - \def\pdfoutlinedest{#3}% Pass through Unicode characters. + % Pass through Unicode characters. \else - \edef\pdfoutlinedest{#3}% Replace Unicode characters with ASCII. + % Use ASCII approximations in destination names. + \passthroughcharsfalse \fi + \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \fi - { - \turnoffactive - \txiescapepdf\pdfoutlinedest - \edef\pdfoutlinetext{#1}% - \txiescapepdf\pdfoutlinetext - % - \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A - << /S /GoTo /D (\pdfoutlinedest) >> >> }% - } - } + \txiescapepdf\pdfoutlinedest + % + \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A + << /S /GoTo /D (\pdfoutlinedest) >> >> }% + }} % \def\pdfmakeoutlines{% \begingroup @@ -5583,10 +5632,6 @@ end \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% An undocumented command % - % A bit of stretch before each entry for the benefit of balancing - % columns. - \vskip 0pt plus0.5pt - % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = @@ -5642,11 +5687,10 @@ end \global\setbox\entryindexbox=\vbox{\unhbox\boxA}% \else \global\setbox\entryindexbox=\vbox\bgroup - \prevdepth=\entrylinedepth - \noindent % We want the text of the entries to be aligned to the left, and the % page numbers to be aligned to the right. % + \parindent = 0pt \advance\leftskip by 0pt plus 1fil \advance\leftskip by 0pt plus -1fill \rightskip = 0pt plus -1fil @@ -5655,8 +5699,6 @@ end % if the list of page numbers is long, to be aligned to the right. \parfillskip=0pt plus -1fill % - \hangindent=1em - % \advance\rightskip by \entryrightmargin % Determine how far we can stretch into the margin. % This allows, e.g., "Appendix H GNU Free Documentation License" to @@ -5676,17 +5718,21 @@ end \ifdim\dimen@ > 0.8\dimen@ii % due to long index text \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly \dimen@ii = \hsize - \advance \dimen@ii by -1em \ifnum\dimen@>\dimen@ii % If the entry is too long, use the whole line \dimen@ = \dimen@ii \fi \advance\leftskip by 0pt plus 1fill % ragged right \advance \dimen@ by 1\rightskip - \parshape = 2 0pt \dimen@ 1em \dimen@ii - % Ideally we'd add a finite glue at the end of the first line only, but - % TeX doesn't seem to provide a way to do such a thing. + \parshape = 2 0pt \dimen@ 0em \dimen@ii + % Ideally we'd add a finite glue at the end of the first line only, + % instead of using \parshape with explicit line lengths, but TeX + % doesn't seem to provide a way to do such a thing. + % + \leftskip = 1em + \parindent = -1em \fi\fi + \indent % start paragraph \unhbox\boxA % % Do not prefer a separate line ending with a hyphen to fewer lines. @@ -5712,21 +5758,30 @@ end \newbox\entryindexbox \def\insertindexentrybox{% - \copy\entryindexbox - % The following gets the depth of the last box. This is for even - % line spacing when entries span several lines. - \setbox\dummybox\vbox{% - \unvbox\entryindexbox - \nointerlineskip - \lastbox - \global\entrylinedepth=\prevdepth + \ourunvbox\entryindexbox +} + +% Use \lastbox to take apart vbox box by box, and add each sub-box +% to the current vertical list. +\def\ourunvbox#1{% +\bgroup % for local binding of \delayedbox + % Remove the last box from box #1 + \global\setbox#1=\vbox{% + \unvbox#1% + \unskip % remove any glue + \unpenalty + \global\setbox\interbox=\lastbox }% - % Note that we couldn't simply \unvbox\entryindexbox followed by - % \nointerlineskip\lastbox to remove the last box and then reinstate it, - % because this resets how far the box has been \moveleft'ed to 0. \unvbox - % doesn't affect \prevdepth either. + \setbox\delayedbox=\box\interbox + \ifdim\ht#1=0pt\else + \ourunvbox#1 % Repeat on what's left of the box + \nobreak + \fi + \box\delayedbox +\egroup } -\newdimen\entrylinedepth +\newbox\delayedbox +\newbox\interbox % Default is no penalty \let\entrywidowpenalty\egroup @@ -5739,13 +5794,7 @@ end \def\isentry{\entry}% \ifx\firsttoken\isentry \else - \unskip\penalty 9000 - % The \unskip here stops breaking before the glue. It relies on the - % \vskip above being there, otherwise there is an error - % "You can't use `\unskip' in vertical mode". There has to be glue - % in the current vertical list that hasn't been added to the - % "current page". See Chapter 24 of the TeXbook. This contradicts - % Section 8.3.7 in "TeX by Topic," though. + \penalty 9000 \fi \egroup % now comes the box added with \aftergroup } @@ -5874,7 +5923,9 @@ end \advance\vsize by -1\doublecolumntopgap \vsize = 2\vsize \topskip=0pt - \global\entrylinedepth=0pt\relax + % + % For the benefit of balancing columns + \advance\baselineskip by 0pt plus 0.5pt } % The double-column output routine for all double-column pages except @@ -8850,20 +8901,31 @@ end % For pdfTeX and LuaTeX {\indexnofonts \makevalueexpandable - % - % This (wrongly) does not take account of leading or trailing - % spaces in #1, which should be ignored. - \ifx\luatexversion\thisisundefined - \edef\pdfxrefdest{#1}% pdfTeX: Replace Unicode characters with ASCII. - \else - \def\pdfxrefdest{#1}% LuaTeX: Pass through Unicode characters. - \fi \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. This ignores all spaces in % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \iftxiuseunicodedestname + \ifx \declaredencoding \latone + % Pass through Latin-1 characters. + \else + \ifx \declaredencoding \utfeight + % Pass through Unicode characters. + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \fi + \fi + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \fi + \def\pdfxrefdest{#1}% + % \ifx\pdfxrefdest\empty \def\pdfxrefdest{Top}% no empty targets \else @@ -8885,19 +8947,21 @@ end % For XeTeX {\indexnofonts \makevalueexpandable + \turnoffactive + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% % % This (wrongly) does not take account of leading or trailing % spaces in #1, which should be ignored. \iftxiuseunicodedestname - \def\pdfxrefdest{#1}% Pass through Unicode characters. + % Pass through Unicode characters. \else - \edef\pdfxrefdest{#1}% Replace Unicode characters with ASCII. + % Use ASCII approximations in destination names. + \passthroughcharsfalse \fi - \turnoffactive - % This expands tokens, so do it after making catcode changes, so _ - % etc. don't get their TeX definitions. This ignores all spaces in - % #4, including (wrongly) those in the middle of the filename. - \getfilename{#4}% + \def\pdfxrefdest{#1}% % \ifx\pdfxrefdest\empty \def\pdfxrefdest{Top}% no empty targets |