comparison build-aux/texinfo.tex @ 18239:c6ef0a25c37c

update from texinfo
author Karl Berry <karl@freefriends.org>
date Fri, 05 Feb 2016 08:50:20 -0800
parents 3b6f839270f8
children a781b7153fad
comparison
equal deleted inserted replaced
18238:acdac7ccfd11 18239:c6ef0a25c37c
1 % texinfo.tex -- TeX macros to handle Texinfo files. 1 % texinfo.tex -- TeX macros to handle Texinfo files.
2 % 2 %
3 % Load plain if necessary, i.e., if running under initex. 3 % Load plain if necessary, i.e., if running under initex.
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5 % 5 %
6 \def\texinfoversion{2016-02-02.07} 6 \def\texinfoversion{2016-02-05.07}
7 % 7 %
8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
11 % Free Software Foundation, Inc. 11 % Free Software Foundation, Inc.
1447 \let\setcolor = \gobble 1447 \let\setcolor = \gobble
1448 \let\pdfsetcolor = \gobble 1448 \let\pdfsetcolor = \gobble
1449 \let\pdfmakeoutlines = \relax 1449 \let\pdfmakeoutlines = \relax
1450 \fi % \ifx\pdfoutput 1450 \fi % \ifx\pdfoutput
1451 1451
1452 %
1453 % @image support for XeTeX
1454 %
1455 \newif\ifxeteximgpdf
1456 \ifx\XeTeXrevision\thisisundefined
1457 \else
1458 %
1459 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1460 \def\doxeteximage#1#2#3{%
1461 \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1462 \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1463 %
1464 % XeTeX (and the PDF format) support .pdf, .png, .jpg (among
1465 % others). Let's try in that order, PDF first since if
1466 % someone has a scalable image, presumably better to use that than a
1467 % bitmap.
1468 \let\xeteximgext=\empty
1469 \xeteximgpdffalse
1470 \begingroup
1471 \openin 1 #1.pdf \ifeof 1
1472 \openin 1 #1.PDF \ifeof 1
1473 \openin 1 #1.png \ifeof 1
1474 \openin 1 #1.jpg \ifeof 1
1475 \openin 1 #1.jpeg \ifeof 1
1476 \openin 1 #1.JPG \ifeof 1
1477 \errmessage{Could not find image file #1 for XeTeX}%
1478 \else \gdef\xeteximgext{JPG}%
1479 \fi
1480 \else \gdef\xeteximgext{jpeg}%
1481 \fi
1482 \else \gdef\xeteximgext{jpg}%
1483 \fi
1484 \else \gdef\xeteximgext{png}%
1485 \fi
1486 \else \gdef\xeteximgext{PDF} \global\xeteximgpdftrue%
1487 \fi
1488 \else \gdef\xeteximgext{pdf} \global\xeteximgpdftrue%
1489 \fi
1490 \closein 1
1491 \endgroup
1492 %
1493 \ifxeteximgpdf
1494 \XeTeXpdffile "#1".\xeteximgext ""
1495 \else
1496 \XeTeXpicfile "#1".\xeteximgext ""
1497 \fi
1498 \ifdim \wd0 >0pt width \xeteximagewidth \fi
1499 \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
1500 }
1501 \fi
1452 1502
1453 \message{fonts,} 1503 \message{fonts,}
1454 1504
1455 % Change the current font style to #1, remembering it in \curfontstyle. 1505 % Change the current font style to #1, remembering it in \curfontstyle.
1456 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in 1506 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
6052 \def\Ynothingkeyword{Ynothing} 6102 \def\Ynothingkeyword{Ynothing}
6053 \def\Yappendixkeyword{Yappendix} 6103 \def\Yappendixkeyword{Yappendix}
6054 \def\Yomitfromtockeyword{Yomitfromtoc} 6104 \def\Yomitfromtockeyword{Yomitfromtoc}
6055 % 6105 %
6056 \def\chapmacro#1#2#3{% 6106 \def\chapmacro#1#2#3{%
6057 \checkenv{}% chapters, etc., should not start inside an environment. 6107 \expandafter\ifx\thisenv\titlepage\else
6108 \checkenv{}% chapters, etc., should not start inside an environment.
6109 \fi
6110 % FIXME: \chapmacro is currently called from inside \titlepage when
6111 % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
6112 % this should probably be done by \sectionheading with an option to print
6113 % in chapter size.
6058 % 6114 %
6059 % Insert the first mark before the heading break (see notes for \domark). 6115 % Insert the first mark before the heading break (see notes for \domark).
6060 \let\prevchapterdefs=\lastchapterdefs 6116 \let\prevchapterdefs=\lastchapterdefs
6061 \let\prevsectiondefs=\lastsectiondefs 6117 \let\prevsectiondefs=\lastsectiondefs
6062 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% 6118 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
8599 % But we always want a comma and a space: 8655 % But we always want a comma and a space:
8600 ,\space 8656 ,\space
8601 % 8657 %
8602 % output the `page 3'. 8658 % output the `page 3'.
8603 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% 8659 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
8604 \if\noexpand\tokenafterxref\space 8660 % Add a , if xref followed by a space
8605 ,% add a , if xref not followed by punctuation 8661 \if\space\noexpand\tokenafterxref ,%
8606 \fi 8662 \else\ifx\ \tokenafterxref ,% @TAB
8663 \else\ifx\*\tokenafterxref ,% @*
8664 \else\ifx\ \tokenafterxref ,% @SPACE
8665 \else\ifx\
8666 \tokenafterxref ,% @NL
8667 \else\ifx\tie\tokenafterxref ,% @tie
8668 \fi\fi\fi\fi\fi\fi
8607 \fi\fi 8669 \fi\fi
8608 \fi 8670 \fi
8609 \endlink 8671 \endlink
8610 \endgroup} 8672 \endgroup}
8611 8673
9076 % eradicate the centering. 9138 % eradicate the centering.
9077 \ifx\centersub\centerV\else \noindent \fi 9139 \ifx\centersub\centerV\else \noindent \fi
9078 % 9140 %
9079 % Output the image. 9141 % Output the image.
9080 \ifpdf 9142 \ifpdf
9143 % For pdfTeX and LuaTeX <= 0.80
9081 \dopdfimage{#1}{#2}{#3}% 9144 \dopdfimage{#1}{#2}{#3}%
9082 \else 9145 \else
9083 % \epsfbox itself resets \epsf?size at each figure. 9146 \ifx\XeTeXrevision\thisisundefined
9084 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi 9147 % For epsf.tex
9085 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi 9148 % \epsfbox itself resets \epsf?size at each figure.
9086 \epsfbox{#1.eps}% 9149 \setbox0 = \hbox{\ignorespaces #2}%
9150 \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
9151 \setbox0 = \hbox{\ignorespaces #3}%
9152 \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
9153 \epsfbox{#1.eps}%
9154 \else
9155 % For XeTeX
9156 \doxeteximage{#1}{#2}{#3}%
9157 \fi
9087 \fi 9158 \fi
9088 % 9159 %
9089 \ifimagevmode 9160 \ifimagevmode
9090 \medskip % space after a standalone image 9161 \medskip % space after a standalone image
9091 \fi 9162 \fi