summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-23 04:20:42 +0000
committerJim Meyering <jim@meyering.net>1999-04-23 04:20:42 +0000
commit34942b9da83fb14b0238747309d3ba1ee4a8ba24 (patch)
tree770f6d27d6979b4648224b7040efaa28ae0dbf3c /doc
parent4cbb965035eed4facfdacd0469deb84a0c8dbcc5 (diff)
downloadcoreutils-34942b9da83fb14b0238747309d3ba1ee4a8ba24.tar.xz
import latest
Diffstat (limited to 'doc')
-rw-r--r--doc/texinfo.tex211
1 files changed, 193 insertions, 18 deletions
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 3e5019e1e..793f38a67 100644
--- a/doc/texinfo.tex
+++ b/doc/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{1999-03-31.13}%
+\def\texinfoversion{1999-04-22.19}%
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
% Free Software Foundation, Inc.
@@ -67,7 +67,6 @@
\catcode`+=\active \catcode`\_=\active}
% Save some parts of plain tex whose names we will redefine.
-
\let\ptexb=\b
\let\ptexbullet=\bullet
\let\ptexc=\c
@@ -87,6 +86,13 @@
% For @tex, we can use \tabalign.
\let\+ = \relax
+% Get ready for pdf.
+\newif\ifpdf
+\ifx\pdfoutput\undefined\else
+ \input pdfcolor
+ \pdfoutput=1
+ \pdftrue
+\fi
\message{Basics,}
\chardef\other=12
@@ -245,6 +251,8 @@
\unvbox\footlinebox
\fi
%
+ \ifpdf\pdfmkdest{\the\pageno}\fi
+ %
\ifcropmarks
\egroup % end of \vbox\bgroup
\hfil\egroup % end of (centering) \line\bgroup
@@ -842,6 +850,126 @@ where each line of input produces a line of output.}
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+\message{pdf,}
+% adobe `portable' document format
+
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+
+\ifpdf
+\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
+\def\pdfmkpgn#1{#1@}
+
+% Adding outlines to PDF; macros for calculating structure of outlines
+% come from Petr Olsak
+\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+ \else \csname#1\endcsname \fi}
+\def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+ \advance\tempnum by1
+ \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+\def\pdfmakeoutlines{{%
+ \openin 1 \jobname.toc
+ \ifeof 1\else\bgroup
+ \closein 1
+ \def\code##1{##1}
+ \def\file##1{##1}
+ \def\TeX##1{TeX}
+ \def\tt{}
+ \def\char{char}
+ \def\samp##1{##1}
+ \def\kbd##1{##1}
+ \def\key##1{##1}
+ \def\rawbackslashxx{\string\\}
+ \def\chapentry ##1##2##3{}
+ \def\unnumbchapentry ##1##2{}
+ \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
+ \def\unnumbsecentry ##1##2{}
+ \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
+ \def\unnumbsubsecentry ##1##2{}
+ \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
+ \def\unnumbsubsubsecentry ##1##2{}
+ \input \jobname.toc
+ \def\chapentry ##1##2##3{%
+ \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
+ \def\unnumbchapentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\secentry ##1##2##3##4{%
+ \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
+ \def\unnumbsecentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\subsecentry ##1##2##3##4##5{%
+ \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
+ \def\unnumbsubsecentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\subsubsecentry ##1##2##3##4##5##6{%
+ \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
+ \def\unnumbsubsubsecentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \input \jobname.toc
+ \egroup\fi
+}}
+\pdfmakeoutlines
+
+\def\makelinks #1,{%
+ \def\params{#1}\def\E{END}%
+ \ifx\params\E
+ \let\nextmakelinks=\relax
+ \else
+ \let\nextmakelinks=\makelinks
+ \ifnum\lnkcount>0,\fi
+ \picknum{#1}%
+ \Blue\pdfannotlink attr{/Border [0 0 0]}
+ goto name{\pdfmkpgn{\the\pgn}}%
+ #1%
+ \advance\lnkcount by 1%
+ \Black\pdfendlink
+ \fi
+ \nextmakelinks
+}
+
+\def\picknum#1{\expandafter\pn#1}
+\def\pn#1{%
+ \def\p{#1}%
+ \ifx\p\lbrace
+ \let\nextpn=\ppn
+ \else
+ \let\nextpn=\ppnn
+ \def\first{#1}
+ \fi
+ \nextpn
+}
+\def\ppn#1{\pgn=#1\gobble}
+\def\ppnn{\pgn=\first}
+\def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
+
+\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+\def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \ifx\p\space\else\addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \fi
+ \nextsp}
+\def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+
+\def\pdflink#1{%
+ \leavevmode\Red
+ \begingroup
+ \normalturnoffactive\def\@{@}%
+ \pdfannotlink
+ attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ \endgroup
+}
+
+\else
+\let\pdflink = \gobble
+\fi % end \ifpdf
+
\message{fonts,}
% Font-change commands.
@@ -1208,23 +1336,43 @@ where each line of input produces a line of output.}
%
\def\uref#1{\douref #1,,,\finish}
\def\douref#1,#2,#3,#4\finish{%
+ \pdflink{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
- \unhbox0\ (\code{#1})% second arg given, show both it and url
+ \ifpdf
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \else
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \fi
\else
\code{#1}% only url given, so show it
\fi
\fi
+ %
+ \ifpdf
+ \Black\pdfendlink
+ \fi
}
-% rms does not like the angle brackets --karl, 17may97.
-% So now @email is just like @uref.
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
%\def\email#1{\angleleft{\tt #1}\angleright}
-\let\email=\uref
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{%
+ \pdflink{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \Black\pdfendlink
+ }
+\else
+ \let\email=\uref
+\fi
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
@@ -1908,10 +2056,11 @@ where each line of input produces a line of output.}
\go
}
-% multitable syntax
-\def\tab{&\hskip1sp\relax} % 2/2/96
- % tiny skip here makes sure this column space is
- % maintained, even if it is never used.
+% This used to have \hskip1sp. But then the space in a template line is
+% not enough. That is bad. So let's go back to just & until we
+% encounter the problem it was intended to solve again.
+% --karl, nathan@acm.org, 20apr99.
+\def\tab{&}
% @multitable ... @end multitable definitions:
%
@@ -3029,7 +3178,7 @@ width0pt\relax} \fi
\message{sectioning,}
-% Define chapters, sections, etc.
+% Chapters, sections, etc.
\newcount\chapno
\newcount\secno \secno=0
@@ -3511,6 +3660,7 @@ width0pt\relax} \fi
\message{toc,}
+% Table of contents.
\newwrite\tocfile
% Write an entry to the toc file, opening it if necessary.
@@ -3607,6 +3757,10 @@ width0pt\relax} \fi
}
\let\shortcontents = \summarycontents
+\ifpdf
+ \pdfcatalog{/PageMode /UseOutlines}%
+\fi
+
% These macros generate individual entries in the table of contents.
% The first argument is the chapter or section name.
% The last argument is the page number.
@@ -3715,6 +3869,7 @@ width0pt\relax} \fi
\message{environments,}
+% @foo ... @end foo.
% Since these characters are used in examples, it should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
@@ -4038,8 +4193,9 @@ width0pt\relax} \fi
\message{defuns,}
-% Define formatter for defuns
-% First, allow user to change definition object font (\df) internally
+% @defun etc.
+
+% Allow user to change definition object font (\df) internally
\def\setdeffont #1 {\csname DEF#1\endcsname}
\newskip\defbodyindent \defbodyindent=.4in
@@ -4293,12 +4449,13 @@ width0pt\relax} \fi
% First, define the processing that is wanted for arguments of \defun
% Use this to expand the args and terminate the paragraph they make up
-\def\defunargs #1{\functionparens \sl
+\def\defunargs#1{\functionparens \sl
% Expand, preventing hyphenation at `-' chars.
% Note that groups don't affect changes in \hyphenchar.
-\hyphenchar\tensl=0
+% Set the font temporarily and use \font in case \setfont made \tensl a macro.
+{\tensl\hyphenchar\font=0}%
#1%
-\hyphenchar\tensl=45
+{\tensl\hyphenchar\font=45}%
\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
\interlinepenalty=10000
\advance\rightskip by 0pt plus 1fil
@@ -4843,6 +5000,8 @@ width0pt\relax} \fi
\message{cross references,}
+% @xref etc.
+
\newwrite\auxfile
\newif\ifhavexrefs % True if xref values are known.
@@ -4908,6 +5067,7 @@ width0pt\relax} \fi
%
\def\setref#1#2{{%
\indexdummies
+ \ifpdf \pdfmkdest{#1}\fi
\dosetq{#1-title}{Ytitle}%
\dosetq{#1-pg}{Ypagenumber}%
\dosetq{#1-snt}{#2}%
@@ -4955,6 +5115,19 @@ width0pt\relax} \fi
% are best written with fairly long node names, containing hyphens, this
% is a loss. Therefore, we give the text of the node name again, so it
% is as if TeX is seeing it for the first time.
+ \ifpdf
+ \leavevmode
+ \getfilename{#4}%
+ \ifnum\filenamelength>0
+ \pdfannotlink attr{/Border [0 0 0]}%
+ goto file{\the\filename.pdf} name{#1@}%
+ \else
+ \pdfannotlink attr{/Border [0 0 0]}%
+ goto name{#1@}%
+ \fi
+ \BlueGreen
+ \fi
+ %
\ifdim \wd1 > 0pt
\putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}%
\else
@@ -4974,6 +5147,7 @@ width0pt\relax} \fi
% page 3
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi
+ \ifpdf \Black\pdfendlink \fi
\endgroup}
% \dosetq is the interface for calls from other macros
@@ -5347,6 +5521,7 @@ width0pt\relax} \fi
\message{localization,}
+% and i18n.
% @documentlanguage is usually given very early, just after
% @setfilename. If done too late, it may not override everything
@@ -5406,8 +5581,7 @@ should work if nowhere else does.}
% Allow us to assign to \emergencystretch anyway.
\def\emergencystretch{\dimen0}%
\else
- \emergencystretch = \hsize
- \divide\emergencystretch by 40
+ \emergencystretch = .15\hsize
\fi
}
@@ -5517,6 +5691,7 @@ should work if nowhere else does.}
%
\letterpaper
+
\message{and turning on texinfo input format.}
% Define macros to output various characters with catcode for normal text.