~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to build-aux/texinfo.tex

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
% texinfo.tex -- TeX macros to handle Texinfo files.
2
 
%
 
2
3
3
% Load plain if necessary, i.e., if running under initex.
4
4
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5
5
%
6
 
\def\texinfoversion{2006-10-04.17}
7
 
%
8
 
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9
 
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
10
 
% Free Software Foundation, Inc.
11
 
%
12
 
% This texinfo.tex file is free software; you can redistribute it and/or
 
6
\def\texinfoversion{2011-05-23.16}
 
7
%
 
8
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 
9
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 
10
% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
11
%
 
12
% This texinfo.tex file is free software: you can redistribute it and/or
13
13
% modify it under the terms of the GNU General Public License as
14
 
% published by the Free Software Foundation; either version 2, or (at
15
 
% your option) any later version.
 
14
% published by the Free Software Foundation, either version 3 of the
 
15
% License, or (at your option) any later version.
16
16
%
17
17
% This texinfo.tex file is distributed in the hope that it will be
18
18
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20
20
% General Public License for more details.
21
21
%
22
22
% You should have received a copy of the GNU General Public License
23
 
% along with this texinfo.tex file; see the file COPYING.  If not, write
24
 
% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25
 
% Boston, MA 02110-1301, USA.
 
23
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
26
24
%
27
25
% As a special exception, when this file is read by TeX when processing
28
26
% a Texinfo source document, you may use the result without
67
65
\everyjob{\message{[Texinfo version \texinfoversion]}%
68
66
  \catcode`+=\active \catcode`\_=\active}
69
67
 
70
 
\message{Basics,}
71
68
\chardef\other=12
72
69
 
73
70
% We never want plain's \outer definition of \+ in Texinfo.
95
92
\let\ptexnewwrite\newwrite
96
93
\let\ptexnoindent=\noindent
97
94
\let\ptexplus=+
 
95
\let\ptexraggedright=\raggedright
98
96
\let\ptexrbrace=\}
99
97
\let\ptexslash=\/
100
98
\let\ptexstar=\*
101
99
\let\ptext=\t
 
100
\let\ptextop=\top
 
101
{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
102
102
 
103
103
% If this character appears in an error message or help string, it
104
104
% starts a new line in the output.
118
118
\ifx\putwordChapter\undefined   \gdef\putwordChapter{Chapter}\fi
119
119
\ifx\putwordfile\undefined      \gdef\putwordfile{file}\fi
120
120
\ifx\putwordin\undefined        \gdef\putwordin{in}\fi
121
 
\ifx\putwordIndexIsEmpty\undefined     \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
122
 
\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
 
121
\ifx\putwordIndexIsEmpty\undefined       \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
 
122
\ifx\putwordIndexNonexistent\undefined   \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
123
123
\ifx\putwordInfo\undefined      \gdef\putwordInfo{Info}\fi
124
124
\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
125
125
\ifx\putwordMethodon\undefined  \gdef\putwordMethodon{Method on}\fi
158
158
\def\spaceisspace{\catcode`\ =\spacecat}
159
159
 
160
160
% sometimes characters are active, so we need control sequences.
 
161
\chardef\ampChar   = `\&
161
162
\chardef\colonChar = `\:
162
163
\chardef\commaChar = `\,
163
164
\chardef\dashChar  = `\-
164
165
\chardef\dotChar   = `\.
165
166
\chardef\exclamChar= `\!
 
167
\chardef\hashChar  = `\#
166
168
\chardef\lquoteChar= `\`
167
169
\chardef\questChar = `\?
168
170
\chardef\rquoteChar= `\'
169
171
\chardef\semiChar  = `\;
 
172
\chardef\slashChar = `\/
170
173
\chardef\underChar = `\_
171
174
 
172
175
% Ignore a token.
197
200
% that mark overfull boxes (in case you have decided
198
201
% that the text looks ok even though it passes the margin).
199
202
%
200
 
\def\finalout{\overfullrule=0pt}
201
 
 
202
 
% @| inserts a changebar to the left of the current line.  It should
203
 
% surround any changed text.  This approach does *not* work if the
204
 
% change spans more than two lines of output.  To handle that, we would
205
 
% have adopt a much more difficult approach (putting marks into the main
206
 
% vertical list for the beginning and end of each change).
207
 
%
208
 
\def\|{%
209
 
  % \vadjust can only be used in horizontal mode.
210
 
  \leavevmode
211
 
  %
212
 
  % Append this vertical mode material after the current line in the output.
213
 
  \vadjust{%
214
 
    % We want to insert a rule with the height and depth of the current
215
 
    % leading; that is exactly what \strutbox is supposed to record.
216
 
    \vskip-\baselineskip
217
 
    %
218
 
    % \vadjust-items are inserted at the left edge of the type.  So
219
 
    % the \llap here moves out into the left-hand margin.
220
 
    \llap{%
221
 
      %
222
 
      % For a thicker or thinner bar, change the `1pt'.
223
 
      \vrule height\baselineskip width1pt
224
 
      %
225
 
      % This is the space between the bar and the text.
226
 
      \hskip 12pt
227
 
    }%
228
 
  }%
229
 
}
 
203
\def\finalout{\overfullrule=0pt }
230
204
 
231
205
% Sometimes it is convenient to have everything in the transcript file
232
206
% and nothing on the terminal.  We don't just call \tracingall here,
244
218
  \tracingmacros2
245
219
  \tracingrestores1
246
220
  \showboxbreadth\maxdimen \showboxdepth\maxdimen
247
 
  \ifx\eTeXversion\undefined\else % etex gives us more logging
 
221
  \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
248
222
    \tracingscantokens1
249
223
    \tracingifs1
250
224
    \tracinggroups1
265
239
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
266
240
  \removelastskip\penalty-200\bigskip\fi\fi}
267
241
 
268
 
% For @cropmarks command.
269
242
% Do @cropmarks to get crop marks.
270
243
%
271
244
\newif\ifcropmarks
279
252
\newdimen\cornerthick \cornerthick=.3pt
280
253
\newdimen\topandbottommargin \topandbottommargin=.75in
281
254
 
 
255
% Output a mark which sets \thischapter, \thissection and \thiscolor.
 
256
% We dump everything together because we only have one kind of mark.
 
257
% This works because we only use \botmark / \topmark, not \firstmark.
 
258
%
 
259
% A mark contains a subexpression of the \ifcase ... \fi construct.
 
260
% \get*marks macros below extract the needed part using \ifcase.
 
261
%
 
262
% Another complication is to let the user choose whether \thischapter
 
263
% (\thissection) refers to the chapter (section) in effect at the top
 
264
% of a page, or that at the bottom of a page.  The solution is
 
265
% described on page 260 of The TeXbook.  It involves outputting two
 
266
% marks for the sectioning macros, one before the section break, and
 
267
% one after.  I won't pretend I can describe this better than DEK...
 
268
\def\domark{%
 
269
  \toks0=\expandafter{\lastchapterdefs}%
 
270
  \toks2=\expandafter{\lastsectiondefs}%
 
271
  \toks4=\expandafter{\prevchapterdefs}%
 
272
  \toks6=\expandafter{\prevsectiondefs}%
 
273
  \toks8=\expandafter{\lastcolordefs}%
 
274
  \mark{%
 
275
                   \the\toks0 \the\toks2
 
276
      \noexpand\or \the\toks4 \the\toks6
 
277
    \noexpand\else \the\toks8
 
278
  }%
 
279
}
 
280
% \topmark doesn't work for the very first chapter (after the title
 
281
% page or the contents), so we use \firstmark there -- this gets us
 
282
% the mark with the chapter defs, unless the user sneaks in, e.g.,
 
283
% @setcolor (or @url, or @link, etc.) between @contents and the very
 
284
% first @chapter.
 
285
\def\gettopheadingmarks{%
 
286
  \ifcase0\topmark\fi
 
287
  \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
 
288
}
 
289
\def\getbottomheadingmarks{\ifcase1\botmark\fi}
 
290
\def\getcolormarks{\ifcase2\topmark\fi}
 
291
 
 
292
% Avoid "undefined control sequence" errors.
 
293
\def\lastchapterdefs{}
 
294
\def\lastsectiondefs{}
 
295
\def\prevchapterdefs{}
 
296
\def\prevsectiondefs{}
 
297
\def\lastcolordefs{}
 
298
 
282
299
% Main output routine.
283
300
\chardef\PAGE = 255
284
301
\output = {\onepageout{\pagecontents\PAGE}}
296
313
  %
297
314
  % Do this outside of the \shipout so @code etc. will be expanded in
298
315
  % the headline as they should be, not taken literally (outputting ''code).
 
316
  \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
299
317
  \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
 
318
  \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
300
319
  \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
301
320
  %
302
321
  {%
310
329
               % We don't want .vr (or whatever) entries like this:
311
330
               % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
312
331
               % "\acronym" won't work when it's read back in;
313
 
               % it needs to be 
 
332
               % it needs to be
314
333
               % {\code {{\tt \backslashcurfont }acronym}
315
334
    \shipout\vbox{%
316
335
      % Do this early so pdf references go to the beginning of the page.
375
394
% marginal hacks, juha@viisa.uucp (Juha Takala)
376
395
\ifvoid\margin\else % marginal info is present
377
396
  \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
378
 
\dimen@=\dp#1 \unvbox#1
 
397
\dimen@=\dp#1\relax \unvbox#1\relax
379
398
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
380
399
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
381
400
}
416
435
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
417
436
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
418
437
 
419
 
% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
 
438
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
420
439
%
421
440
% \argremovec might leave us with trailing space, e.g.,
422
441
%    @end itemize  @c foo
441
460
% to get _exactly_ the rest of the line, we had to prevent such situation.
442
461
% We prepended an \empty token at the very beginning and we expand it now,
443
462
% just before passing the control to \argtorun.
444
 
% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
 
463
% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
445
464
% either the null string, or it ends with \^^M---thus there is no danger
446
465
% that a pair of braces would be stripped.
447
466
%
498
517
% used to check whether the current environment is the one expected.
499
518
%
500
519
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
501
 
% are not treated as enviroments; they don't open a group.  (The
 
520
% are not treated as environments; they don't open a group.  (The
502
521
% implementation of @end takes care not to call \endgroup in this
503
522
% special case.)
504
523
 
505
524
 
506
 
% At runtime, environments start with this:
 
525
% At run-time, environments start with this:
507
526
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
508
527
% initialize
509
528
\let\thisenv\empty
521
540
  \fi
522
541
}
523
542
 
524
 
% Evironment mismatch, #1 expected:
 
543
% Environment mismatch, #1 expected:
525
544
\def\badenverr{%
526
545
  \errhelp = \EMsimple
527
546
  \errmessage{This command can appear only \inenvironment\temp,
529
548
}
530
549
\def\inenvironment#1{%
531
550
  \ifx#1\empty
532
 
    out of any environment%
 
551
    outside of any environment%
533
552
  \else
534
553
    in environment \expandafter\string#1%
535
554
  \fi
541
560
\parseargdef\end{%
542
561
  \if 1\csname iscond.#1\endcsname
543
562
  \else
544
 
    % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
 
563
    % The general wording of \badenverr may not be ideal.
545
564
    \expandafter\checkenv\csname#1\endcsname
546
565
    \csname E#1\endcsname
547
566
    \endgroup
551
570
\newhelp\EMsimple{Press RETURN to continue.}
552
571
 
553
572
 
554
 
%% Simple single-character @ commands
555
 
 
556
 
% @@ prints an @
557
 
% Kludge this until the fonts are right (grr).
558
 
\def\@{{\tt\char64}}
559
 
 
560
 
% This is turned off because it was never documented
561
 
% and you can use @w{...} around a quote to suppress ligatures.
562
 
%% Define @` and @' to be the same as ` and '
563
 
%% but suppressing ligatures.
564
 
%\def\`{{`}}
565
 
%\def\'{{'}}
566
 
 
567
 
% Used to generate quoted braces.
568
 
\def\mylbrace {{\tt\char123}}
569
 
\def\myrbrace {{\tt\char125}}
570
 
\let\{=\mylbrace
571
 
\let\}=\myrbrace
572
 
\begingroup
573
 
  % Definitions to produce \{ and \} commands for indices,
574
 
  % and @{ and @} for the aux/toc files.
575
 
  \catcode`\{ = \other \catcode`\} = \other
576
 
  \catcode`\[ = 1 \catcode`\] = 2
577
 
  \catcode`\! = 0 \catcode`\\ = \other
578
 
  !gdef!lbracecmd[\{]%
579
 
  !gdef!rbracecmd[\}]%
580
 
  !gdef!lbraceatcmd[@{]%
581
 
  !gdef!rbraceatcmd[@}]%
582
 
!endgroup
583
 
 
584
 
% @comma{} to avoid , parsing problems.
585
 
\let\comma = ,
586
 
 
587
 
% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
588
 
% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
589
 
\let\, = \c
590
 
\let\dotaccent = \.
591
 
\def\ringaccent#1{{\accent23 #1}}
592
 
\let\tieaccent = \t
593
 
\let\ubaraccent = \b
594
 
\let\udotaccent = \d
595
 
 
596
 
% Other special characters: @questiondown @exclamdown @ordf @ordm
597
 
% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
598
 
\def\questiondown{?`}
599
 
\def\exclamdown{!`}
600
 
\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
601
 
\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
602
 
 
603
 
% Dotless i and dotless j, used for accents.
604
 
\def\imacro{i}
605
 
\def\jmacro{j}
606
 
\def\dotless#1{%
607
 
  \def\temp{#1}%
608
 
  \ifx\temp\imacro \ptexi
609
 
  \else\ifx\temp\jmacro \j
610
 
  \else \errmessage{@dotless can be used only with i or j}%
611
 
  \fi\fi
612
 
}
613
 
 
614
 
% The \TeX{} logo, as in plain, but resetting the spacing so that a
615
 
% period following counts as ending a sentence.  (Idea found in latex.)
616
 
%
617
 
\edef\TeX{\TeX \spacefactor=1000 }
618
 
 
619
 
% @LaTeX{} logo.  Not quite the same results as the definition in
620
 
% latex.ltx, since we use a different font for the raised A; it's most
621
 
% convenient for us to use an explicitly smaller font, rather than using
622
 
% the \scriptstyle font (since we don't reset \scriptstyle and
623
 
% \scriptscriptstyle).
624
 
%
625
 
\def\LaTeX{%
626
 
  L\kern-.36em
627
 
  {\setbox0=\hbox{T}%
628
 
   \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
629
 
  \kern-.15em
630
 
  \TeX
631
 
}
632
 
 
633
573
% Be sure we're in horizontal mode when doing a tie, since we make space
634
574
% equivalent to this in @example-like environments. Otherwise, a space
635
575
% at the beginning of a line will start with \penalty -- and
661
601
\def\?{?\spacefactor=\endofsentencespacefactor\space}
662
602
 
663
603
% @frenchspacing on|off  says whether to put extra space after punctuation.
664
 
 
604
%
665
605
\def\onword{on}
666
606
\def\offword{off}
667
607
%
671
611
  \else\ifx\temp\offword \plainnonfrenchspacing
672
612
  \else
673
613
    \errhelp = \EMsimple
674
 
    \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
 
614
    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
675
615
  \fi\fi
676
616
}
677
617
 
753
693
 
754
694
\newdimen\mil  \mil=0.001in
755
695
 
756
 
% Old definition--didn't work.
757
 
%\parseargdef\need{\par %
758
 
%% This method tries to make TeX break the page naturally
759
 
%% if the depth of the box does not fit.
760
 
%{\baselineskip=0pt%
761
 
%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
762
 
%\prevdepth=-1000pt
763
 
%}}
764
 
 
765
696
\parseargdef\need{%
766
697
  % Ensure vertical mode, so we don't make a big box in the middle of a
767
698
  % paragraph.
825
756
 
826
757
% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
827
758
% paragraph.  For more general purposes, use the \margin insertion
828
 
% class.  WHICH is `l' or `r'.
 
759
% class.  WHICH is `l' or `r'.  Not documented, written for gawk manual.
829
760
%
830
761
\newskip\inmarginspacing \inmarginspacing=1cm
831
762
\def\strutdepth{\dp\strutbox}
872
803
  \temp
873
804
}
874
805
 
875
 
% @include file    insert text of that file as input.
 
806
% @| inserts a changebar to the left of the current line.  It should
 
807
% surround any changed text.  This approach does *not* work if the
 
808
% change spans more than two lines of output.  To handle that, we would
 
809
% have adopt a much more difficult approach (putting marks into the main
 
810
% vertical list for the beginning and end of each change).  This command
 
811
% is not documented, not supported, and doesn't work.
 
812
%
 
813
\def\|{%
 
814
  % \vadjust can only be used in horizontal mode.
 
815
  \leavevmode
 
816
  %
 
817
  % Append this vertical mode material after the current line in the output.
 
818
  \vadjust{%
 
819
    % We want to insert a rule with the height and depth of the current
 
820
    % leading; that is exactly what \strutbox is supposed to record.
 
821
    \vskip-\baselineskip
 
822
    %
 
823
    % \vadjust-items are inserted at the left edge of the type.  So
 
824
    % the \llap here moves out into the left-hand margin.
 
825
    \llap{%
 
826
      %
 
827
      % For a thicker or thinner bar, change the `1pt'.
 
828
      \vrule height\baselineskip width1pt
 
829
      %
 
830
      % This is the space between the bar and the text.
 
831
      \hskip 12pt
 
832
    }%
 
833
  }%
 
834
}
 
835
 
 
836
% @include FILE -- \input text of FILE.
876
837
%
877
838
\def\include{\parseargusing\filenamecatcodes\includezzz}
878
839
\def\includezzz#1{%
879
840
  \pushthisfilestack
880
841
  \def\thisfile{#1}%
881
842
  {%
882
 
    \makevalueexpandable
883
 
    \def\temp{\input #1 }%
 
843
    \makevalueexpandable  % we want to expand any @value in FILE.
 
844
    \turnoffactive        % and allow special characters in the expansion
 
845
    \indexnofonts         % Allow `@@' and other weird things in file names.
 
846
    \wlog{texinfo.tex: doing @include of #1^^J}%
 
847
    \edef\temp{\noexpand\input #1 }%
 
848
    %
 
849
    % This trickery is to read FILE outside of a group, in case it makes
 
850
    % definitions, etc.
884
851
    \expandafter
885
852
  }\temp
886
853
  \popthisfilestack
895
862
  \catcode`>=\other
896
863
  \catcode`+=\other
897
864
  \catcode`-=\other
 
865
  \catcode`\`=\other
 
866
  \catcode`\'=\other
898
867
}
899
868
 
900
869
\def\pushthisfilestack{%
1040
1009
}
1041
1010
 
1042
1011
 
1043
 
% @asis just yields its argument.  Used with @table, for example.
1044
 
%
1045
 
\def\asis#1{#1}
1046
 
 
1047
 
% @math outputs its argument in math mode.
1048
 
%
1049
 
% One complication: _ usually means subscripts, but it could also mean
1050
 
% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
1051
 
% _ active, and distinguish by seeing if the current family is \slfam,
1052
 
% which is what @var uses.
1053
 
{
1054
 
  \catcode`\_ = \active
1055
 
  \gdef\mathunderscore{%
1056
 
    \catcode`\_=\active
1057
 
    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
1058
 
  }
1059
 
}
1060
 
% Another complication: we want \\ (and @\) to output a \ character.
1061
 
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
1062
 
% this is not advertised and we don't care.  Texinfo does not
1063
 
% otherwise define @\.
1064
 
%
1065
 
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
1066
 
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
1067
 
%
1068
 
\def\math{%
1069
 
  \tex
1070
 
  \mathunderscore
1071
 
  \let\\ = \mathbackslash
1072
 
  \mathactive
1073
 
  $\finishmath
1074
 
}
1075
 
\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
1076
 
 
1077
 
% Some active characters (such as <) are spaced differently in math.
1078
 
% We have to reset their definitions in case the @math was an argument
1079
 
% to a command which sets the catcodes (such as @item or @section).
1080
 
%
1081
 
{
1082
 
  \catcode`^ = \active
1083
 
  \catcode`< = \active
1084
 
  \catcode`> = \active
1085
 
  \catcode`+ = \active
1086
 
  \gdef\mathactive{%
1087
 
    \let^ = \ptexhat
1088
 
    \let< = \ptexless
1089
 
    \let> = \ptexgtr
1090
 
    \let+ = \ptexplus
1091
 
  }
1092
 
}
1093
 
 
1094
 
% @bullet and @minus need the same treatment as @math, just above.
1095
 
\def\bullet{$\ptexbullet$}
1096
 
\def\minus{$-$}
1097
 
 
1098
 
% @dots{} outputs an ellipsis using the current font.
1099
 
% We do .5em per period so that it has the same spacing in the cm
1100
 
% typewriter fonts as three actual period characters; on the other hand,
1101
 
% in other typewriter fonts three periods are wider than 1.5em.  So do
1102
 
% whichever is larger.
1103
 
%
1104
 
\def\dots{%
1105
 
  \leavevmode
1106
 
  \setbox0=\hbox{...}% get width of three periods
1107
 
  \ifdim\wd0 > 1.5em
1108
 
    \dimen0 = \wd0
1109
 
  \else
1110
 
    \dimen0 = 1.5em
1111
 
  \fi
1112
 
  \hbox to \dimen0{%
1113
 
    \hskip 0pt plus.25fil
1114
 
    .\hskip 0pt plus1fil
1115
 
    .\hskip 0pt plus1fil
1116
 
    .\hskip 0pt plus.5fil
1117
 
  }%
1118
 
}
1119
 
 
1120
 
% @enddots{} is an end-of-sentence ellipsis.
1121
 
%
1122
 
\def\enddots{%
1123
 
  \dots
1124
 
  \spacefactor=\endofsentencespacefactor
1125
 
}
1126
 
 
1127
 
% @comma{} is so commas can be inserted into text without messing up
1128
 
% Texinfo's parsing.
1129
 
%
1130
 
\let\comma = ,
1131
 
 
1132
1012
% @refill is a no-op.
1133
1013
\let\refill=\relax
1134
1014
 
1193
1073
\newif\ifpdfmakepagedest
1194
1074
 
1195
1075
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1196
 
% can be set).  So we test for \relax and 0 as well as \undefined,
1197
 
% borrowed from ifpdf.sty.
1198
 
\ifx\pdfoutput\undefined
 
1076
% can be set).  So we test for \relax and 0 as well as being undefined.
 
1077
\ifx\pdfoutput\thisisundefined
1199
1078
\else
1200
1079
  \ifx\pdfoutput\relax
1201
1080
  \else
1216
1095
% that's what we do).
1217
1096
 
1218
1097
% double active backslashes.
1219
 
 
1098
%
1220
1099
{\catcode`\@=0 \catcode`\\=\active
1221
1100
 @gdef@activebackslashdouble{%
1222
1101
   @catcode`@\=@active
1225
1104
 
1226
1105
% To handle parens, we must adopt a different approach, since parens are
1227
1106
% not active characters.  hyperref.dtx (which has the same problem as
1228
 
% us) handles it with this amazing macro to replace tokens.  I've
1229
 
% tinkered with it a little for texinfo, but it's definitely from there.
1230
 
 
1107
% us) handles it with this amazing macro to replace tokens, with minor
 
1108
% changes for Texinfo.  It is included here under the GPL by permission
 
1109
% from the author, Heiko Oberdiek.
 
1110
%
1231
1111
% #1 is the tokens to replace.
1232
1112
% #2 is the replacement.
1233
1113
% #3 is the control sequence with the string.
1234
 
 
1114
%
1235
1115
\def\HyPsdSubst#1#2#3{%
1236
1116
  \def\HyPsdReplace##1#1##2\END{%
1237
1117
    ##1%
1255
1135
  \HyPsdSubst{)}{\realbackslash)}{#1}%
1256
1136
}
1257
1137
 
 
1138
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
 
1139
with PDF output, and none of those formats could be found.  (.eps cannot
 
1140
be supported due to the design of the PDF format; use regular TeX (DVI
 
1141
output) for that.)}
 
1142
 
1258
1143
\ifpdf
1259
 
  \input pdfcolor
1260
 
  \pdfcatalog{/PageMode /UseOutlines}%
 
1144
  %
 
1145
  % Color manipulation macros based on pdfcolor.tex,
 
1146
  % except using rgb instead of cmyk; the latter is said to render as a
 
1147
  % very dark gray on-screen and a very dark halftone in print, instead
 
1148
  % of actual black.
 
1149
  \def\rgbDarkRed{0.50 0.09 0.12}
 
1150
  \def\rgbBlack{0 0 0}
 
1151
  %
 
1152
  % k sets the color for filling (usual text, etc.);
 
1153
  % K sets the color for stroking (thin rules, e.g., normal _'s).
 
1154
  \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
 
1155
  %
 
1156
  % Set color, and create a mark which defines \thiscolor accordingly,
 
1157
  % so that \makeheadline knows which color to restore.
 
1158
  \def\setcolor#1{%
 
1159
    \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
 
1160
    \domark
 
1161
    \pdfsetcolor{#1}%
 
1162
  }
 
1163
  %
 
1164
  \def\maincolor{\rgbBlack}
 
1165
  \pdfsetcolor{\maincolor}
 
1166
  \edef\thiscolor{\maincolor}
 
1167
  \def\lastcolordefs{}
 
1168
  %
 
1169
  \def\makefootline{%
 
1170
    \baselineskip24pt
 
1171
    \line{\pdfsetcolor{\maincolor}\the\footline}%
 
1172
  }
 
1173
  %
 
1174
  \def\makeheadline{%
 
1175
    \vbox to 0pt{%
 
1176
      \vskip-22.5pt
 
1177
      \line{%
 
1178
        \vbox to8.5pt{}%
 
1179
        % Extract \thiscolor definition from the marks.
 
1180
        \getcolormarks
 
1181
        % Typeset the headline with \maincolor, then restore the color.
 
1182
        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
 
1183
      }%
 
1184
      \vss
 
1185
    }%
 
1186
    \nointerlineskip
 
1187
  }
 
1188
  %
 
1189
  %
 
1190
  \pdfcatalog{/PageMode /UseOutlines}
 
1191
  %
1261
1192
  % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1262
1193
  \def\dopdfimage#1#2#3{%
1263
1194
    \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1264
1195
    \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1265
 
    % without \immediate, pdftex seg faults when the same image is
 
1196
    %
 
1197
    % pdftex (and the PDF format) support .png, .jpg, .pdf (among
 
1198
    % others).  Let's try in that order.
 
1199
    \let\pdfimgext=\empty
 
1200
    \begingroup
 
1201
      \openin 1 #1.png \ifeof 1
 
1202
        \openin 1 #1.jpg \ifeof 1
 
1203
          \openin 1 #1.jpeg \ifeof 1
 
1204
            \openin 1 #1.JPG \ifeof 1
 
1205
              \openin 1 #1.pdf \ifeof 1
 
1206
                \openin 1 #1.PDF \ifeof 1
 
1207
                  \errhelp = \nopdfimagehelp
 
1208
                  \errmessage{Could not find image file #1 for pdf}%
 
1209
                \else \gdef\pdfimgext{PDF}%
 
1210
                \fi
 
1211
              \else \gdef\pdfimgext{pdf}%
 
1212
              \fi
 
1213
            \else \gdef\pdfimgext{JPG}%
 
1214
            \fi
 
1215
          \else \gdef\pdfimgext{jpeg}%
 
1216
          \fi
 
1217
        \else \gdef\pdfimgext{jpg}%
 
1218
        \fi
 
1219
      \else \gdef\pdfimgext{png}%
 
1220
      \fi
 
1221
      \closein 1
 
1222
    \endgroup
 
1223
    %
 
1224
    % without \immediate, ancient pdftex seg faults when the same image is
1266
1225
    % included twice.  (Version 3.14159-pre-1.0-unofficial-20010704.)
1267
1226
    \ifnum\pdftexversion < 14
1268
1227
      \immediate\pdfimage
1272
1231
      \ifdim \wd0 >0pt width \imagewidth \fi
1273
1232
      \ifdim \wd2 >0pt height \imageheight \fi
1274
1233
      \ifnum\pdftexversion<13
1275
 
         #1.pdf%
 
1234
         #1.\pdfimgext
1276
1235
       \else
1277
 
         {#1.pdf}%
 
1236
         {#1.\pdfimgext}%
1278
1237
       \fi
1279
1238
    \ifnum\pdftexversion < 14 \else
1280
1239
      \pdfrefximage \pdflastximage
1281
1240
    \fi}
 
1241
  %
1282
1242
  \def\pdfmkdest#1{{%
1283
1243
    % We have to set dummies so commands such as @code, and characters
1284
1244
    % such as \, aren't expanded when present in a section title.
1285
 
    \atdummies
 
1245
    \indexnofonts
 
1246
    \turnoffactive
1286
1247
    \activebackslashdouble
 
1248
    \makevalueexpandable
1287
1249
    \def\pdfdestname{#1}%
1288
1250
    \backslashparens\pdfdestname
1289
 
    \pdfdest name{\pdfdestname} xyz%
1290
 
  }}%
 
1251
    \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
 
1252
  }}
1291
1253
  %
1292
1254
  % used to mark target names; must be expandable.
1293
 
  \def\pdfmkpgn#1{#1}%
1294
 
  %
1295
 
  \let\linkcolor = \Blue  % was Cyan, but that seems light?
1296
 
  \def\endlink{\Black\pdfendlink}
 
1255
  \def\pdfmkpgn#1{#1}
 
1256
  %
 
1257
  % by default, use a color that is dark enough to print on paper as
 
1258
  % nearly black, but still distinguishable for online viewing.
 
1259
  \def\urlcolor{\rgbDarkRed}
 
1260
  \def\linkcolor{\rgbDarkRed}
 
1261
  \def\endlink{\setcolor{\maincolor}\pdfendlink}
 
1262
  %
1297
1263
  % Adding outlines to PDF; macros for calculating structure of outlines
1298
1264
  % come from Petr Olsak
1299
1265
  \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1336
1302
      \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
1337
1303
      %
1338
1304
      % Read toc silently, to get counts of subentries for \pdfoutline.
 
1305
      \def\partentry##1##2##3##4{}% ignore parts in the outlines
1339
1306
      \def\numchapentry##1##2##3##4{%
1340
1307
        \def\thischapnum{##2}%
1341
1308
        \def\thissecnum{0}%
1395
1362
      \indexnofonts
1396
1363
      \setupdatafile
1397
1364
      \catcode`\\=\active \otherbackslash
1398
 
      \input \jobname.toc
 
1365
      \input \tocreadfilename
1399
1366
    \endgroup
1400
1367
  }
1401
1368
  %
1420
1387
      % tried to figure out what each command should do in the context
1421
1388
      % of @url.  for now, just make @/ a no-op, that's the only one
1422
1389
      % people have actually reported a problem with.
1423
 
      % 
 
1390
      %
1424
1391
      \normalturnoffactive
1425
1392
      \def\@{@}%
1426
1393
      \let\/=\empty
1427
1394
      \makevalueexpandable
1428
 
      \leavevmode\Red
 
1395
      % do we want to go so far as to use \indexnofonts instead of just
 
1396
      % special-casing \var here?
 
1397
      \def\var##1{##1}%
 
1398
      %
 
1399
      \leavevmode\setcolor{\urlcolor}%
1429
1400
      \startlink attr{/Border [0 0 0]}%
1430
1401
        user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
1431
1402
    \endgroup}
1452
1423
    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1453
1424
  \def\pdflink#1{%
1454
1425
    \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
1455
 
    \linkcolor #1\endlink}
 
1426
    \setcolor{\linkcolor}#1\endlink}
1456
1427
  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1457
1428
\else
 
1429
  % non-pdf mode
1458
1430
  \let\pdfmkdest = \gobble
1459
1431
  \let\pdfurl = \gobble
1460
1432
  \let\endlink = \relax
1461
 
  \let\linkcolor = \relax
 
1433
  \let\setcolor = \gobble
 
1434
  \let\pdfsetcolor = \gobble
1462
1435
  \let\pdfmakeoutlines = \relax
1463
1436
\fi  % \ifx\pdfoutput
1464
1437
 
1484
1457
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
1485
1458
\def\tt{\fam=\ttfam \setfontstyle{tt}}
1486
1459
 
 
1460
% Unfortunately, we have to override this for titles and the like, since
 
1461
% in those cases "rm" is bold.  Sigh.
 
1462
\def\rmisbold{\rm\def\curfontstyle{bf}}
 
1463
 
1487
1464
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
1488
1465
% So we set up a \sf.
1489
1466
\newfam\sffam
1505
1482
\def\strutheightpercent{.70833}
1506
1483
\def\strutdepthpercent {.29167}
1507
1484
%
 
1485
% can get a sort of poor man's double spacing by redefining this.
 
1486
\def\baselinefactor{1}
 
1487
%
1508
1488
\def\setleading#1{%
1509
 
  \normalbaselineskip = #1\relax
 
1489
  \dimen0 = #1\relax
 
1490
  \normalbaselineskip = \baselinefactor\dimen0
1510
1491
  \normallineskip = \lineskipfactor\normalbaselineskip
1511
1492
  \normalbaselines
1512
1493
  \setbox\strutbox =\hbox{%
1515
1496
  }%
1516
1497
}
1517
1498
 
 
1499
% PDF CMaps.  See also LaTeX's t1.cmap.
 
1500
%
 
1501
% do nothing with this by default.
 
1502
\expandafter\let\csname cmapOT1\endcsname\gobble
 
1503
\expandafter\let\csname cmapOT1IT\endcsname\gobble
 
1504
\expandafter\let\csname cmapOT1TT\endcsname\gobble
 
1505
 
 
1506
% if we are producing pdf, and we have \pdffontattr, then define cmaps.
 
1507
% (\pdffontattr was introduced many years ago, but people still run
 
1508
% older pdftex's; it's easy to conditionalize, so we do.)
 
1509
\ifpdf \ifx\pdffontattr\thisisundefined \else
 
1510
  \begingroup
 
1511
    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
 
1512
    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
 
1513
%%DocumentNeededResources: ProcSet (CIDInit)
 
1514
%%IncludeResource: ProcSet (CIDInit)
 
1515
%%BeginResource: CMap (TeX-OT1-0)
 
1516
%%Title: (TeX-OT1-0 TeX OT1 0)
 
1517
%%Version: 1.000
 
1518
%%EndComments
 
1519
/CIDInit /ProcSet findresource begin
 
1520
12 dict begin
 
1521
begincmap
 
1522
/CIDSystemInfo
 
1523
<< /Registry (TeX)
 
1524
/Ordering (OT1)
 
1525
/Supplement 0
 
1526
>> def
 
1527
/CMapName /TeX-OT1-0 def
 
1528
/CMapType 2 def
 
1529
1 begincodespacerange
 
1530
<00> <7F>
 
1531
endcodespacerange
 
1532
8 beginbfrange
 
1533
<00> <01> <0393>
 
1534
<09> <0A> <03A8>
 
1535
<23> <26> <0023>
 
1536
<28> <3B> <0028>
 
1537
<3F> <5B> <003F>
 
1538
<5D> <5E> <005D>
 
1539
<61> <7A> <0061>
 
1540
<7B> <7C> <2013>
 
1541
endbfrange
 
1542
40 beginbfchar
 
1543
<02> <0398>
 
1544
<03> <039B>
 
1545
<04> <039E>
 
1546
<05> <03A0>
 
1547
<06> <03A3>
 
1548
<07> <03D2>
 
1549
<08> <03A6>
 
1550
<0B> <00660066>
 
1551
<0C> <00660069>
 
1552
<0D> <0066006C>
 
1553
<0E> <006600660069>
 
1554
<0F> <00660066006C>
 
1555
<10> <0131>
 
1556
<11> <0237>
 
1557
<12> <0060>
 
1558
<13> <00B4>
 
1559
<14> <02C7>
 
1560
<15> <02D8>
 
1561
<16> <00AF>
 
1562
<17> <02DA>
 
1563
<18> <00B8>
 
1564
<19> <00DF>
 
1565
<1A> <00E6>
 
1566
<1B> <0153>
 
1567
<1C> <00F8>
 
1568
<1D> <00C6>
 
1569
<1E> <0152>
 
1570
<1F> <00D8>
 
1571
<21> <0021>
 
1572
<22> <201D>
 
1573
<27> <2019>
 
1574
<3C> <00A1>
 
1575
<3D> <003D>
 
1576
<3E> <00BF>
 
1577
<5C> <201C>
 
1578
<5F> <02D9>
 
1579
<60> <2018>
 
1580
<7D> <02DD>
 
1581
<7E> <007E>
 
1582
<7F> <00A8>
 
1583
endbfchar
 
1584
endcmap
 
1585
CMapName currentdict /CMap defineresource pop
 
1586
end
 
1587
end
 
1588
%%EndResource
 
1589
%%EOF
 
1590
    }\endgroup
 
1591
  \expandafter\edef\csname cmapOT1\endcsname#1{%
 
1592
    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
 
1593
  }%
 
1594
%
 
1595
% \cmapOT1IT
 
1596
  \begingroup
 
1597
    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
 
1598
    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
 
1599
%%DocumentNeededResources: ProcSet (CIDInit)
 
1600
%%IncludeResource: ProcSet (CIDInit)
 
1601
%%BeginResource: CMap (TeX-OT1IT-0)
 
1602
%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
 
1603
%%Version: 1.000
 
1604
%%EndComments
 
1605
/CIDInit /ProcSet findresource begin
 
1606
12 dict begin
 
1607
begincmap
 
1608
/CIDSystemInfo
 
1609
<< /Registry (TeX)
 
1610
/Ordering (OT1IT)
 
1611
/Supplement 0
 
1612
>> def
 
1613
/CMapName /TeX-OT1IT-0 def
 
1614
/CMapType 2 def
 
1615
1 begincodespacerange
 
1616
<00> <7F>
 
1617
endcodespacerange
 
1618
8 beginbfrange
 
1619
<00> <01> <0393>
 
1620
<09> <0A> <03A8>
 
1621
<25> <26> <0025>
 
1622
<28> <3B> <0028>
 
1623
<3F> <5B> <003F>
 
1624
<5D> <5E> <005D>
 
1625
<61> <7A> <0061>
 
1626
<7B> <7C> <2013>
 
1627
endbfrange
 
1628
42 beginbfchar
 
1629
<02> <0398>
 
1630
<03> <039B>
 
1631
<04> <039E>
 
1632
<05> <03A0>
 
1633
<06> <03A3>
 
1634
<07> <03D2>
 
1635
<08> <03A6>
 
1636
<0B> <00660066>
 
1637
<0C> <00660069>
 
1638
<0D> <0066006C>
 
1639
<0E> <006600660069>
 
1640
<0F> <00660066006C>
 
1641
<10> <0131>
 
1642
<11> <0237>
 
1643
<12> <0060>
 
1644
<13> <00B4>
 
1645
<14> <02C7>
 
1646
<15> <02D8>
 
1647
<16> <00AF>
 
1648
<17> <02DA>
 
1649
<18> <00B8>
 
1650
<19> <00DF>
 
1651
<1A> <00E6>
 
1652
<1B> <0153>
 
1653
<1C> <00F8>
 
1654
<1D> <00C6>
 
1655
<1E> <0152>
 
1656
<1F> <00D8>
 
1657
<21> <0021>
 
1658
<22> <201D>
 
1659
<23> <0023>
 
1660
<24> <00A3>
 
1661
<27> <2019>
 
1662
<3C> <00A1>
 
1663
<3D> <003D>
 
1664
<3E> <00BF>
 
1665
<5C> <201C>
 
1666
<5F> <02D9>
 
1667
<60> <2018>
 
1668
<7D> <02DD>
 
1669
<7E> <007E>
 
1670
<7F> <00A8>
 
1671
endbfchar
 
1672
endcmap
 
1673
CMapName currentdict /CMap defineresource pop
 
1674
end
 
1675
end
 
1676
%%EndResource
 
1677
%%EOF
 
1678
    }\endgroup
 
1679
  \expandafter\edef\csname cmapOT1IT\endcsname#1{%
 
1680
    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
 
1681
  }%
 
1682
%
 
1683
% \cmapOT1TT
 
1684
  \begingroup
 
1685
    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
 
1686
    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
 
1687
%%DocumentNeededResources: ProcSet (CIDInit)
 
1688
%%IncludeResource: ProcSet (CIDInit)
 
1689
%%BeginResource: CMap (TeX-OT1TT-0)
 
1690
%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
 
1691
%%Version: 1.000
 
1692
%%EndComments
 
1693
/CIDInit /ProcSet findresource begin
 
1694
12 dict begin
 
1695
begincmap
 
1696
/CIDSystemInfo
 
1697
<< /Registry (TeX)
 
1698
/Ordering (OT1TT)
 
1699
/Supplement 0
 
1700
>> def
 
1701
/CMapName /TeX-OT1TT-0 def
 
1702
/CMapType 2 def
 
1703
1 begincodespacerange
 
1704
<00> <7F>
 
1705
endcodespacerange
 
1706
5 beginbfrange
 
1707
<00> <01> <0393>
 
1708
<09> <0A> <03A8>
 
1709
<21> <26> <0021>
 
1710
<28> <5F> <0028>
 
1711
<61> <7E> <0061>
 
1712
endbfrange
 
1713
32 beginbfchar
 
1714
<02> <0398>
 
1715
<03> <039B>
 
1716
<04> <039E>
 
1717
<05> <03A0>
 
1718
<06> <03A3>
 
1719
<07> <03D2>
 
1720
<08> <03A6>
 
1721
<0B> <2191>
 
1722
<0C> <2193>
 
1723
<0D> <0027>
 
1724
<0E> <00A1>
 
1725
<0F> <00BF>
 
1726
<10> <0131>
 
1727
<11> <0237>
 
1728
<12> <0060>
 
1729
<13> <00B4>
 
1730
<14> <02C7>
 
1731
<15> <02D8>
 
1732
<16> <00AF>
 
1733
<17> <02DA>
 
1734
<18> <00B8>
 
1735
<19> <00DF>
 
1736
<1A> <00E6>
 
1737
<1B> <0153>
 
1738
<1C> <00F8>
 
1739
<1D> <00C6>
 
1740
<1E> <0152>
 
1741
<1F> <00D8>
 
1742
<20> <2423>
 
1743
<27> <2019>
 
1744
<60> <2018>
 
1745
<7F> <00A8>
 
1746
endbfchar
 
1747
endcmap
 
1748
CMapName currentdict /CMap defineresource pop
 
1749
end
 
1750
end
 
1751
%%EndResource
 
1752
%%EOF
 
1753
    }\endgroup
 
1754
  \expandafter\edef\csname cmapOT1TT\endcsname#1{%
 
1755
    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
 
1756
  }%
 
1757
\fi\fi
 
1758
 
1518
1759
 
1519
1760
% Set the font macro #1 to the font named #2, adding on the
1520
1761
% specified font prefix (normally `cm').
1521
 
% #3 is the font's design size, #4 is a scale factor
1522
 
\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
1523
 
 
 
1762
% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
 
1763
% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
 
1764
% empty to omit).
 
1765
\def\setfont#1#2#3#4#5{%
 
1766
  \font#1=\fontprefix#2#3 scaled #4
 
1767
  \csname cmap#5\endcsname#1%
 
1768
}
 
1769
% This is what gets called when #5 of \setfont is empty.
 
1770
\let\cmap\gobble
 
1771
% emacs-page end of cmaps
1524
1772
 
1525
1773
% Use cm as the default font prefix.
1526
1774
% To specify the font prefix, you must define \fontprefix
1527
1775
% before you read in texinfo.tex.
1528
 
\ifx\fontprefix\undefined
 
1776
\ifx\fontprefix\thisisundefined
1529
1777
\def\fontprefix{cm}
1530
1778
\fi
1531
1779
% Support font families that don't use the same naming scheme as CM.
1547
1795
 
1548
1796
% Definitions for a main text size of 11pt.  This is the default in
1549
1797
% Texinfo.
1550
 
1551
 
\def\definetextfontsizexi{
 
1798
%
 
1799
\def\definetextfontsizexi{%
1552
1800
% Text fonts (11.2pt, magstep1).
1553
1801
\def\textnominalsize{11pt}
1554
1802
\edef\mainmagstep{\magstephalf}
1555
 
\setfont\textrm\rmshape{10}{\mainmagstep}
1556
 
\setfont\texttt\ttshape{10}{\mainmagstep}
1557
 
\setfont\textbf\bfshape{10}{\mainmagstep}
1558
 
\setfont\textit\itshape{10}{\mainmagstep}
1559
 
\setfont\textsl\slshape{10}{\mainmagstep}
1560
 
\setfont\textsf\sfshape{10}{\mainmagstep}
1561
 
\setfont\textsc\scshape{10}{\mainmagstep}
1562
 
\setfont\textttsl\ttslshape{10}{\mainmagstep}
 
1803
\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
 
1804
\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
 
1805
\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
 
1806
\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
 
1807
\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
 
1808
\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
 
1809
\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
 
1810
\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1563
1811
\font\texti=cmmi10 scaled \mainmagstep
1564
1812
\font\textsy=cmsy10 scaled \mainmagstep
 
1813
\def\textecsize{1095}
1565
1814
 
1566
1815
% A few fonts for @defun names and args.
1567
 
\setfont\defbf\bfshape{10}{\magstep1}
1568
 
\setfont\deftt\ttshape{10}{\magstep1}
1569
 
\setfont\defttsl\ttslshape{10}{\magstep1}
 
1816
\setfont\defbf\bfshape{10}{\magstep1}{OT1}
 
1817
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
 
1818
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
1570
1819
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1571
1820
 
1572
1821
% Fonts for indices, footnotes, small examples (9pt).
1573
1822
\def\smallnominalsize{9pt}
1574
 
\setfont\smallrm\rmshape{9}{1000}
1575
 
\setfont\smalltt\ttshape{9}{1000}
1576
 
\setfont\smallbf\bfshape{10}{900}
1577
 
\setfont\smallit\itshape{9}{1000}
1578
 
\setfont\smallsl\slshape{9}{1000}
1579
 
\setfont\smallsf\sfshape{9}{1000}
1580
 
\setfont\smallsc\scshape{10}{900}
1581
 
\setfont\smallttsl\ttslshape{10}{900}
 
1823
\setfont\smallrm\rmshape{9}{1000}{OT1}
 
1824
\setfont\smalltt\ttshape{9}{1000}{OT1TT}
 
1825
\setfont\smallbf\bfshape{10}{900}{OT1}
 
1826
\setfont\smallit\itshape{9}{1000}{OT1IT}
 
1827
\setfont\smallsl\slshape{9}{1000}{OT1}
 
1828
\setfont\smallsf\sfshape{9}{1000}{OT1}
 
1829
\setfont\smallsc\scshape{10}{900}{OT1}
 
1830
\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1582
1831
\font\smalli=cmmi9
1583
1832
\font\smallsy=cmsy9
 
1833
\def\smallecsize{0900}
1584
1834
 
1585
1835
% Fonts for small examples (8pt).
1586
1836
\def\smallernominalsize{8pt}
1587
 
\setfont\smallerrm\rmshape{8}{1000}
1588
 
\setfont\smallertt\ttshape{8}{1000}
1589
 
\setfont\smallerbf\bfshape{10}{800}
1590
 
\setfont\smallerit\itshape{8}{1000}
1591
 
\setfont\smallersl\slshape{8}{1000}
1592
 
\setfont\smallersf\sfshape{8}{1000}
1593
 
\setfont\smallersc\scshape{10}{800}
1594
 
\setfont\smallerttsl\ttslshape{10}{800}
 
1837
\setfont\smallerrm\rmshape{8}{1000}{OT1}
 
1838
\setfont\smallertt\ttshape{8}{1000}{OT1TT}
 
1839
\setfont\smallerbf\bfshape{10}{800}{OT1}
 
1840
\setfont\smallerit\itshape{8}{1000}{OT1IT}
 
1841
\setfont\smallersl\slshape{8}{1000}{OT1}
 
1842
\setfont\smallersf\sfshape{8}{1000}{OT1}
 
1843
\setfont\smallersc\scshape{10}{800}{OT1}
 
1844
\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1595
1845
\font\smalleri=cmmi8
1596
1846
\font\smallersy=cmsy8
 
1847
\def\smallerecsize{0800}
1597
1848
 
1598
1849
% Fonts for title page (20.4pt):
1599
1850
\def\titlenominalsize{20pt}
1600
 
\setfont\titlerm\rmbshape{12}{\magstep3}
1601
 
\setfont\titleit\itbshape{10}{\magstep4}
1602
 
\setfont\titlesl\slbshape{10}{\magstep4}
1603
 
\setfont\titlett\ttbshape{12}{\magstep3}
1604
 
\setfont\titlettsl\ttslshape{10}{\magstep4}
1605
 
\setfont\titlesf\sfbshape{17}{\magstep1}
 
1851
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
 
1852
\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
 
1853
\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
 
1854
\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
 
1855
\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
 
1856
\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1606
1857
\let\titlebf=\titlerm
1607
 
\setfont\titlesc\scbshape{10}{\magstep4}
 
1858
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1608
1859
\font\titlei=cmmi12 scaled \magstep3
1609
1860
\font\titlesy=cmsy10 scaled \magstep4
1610
 
\def\authorrm{\secrm}
1611
 
\def\authortt{\sectt}
 
1861
\def\titleecsize{2074}
1612
1862
 
1613
1863
% Chapter (and unnumbered) fonts (17.28pt).
1614
1864
\def\chapnominalsize{17pt}
1615
 
\setfont\chaprm\rmbshape{12}{\magstep2}
1616
 
\setfont\chapit\itbshape{10}{\magstep3}
1617
 
\setfont\chapsl\slbshape{10}{\magstep3}
1618
 
\setfont\chaptt\ttbshape{12}{\magstep2}
1619
 
\setfont\chapttsl\ttslshape{10}{\magstep3}
1620
 
\setfont\chapsf\sfbshape{17}{1000}
 
1865
\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
 
1866
\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
 
1867
\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
 
1868
\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
 
1869
\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
 
1870
\setfont\chapsf\sfbshape{17}{1000}{OT1}
1621
1871
\let\chapbf=\chaprm
1622
 
\setfont\chapsc\scbshape{10}{\magstep3}
 
1872
\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
1623
1873
\font\chapi=cmmi12 scaled \magstep2
1624
1874
\font\chapsy=cmsy10 scaled \magstep3
 
1875
\def\chapecsize{1728}
1625
1876
 
1626
1877
% Section fonts (14.4pt).
1627
1878
\def\secnominalsize{14pt}
1628
 
\setfont\secrm\rmbshape{12}{\magstep1}
1629
 
\setfont\secit\itbshape{10}{\magstep2}
1630
 
\setfont\secsl\slbshape{10}{\magstep2}
1631
 
\setfont\sectt\ttbshape{12}{\magstep1}
1632
 
\setfont\secttsl\ttslshape{10}{\magstep2}
1633
 
\setfont\secsf\sfbshape{12}{\magstep1}
 
1879
\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
 
1880
\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
 
1881
\setfont\secsl\slbshape{10}{\magstep2}{OT1}
 
1882
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
 
1883
\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
 
1884
\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
1634
1885
\let\secbf\secrm
1635
 
\setfont\secsc\scbshape{10}{\magstep2}
 
1886
\setfont\secsc\scbshape{10}{\magstep2}{OT1}
1636
1887
\font\seci=cmmi12 scaled \magstep1
1637
1888
\font\secsy=cmsy10 scaled \magstep2
 
1889
\def\sececsize{1440}
1638
1890
 
1639
1891
% Subsection fonts (13.15pt).
1640
1892
\def\ssecnominalsize{13pt}
1641
 
\setfont\ssecrm\rmbshape{12}{\magstephalf}
1642
 
\setfont\ssecit\itbshape{10}{1315}
1643
 
\setfont\ssecsl\slbshape{10}{1315}
1644
 
\setfont\ssectt\ttbshape{12}{\magstephalf}
1645
 
\setfont\ssecttsl\ttslshape{10}{1315}
1646
 
\setfont\ssecsf\sfbshape{12}{\magstephalf}
 
1893
\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
 
1894
\setfont\ssecit\itbshape{10}{1315}{OT1IT}
 
1895
\setfont\ssecsl\slbshape{10}{1315}{OT1}
 
1896
\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
 
1897
\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
 
1898
\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
1647
1899
\let\ssecbf\ssecrm
1648
 
\setfont\ssecsc\scbshape{10}{1315}
 
1900
\setfont\ssecsc\scbshape{10}{1315}{OT1}
1649
1901
\font\sseci=cmmi12 scaled \magstephalf
1650
1902
\font\ssecsy=cmsy10 scaled 1315
 
1903
\def\ssececsize{1200}
1651
1904
 
1652
1905
% Reduced fonts for @acro in text (10pt).
1653
1906
\def\reducednominalsize{10pt}
1654
 
\setfont\reducedrm\rmshape{10}{1000}
1655
 
\setfont\reducedtt\ttshape{10}{1000}
1656
 
\setfont\reducedbf\bfshape{10}{1000}
1657
 
\setfont\reducedit\itshape{10}{1000}
1658
 
\setfont\reducedsl\slshape{10}{1000}
1659
 
\setfont\reducedsf\sfshape{10}{1000}
1660
 
\setfont\reducedsc\scshape{10}{1000}
1661
 
\setfont\reducedttsl\ttslshape{10}{1000}
 
1907
\setfont\reducedrm\rmshape{10}{1000}{OT1}
 
1908
\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
 
1909
\setfont\reducedbf\bfshape{10}{1000}{OT1}
 
1910
\setfont\reducedit\itshape{10}{1000}{OT1IT}
 
1911
\setfont\reducedsl\slshape{10}{1000}{OT1}
 
1912
\setfont\reducedsf\sfshape{10}{1000}{OT1}
 
1913
\setfont\reducedsc\scshape{10}{1000}{OT1}
 
1914
\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
1662
1915
\font\reducedi=cmmi10
1663
1916
\font\reducedsy=cmsy10
 
1917
\def\reducedecsize{1000}
1664
1918
 
1665
 
% reset the current fonts
1666
 
\textfonts
 
1919
\textleading = 13.2pt % line spacing for 11pt CM
 
1920
\textfonts            % reset the current fonts
1667
1921
\rm
1668
1922
} % end of 11pt text font size definitions
1669
1923
 
1672
1926
% section, chapter, etc., sizes following suit.  This is for the GNU
1673
1927
% Press printing of the Emacs 22 manual.  Maybe other manuals in the
1674
1928
% future.  Used with @smallbook, which sets the leading to 12pt.
1675
 
 
1929
%
1676
1930
\def\definetextfontsizex{%
1677
1931
% Text fonts (10pt).
1678
1932
\def\textnominalsize{10pt}
1679
1933
\edef\mainmagstep{1000}
1680
 
\setfont\textrm\rmshape{10}{\mainmagstep}
1681
 
\setfont\texttt\ttshape{10}{\mainmagstep}
1682
 
\setfont\textbf\bfshape{10}{\mainmagstep}
1683
 
\setfont\textit\itshape{10}{\mainmagstep}
1684
 
\setfont\textsl\slshape{10}{\mainmagstep}
1685
 
\setfont\textsf\sfshape{10}{\mainmagstep}
1686
 
\setfont\textsc\scshape{10}{\mainmagstep}
1687
 
\setfont\textttsl\ttslshape{10}{\mainmagstep}
 
1934
\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
 
1935
\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
 
1936
\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
 
1937
\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
 
1938
\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
 
1939
\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
 
1940
\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
 
1941
\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1688
1942
\font\texti=cmmi10 scaled \mainmagstep
1689
1943
\font\textsy=cmsy10 scaled \mainmagstep
 
1944
\def\textecsize{1000}
1690
1945
 
1691
1946
% A few fonts for @defun names and args.
1692
 
\setfont\defbf\bfshape{10}{\magstephalf}
1693
 
\setfont\deftt\ttshape{10}{\magstephalf}
1694
 
\setfont\defttsl\ttslshape{10}{\magstephalf}
 
1947
\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
 
1948
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
 
1949
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
1695
1950
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1696
1951
 
1697
1952
% Fonts for indices, footnotes, small examples (9pt).
1698
1953
\def\smallnominalsize{9pt}
1699
 
\setfont\smallrm\rmshape{9}{1000}
1700
 
\setfont\smalltt\ttshape{9}{1000}
1701
 
\setfont\smallbf\bfshape{10}{900}
1702
 
\setfont\smallit\itshape{9}{1000}
1703
 
\setfont\smallsl\slshape{9}{1000}
1704
 
\setfont\smallsf\sfshape{9}{1000}
1705
 
\setfont\smallsc\scshape{10}{900}
1706
 
\setfont\smallttsl\ttslshape{10}{900}
 
1954
\setfont\smallrm\rmshape{9}{1000}{OT1}
 
1955
\setfont\smalltt\ttshape{9}{1000}{OT1TT}
 
1956
\setfont\smallbf\bfshape{10}{900}{OT1}
 
1957
\setfont\smallit\itshape{9}{1000}{OT1IT}
 
1958
\setfont\smallsl\slshape{9}{1000}{OT1}
 
1959
\setfont\smallsf\sfshape{9}{1000}{OT1}
 
1960
\setfont\smallsc\scshape{10}{900}{OT1}
 
1961
\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1707
1962
\font\smalli=cmmi9
1708
1963
\font\smallsy=cmsy9
 
1964
\def\smallecsize{0900}
1709
1965
 
1710
1966
% Fonts for small examples (8pt).
1711
1967
\def\smallernominalsize{8pt}
1712
 
\setfont\smallerrm\rmshape{8}{1000}
1713
 
\setfont\smallertt\ttshape{8}{1000}
1714
 
\setfont\smallerbf\bfshape{10}{800}
1715
 
\setfont\smallerit\itshape{8}{1000}
1716
 
\setfont\smallersl\slshape{8}{1000}
1717
 
\setfont\smallersf\sfshape{8}{1000}
1718
 
\setfont\smallersc\scshape{10}{800}
1719
 
\setfont\smallerttsl\ttslshape{10}{800}
 
1968
\setfont\smallerrm\rmshape{8}{1000}{OT1}
 
1969
\setfont\smallertt\ttshape{8}{1000}{OT1TT}
 
1970
\setfont\smallerbf\bfshape{10}{800}{OT1}
 
1971
\setfont\smallerit\itshape{8}{1000}{OT1IT}
 
1972
\setfont\smallersl\slshape{8}{1000}{OT1}
 
1973
\setfont\smallersf\sfshape{8}{1000}{OT1}
 
1974
\setfont\smallersc\scshape{10}{800}{OT1}
 
1975
\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1720
1976
\font\smalleri=cmmi8
1721
1977
\font\smallersy=cmsy8
 
1978
\def\smallerecsize{0800}
1722
1979
 
1723
1980
% Fonts for title page (20.4pt):
1724
1981
\def\titlenominalsize{20pt}
1725
 
\setfont\titlerm\rmbshape{12}{\magstep3}
1726
 
\setfont\titleit\itbshape{10}{\magstep4}
1727
 
\setfont\titlesl\slbshape{10}{\magstep4}
1728
 
\setfont\titlett\ttbshape{12}{\magstep3}
1729
 
\setfont\titlettsl\ttslshape{10}{\magstep4}
1730
 
\setfont\titlesf\sfbshape{17}{\magstep1}
 
1982
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
 
1983
\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
 
1984
\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
 
1985
\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
 
1986
\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
 
1987
\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1731
1988
\let\titlebf=\titlerm
1732
 
\setfont\titlesc\scbshape{10}{\magstep4}
 
1989
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1733
1990
\font\titlei=cmmi12 scaled \magstep3
1734
1991
\font\titlesy=cmsy10 scaled \magstep4
1735
 
\def\authorrm{\secrm}
1736
 
\def\authortt{\sectt}
 
1992
\def\titleecsize{2074}
1737
1993
 
1738
1994
% Chapter fonts (14.4pt).
1739
1995
\def\chapnominalsize{14pt}
1740
 
\setfont\chaprm\rmbshape{12}{\magstep1}
1741
 
\setfont\chapit\itbshape{10}{\magstep2}
1742
 
\setfont\chapsl\slbshape{10}{\magstep2}
1743
 
\setfont\chaptt\ttbshape{12}{\magstep1}
1744
 
\setfont\chapttsl\ttslshape{10}{\magstep2}
1745
 
\setfont\chapsf\sfbshape{12}{\magstep1}
 
1996
\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
 
1997
\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
 
1998
\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
 
1999
\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
 
2000
\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
 
2001
\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
1746
2002
\let\chapbf\chaprm
1747
 
\setfont\chapsc\scbshape{10}{\magstep2}
 
2003
\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
1748
2004
\font\chapi=cmmi12 scaled \magstep1
1749
2005
\font\chapsy=cmsy10 scaled \magstep2
 
2006
\def\chapecsize{1440}
1750
2007
 
1751
2008
% Section fonts (12pt).
1752
2009
\def\secnominalsize{12pt}
1753
 
\setfont\secrm\rmbshape{12}{1000}
1754
 
\setfont\secit\itbshape{10}{\magstep1}
1755
 
\setfont\secsl\slbshape{10}{\magstep1}
1756
 
\setfont\sectt\ttbshape{12}{1000}
1757
 
\setfont\secttsl\ttslshape{10}{\magstep1}
1758
 
\setfont\secsf\sfbshape{12}{1000}
 
2010
\setfont\secrm\rmbshape{12}{1000}{OT1}
 
2011
\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
 
2012
\setfont\secsl\slbshape{10}{\magstep1}{OT1}
 
2013
\setfont\sectt\ttbshape{12}{1000}{OT1TT}
 
2014
\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
 
2015
\setfont\secsf\sfbshape{12}{1000}{OT1}
1759
2016
\let\secbf\secrm
1760
 
\setfont\secsc\scbshape{10}{\magstep1}
1761
 
\font\seci=cmmi12 
 
2017
\setfont\secsc\scbshape{10}{\magstep1}{OT1}
 
2018
\font\seci=cmmi12
1762
2019
\font\secsy=cmsy10 scaled \magstep1
 
2020
\def\sececsize{1200}
1763
2021
 
1764
2022
% Subsection fonts (10pt).
1765
2023
\def\ssecnominalsize{10pt}
1766
 
\setfont\ssecrm\rmbshape{10}{1000}
1767
 
\setfont\ssecit\itbshape{10}{1000}
1768
 
\setfont\ssecsl\slbshape{10}{1000}
1769
 
\setfont\ssectt\ttbshape{10}{1000}
1770
 
\setfont\ssecttsl\ttslshape{10}{1000}
1771
 
\setfont\ssecsf\sfbshape{10}{1000}
 
2024
\setfont\ssecrm\rmbshape{10}{1000}{OT1}
 
2025
\setfont\ssecit\itbshape{10}{1000}{OT1IT}
 
2026
\setfont\ssecsl\slbshape{10}{1000}{OT1}
 
2027
\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
 
2028
\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
 
2029
\setfont\ssecsf\sfbshape{10}{1000}{OT1}
1772
2030
\let\ssecbf\ssecrm
1773
 
\setfont\ssecsc\scbshape{10}{1000}
 
2031
\setfont\ssecsc\scbshape{10}{1000}{OT1}
1774
2032
\font\sseci=cmmi10
1775
2033
\font\ssecsy=cmsy10
 
2034
\def\ssececsize{1000}
1776
2035
 
1777
2036
% Reduced fonts for @acro in text (9pt).
1778
2037
\def\reducednominalsize{9pt}
1779
 
\setfont\reducedrm\rmshape{9}{1000}
1780
 
\setfont\reducedtt\ttshape{9}{1000}
1781
 
\setfont\reducedbf\bfshape{10}{900}
1782
 
\setfont\reducedit\itshape{9}{1000}
1783
 
\setfont\reducedsl\slshape{9}{1000}
1784
 
\setfont\reducedsf\sfshape{9}{1000}
1785
 
\setfont\reducedsc\scshape{10}{900}
1786
 
\setfont\reducedttsl\ttslshape{10}{900}
 
2038
\setfont\reducedrm\rmshape{9}{1000}{OT1}
 
2039
\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
 
2040
\setfont\reducedbf\bfshape{10}{900}{OT1}
 
2041
\setfont\reducedit\itshape{9}{1000}{OT1IT}
 
2042
\setfont\reducedsl\slshape{9}{1000}{OT1}
 
2043
\setfont\reducedsf\sfshape{9}{1000}{OT1}
 
2044
\setfont\reducedsc\scshape{10}{900}{OT1}
 
2045
\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
1787
2046
\font\reducedi=cmmi9
1788
2047
\font\reducedsy=cmsy9
1789
 
 
1790
 
% reduce space between paragraphs
1791
 
\divide\parskip by 2
1792
 
 
1793
 
% reset the current fonts
1794
 
\textfonts
 
2048
\def\reducedecsize{0900}
 
2049
 
 
2050
\divide\parskip by 2  % reduce space between paragraphs
 
2051
\textleading = 12pt   % line spacing for 10pt CM
 
2052
\textfonts            % reset the current fonts
1795
2053
\rm
1796
2054
} % end of 10pt text font size definitions
1797
2055
 
1799
2057
% We provide the user-level command
1800
2058
%   @fonttextsize 10
1801
2059
% (or 11) to redefine the text font size.  pt is assumed.
1802
 
 
2060
%
 
2061
\def\xiword{11}
1803
2062
\def\xword{10}
1804
 
\def\xiword{11}
 
2063
\def\xwordpt{10pt}
1805
2064
%
1806
2065
\parseargdef\fonttextsize{%
1807
2066
  \def\textsizearg{#1}%
1808
 
  \wlog{doing @fonttextsize \textsizearg}%
 
2067
  %\wlog{doing @fonttextsize \textsizearg}%
1809
2068
  %
1810
2069
  % Set \globaldefs so that documents can use this inside @tex, since
1811
2070
  % makeinfo 4.8 does not support it, but we need it nonetheless.
1812
 
  % 
 
2071
  %
1813
2072
 \begingroup \globaldefs=1
1814
2073
  \ifx\textsizearg\xword \definetextfontsizex
1815
2074
  \else \ifx\textsizearg\xiword \definetextfontsizexi
1859
2118
  \let\tenttsl=\titlettsl
1860
2119
  \def\curfontsize{title}%
1861
2120
  \def\lsize{chap}\def\lllsize{subsec}%
1862
 
  \resetmathfonts \setleading{25pt}}
1863
 
\def\titlefont#1{{\titlefonts\rm #1}}
 
2121
  \resetmathfonts \setleading{27pt}}
 
2122
\def\titlefont#1{{\titlefonts\rmisbold #1}}
1864
2123
\def\chapfonts{%
1865
2124
  \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1866
2125
  \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1911
2170
  \def\lsize{smaller}\def\lllsize{smaller}%
1912
2171
  \resetmathfonts \setleading{9.5pt}}
1913
2172
 
 
2173
% Fonts for short table of contents.
 
2174
\setfont\shortcontrm\rmshape{12}{1000}{OT1}
 
2175
\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
 
2176
\setfont\shortcontsl\slshape{12}{1000}{OT1}
 
2177
\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
 
2178
 
 
2179
% Define these just so they can be easily changed for other fonts.
 
2180
\def\angleleft{$\langle$}
 
2181
\def\angleright{$\rangle$}
 
2182
 
1914
2183
% Set the fonts to use with the @small... environments.
1915
2184
\let\smallexamplefonts = \smallfonts
1916
2185
 
1924
2193
%
1925
2194
% By the way, for comparison, here's what fits with @example (10pt):
1926
2195
%   8.5x11=71  smallbook=60  a4=75  a5=58
1927
 
%
1928
 
% I wish the USA used A4 paper.
1929
2196
% --karl, 24jan03.
1930
2197
 
1931
 
 
1932
2198
% Set up the default fonts, so we can use them for creating boxes.
1933
2199
%
1934
2200
\definetextfontsizexi
1935
2201
 
1936
 
% Define these so they can be easily changed for other fonts.
1937
 
\def\angleleft{$\langle$}
1938
 
\def\angleright{$\rangle$}
 
2202
 
 
2203
\message{markup,}
 
2204
 
 
2205
% Check if we are currently using a typewriter font.  Since all the
 
2206
% Computer Modern typewriter fonts have zero interword stretch (and
 
2207
% shrink), and it is reasonable to expect all typewriter fonts to have
 
2208
% this property, we can check that font parameter.
 
2209
%
 
2210
\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
 
2211
 
 
2212
% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
 
2213
% define and register \INITMACRO to be called on markup style changes.
 
2214
% \INITMACRO can check \currentmarkupstyle for the innermost
 
2215
% style and the set of \ifmarkupSTYLE switches for all styles
 
2216
% currently in effect.
 
2217
\newif\ifmarkupvar
 
2218
\newif\ifmarkupsamp
 
2219
\newif\ifmarkupkey
 
2220
%\newif\ifmarkupfile % @file == @samp.
 
2221
%\newif\ifmarkupoption % @option == @samp.
 
2222
\newif\ifmarkupcode
 
2223
\newif\ifmarkupkbd
 
2224
%\newif\ifmarkupenv % @env == @code.
 
2225
%\newif\ifmarkupcommand % @command == @code.
 
2226
\newif\ifmarkuptex % @tex (and part of @math, for now).
 
2227
\newif\ifmarkupexample
 
2228
\newif\ifmarkupverb
 
2229
\newif\ifmarkupverbatim
 
2230
 
 
2231
\let\currentmarkupstyle\empty
 
2232
 
 
2233
\def\setupmarkupstyle#1{%
 
2234
  \csname markup#1true\endcsname
 
2235
  \def\currentmarkupstyle{#1}%
 
2236
  \markupstylesetup
 
2237
}
 
2238
 
 
2239
\let\markupstylesetup\empty
 
2240
 
 
2241
\def\defmarkupstylesetup#1{%
 
2242
  \expandafter\def\expandafter\markupstylesetup
 
2243
    \expandafter{\markupstylesetup #1}%
 
2244
  \def#1%
 
2245
}
 
2246
 
 
2247
% Markup style setup for left and right quotes.
 
2248
\defmarkupstylesetup\markupsetuplq{%
 
2249
  \expandafter\let\expandafter \temp
 
2250
    \csname markupsetuplq\currentmarkupstyle\endcsname
 
2251
  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
 
2252
}
 
2253
 
 
2254
\defmarkupstylesetup\markupsetuprq{%
 
2255
  \expandafter\let\expandafter \temp
 
2256
    \csname markupsetuprq\currentmarkupstyle\endcsname
 
2257
  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
 
2258
}
 
2259
 
 
2260
{
 
2261
\catcode`\'=\active
 
2262
\catcode`\`=\active
 
2263
 
 
2264
\gdef\markupsetuplqdefault{\let`\lq}
 
2265
\gdef\markupsetuprqdefault{\let'\rq}
 
2266
 
 
2267
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
 
2268
\gdef\markupsetcodequoteright{\let'\codequoteright}
 
2269
 
 
2270
\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
 
2271
}
 
2272
 
 
2273
\let\markupsetuplqcode \markupsetcodequoteleft
 
2274
\let\markupsetuprqcode \markupsetcodequoteright
 
2275
%
 
2276
\let\markupsetuplqexample \markupsetcodequoteleft
 
2277
\let\markupsetuprqexample \markupsetcodequoteright
 
2278
%
 
2279
\let\markupsetuplqsamp \markupsetcodequoteleft
 
2280
\let\markupsetuprqsamp \markupsetcodequoteright
 
2281
%
 
2282
\let\markupsetuplqverb \markupsetcodequoteleft
 
2283
\let\markupsetuprqverb \markupsetcodequoteright
 
2284
%
 
2285
\let\markupsetuplqverbatim \markupsetcodequoteleft
 
2286
\let\markupsetuprqverbatim \markupsetcodequoteright
 
2287
 
 
2288
\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
 
2289
 
 
2290
% Allow an option to not use regular directed right quote/apostrophe
 
2291
% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
 
2292
% The undirected quote is ugly, so don't make it the default, but it
 
2293
% works for pasting with more pdf viewers (at least evince), the
 
2294
% lilypond developers report.  xpdf does work with the regular 0x27.
 
2295
%
 
2296
\def\codequoteright{%
 
2297
  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
 
2298
    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
 
2299
      '%
 
2300
    \else \char'15 \fi
 
2301
  \else \char'15 \fi
 
2302
}
 
2303
%
 
2304
% and a similar option for the left quote char vs. a grave accent.
 
2305
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
 
2306
% the code environments to do likewise.
 
2307
%
 
2308
\def\codequoteleft{%
 
2309
  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
 
2310
    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
 
2311
      % [Knuth] pp. 380,381,391
 
2312
      % \relax disables Spanish ligatures ?` and !` of \tt font.
 
2313
      \relax`%
 
2314
    \else \char'22 \fi
 
2315
  \else \char'22 \fi
 
2316
}
 
2317
 
 
2318
% Commands to set the quote options.
 
2319
 
2320
\parseargdef\codequoteundirected{%
 
2321
  \def\temp{#1}%
 
2322
  \ifx\temp\onword
 
2323
    \expandafter\let\csname SETtxicodequoteundirected\endcsname
 
2324
      = t%
 
2325
  \else\ifx\temp\offword
 
2326
    \expandafter\let\csname SETtxicodequoteundirected\endcsname
 
2327
      = \relax
 
2328
  \else
 
2329
    \errhelp = \EMsimple
 
2330
    \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
 
2331
  \fi\fi
 
2332
}
 
2333
%
 
2334
\parseargdef\codequotebacktick{%
 
2335
  \def\temp{#1}%
 
2336
  \ifx\temp\onword
 
2337
    \expandafter\let\csname SETtxicodequotebacktick\endcsname
 
2338
      = t%
 
2339
  \else\ifx\temp\offword
 
2340
    \expandafter\let\csname SETtxicodequotebacktick\endcsname
 
2341
      = \relax
 
2342
  \else
 
2343
    \errhelp = \EMsimple
 
2344
    \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
 
2345
  \fi\fi
 
2346
}
 
2347
 
 
2348
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 
2349
\def\noligaturesquoteleft{\relax\lq}
1939
2350
 
1940
2351
% Count depth in font-changes, for error checks
1941
2352
\newcount\fontdepth \fontdepth=0
1942
2353
 
1943
 
% Fonts for short table of contents.
1944
 
\setfont\shortcontrm\rmshape{12}{1000}
1945
 
\setfont\shortcontbf\bfshape{10}{\magstep1}  % no cmb12
1946
 
\setfont\shortcontsl\slshape{12}{1000}
1947
 
\setfont\shortconttt\ttshape{12}{1000}
1948
 
 
1949
 
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
1950
 
%% serif) and @ii for TeX italic
1951
 
 
1952
 
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
1953
 
% unless the following character is such as not to need one.
1954
 
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
1955
 
                    \ptexslash\fi\fi\fi}
1956
 
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
1957
 
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
1958
 
 
1959
 
% like \smartslanted except unconditionally uses \ttsl.
 
2354
% Font commands.
 
2355
 
 
2356
% #1 is the font command (\sl or \it), #2 is the text to slant.
 
2357
% If we are in a monospaced environment, however, 1) always use \ttsl,
 
2358
% and 2) do not add an italic correction.
 
2359
\def\dosmartslant#1#2{%
 
2360
  \ifusingtt 
 
2361
    {{\ttsl #2}\let\next=\relax}%
 
2362
    {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
 
2363
  \next
 
2364
}
 
2365
\def\smartslanted{\dosmartslant\sl}
 
2366
\def\smartitalic{\dosmartslant\it}
 
2367
 
 
2368
% Output an italic correction unless \next (presumed to be the following
 
2369
% character) is such as not to need one.
 
2370
\def\smartitaliccorrection{%
 
2371
  \ifx\next,%
 
2372
  \else\ifx\next-%
 
2373
  \else\ifx\next.%
 
2374
  \else\ptexslash
 
2375
  \fi\fi\fi}
 
2376
 
 
2377
% like \smartslanted except unconditionally uses \ttsl, and no ic.
1960
2378
% @var is set to this for defun arguments.
1961
 
\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
 
2379
\def\ttslanted#1{{\ttsl #1}}
1962
2380
 
1963
 
% like \smartslanted except unconditionally use \sl.  We never want
 
2381
% @cite is like \smartslanted except unconditionally use \sl.  We never want
1964
2382
% ttsl for book titles, do we?
1965
 
\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
 
2383
\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
1966
2384
 
1967
2385
\let\i=\smartitalic
1968
2386
\let\slanted=\smartslanted
1969
 
\let\var=\smartslanted
 
2387
\def\var#1{\smartslanted{#1}}
1970
2388
\let\dfn=\smartslanted
1971
2389
\let\emph=\smartitalic
1972
2390
 
1973
 
% @b, explicit bold.
 
2391
% Explicit font changes: @r, @sc, undocumented @ii.
 
2392
\def\r#1{{\rm #1}}              % roman font
 
2393
\def\sc#1{{\smallcaps#1}}       % smallcaps font
 
2394
\def\ii#1{{\it #1}}             % italic font
 
2395
 
 
2396
% @b, explicit bold.  Also @strong.
1974
2397
\def\b#1{{\bf #1}}
1975
2398
\let\strong=\b
1976
2399
 
2002
2425
\catcode`@=\other
2003
2426
\def\endofsentencespacefactor{3000}% default
2004
2427
 
 
2428
% @t, explicit typewriter.
2005
2429
\def\t#1{%
2006
2430
  {\tt \rawbackslash \plainfrenchspacing #1}%
2007
2431
  \null
2008
2432
}
2009
 
\def\samp#1{`\tclose{#1}'\null}
2010
 
\setfont\keyrm\rmshape{8}{1000}
2011
 
\font\keysy=cmsy9
2012
 
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
2013
 
  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
2014
 
    \vbox{\hrule\kern-0.4pt
2015
 
     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
2016
 
    \kern-0.4pt\hrule}%
2017
 
  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
2018
 
% The old definition, with no lozenge:
2019
 
%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
 
2433
 
 
2434
% @samp.
 
2435
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
 
2436
 
 
2437
% definition of @key that produces a lozenge.  Doesn't adjust to text size.
 
2438
%\setfont\keyrm\rmshape{8}{1000}{OT1}
 
2439
%\font\keysy=cmsy9
 
2440
%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
 
2441
%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
 
2442
%    \vbox{\hrule\kern-0.4pt
 
2443
%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
 
2444
%    \kern-0.4pt\hrule}%
 
2445
%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
 
2446
 
 
2447
% definition of @key with no lozenge.  If the current font is already
 
2448
% monospace, don't change it; that way, we respect @kbdinputstyle.  But
 
2449
% if it isn't monospace, then use \tt.
 
2450
%
 
2451
\def\key#1{{\setupmarkupstyle{key}%
 
2452
  \nohyphenation
 
2453
  \ifmonospace\else\tt\fi
 
2454
  #1}\null}
 
2455
 
 
2456
% ctrl is no longer a Texinfo command.
2020
2457
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
2021
2458
 
2022
2459
% @file, @option are the same as @samp.
2058
2495
{
2059
2496
  \catcode`\-=\active \catcode`\_=\active
2060
2497
  \catcode`\'=\active \catcode`\`=\active
 
2498
  \global\let'=\rq \global\let`=\lq  % default definitions
2061
2499
  %
2062
2500
  \global\def\code{\begingroup
2063
 
    \catcode\rquoteChar=\active \catcode\lquoteChar=\active
2064
 
    \let'\codequoteright \let`\codequoteleft
2065
 
    %
 
2501
    \setupmarkupstyle{code}%
 
2502
    % The following should really be moved into \setupmarkupstyle handlers.
2066
2503
    \catcode\dashChar=\active  \catcode\underChar=\active
2067
2504
    \ifallowcodebreaks
2068
2505
     \let-\codedash
2075
2512
  }
2076
2513
}
2077
2514
 
 
2515
\def\codex #1{\tclose{#1}\endgroup}
 
2516
 
2078
2517
\def\realdash{-}
2079
2518
\def\codedash{-\discretionary{}{}{}}
2080
2519
\def\codeunder{%
2088
2527
             \discretionary{}{}{}}%
2089
2528
            {\_}%
2090
2529
}
2091
 
\def\codex #1{\tclose{#1}\endgroup}
2092
2530
 
2093
2531
% An additional complication: the above will allow breaks after, e.g.,
2094
2532
% each of the four underscores in __typeof__.  This is undesirable in
2095
2533
% some manuals, especially if they don't have long identifiers in
2096
2534
% general.  @allowcodebreaks provides a way to control this.
2097
 
 
2535
%
2098
2536
\newif\ifallowcodebreaks  \allowcodebreakstrue
2099
2537
 
2100
2538
\def\keywordtrue{true}
2108
2546
    \allowcodebreaksfalse
2109
2547
  \else
2110
2548
    \errhelp = \EMsimple
2111
 
    \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
 
2549
    \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
2112
2550
  \fi\fi
2113
2551
}
2114
2552
 
 
2553
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
 
2554
% second argument specifying the text to display and an optional third
 
2555
% arg as text to display instead of (rather than in addition to) the url
 
2556
% itself.  First (mandatory) arg is the url.
 
2557
% (This \urefnobreak definition isn't used now, leaving it for a while
 
2558
% for comparison.)
 
2559
\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
 
2560
\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
 
2561
  \unsepspaces
 
2562
  \pdfurl{#1}%
 
2563
  \setbox0 = \hbox{\ignorespaces #3}%
 
2564
  \ifdim\wd0 > 0pt
 
2565
    \unhbox0 % third arg given, show only that
 
2566
  \else
 
2567
    \setbox0 = \hbox{\ignorespaces #2}%
 
2568
    \ifdim\wd0 > 0pt
 
2569
      \ifpdf
 
2570
        \unhbox0             % PDF: 2nd arg given, show only it
 
2571
      \else
 
2572
        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
 
2573
      \fi
 
2574
    \else
 
2575
      \code{#1}% only url given, so show it
 
2576
    \fi
 
2577
  \fi
 
2578
  \endlink
 
2579
\endgroup}
 
2580
 
 
2581
% This \urefbreak definition is the active one.
 
2582
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
 
2583
\let\uref=\urefbreak
 
2584
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
 
2585
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
 
2586
  \unsepspaces
 
2587
  \pdfurl{#1}%
 
2588
  \setbox0 = \hbox{\ignorespaces #3}%
 
2589
  \ifdim\wd0 > 0pt
 
2590
    \unhbox0 % third arg given, show only that
 
2591
  \else
 
2592
    \setbox0 = \hbox{\ignorespaces #2}%
 
2593
    \ifdim\wd0 > 0pt
 
2594
      \ifpdf
 
2595
        \unhbox0             % PDF: 2nd arg given, show only it
 
2596
      \else
 
2597
        \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
 
2598
      \fi
 
2599
    \else
 
2600
      \urefcode{#1}% only url given, so show it
 
2601
    \fi
 
2602
  \fi
 
2603
  \endlink
 
2604
\endgroup}
 
2605
 
 
2606
% Allow line breaks around only a few characters (only).
 
2607
\def\urefcatcodes{%
 
2608
  \catcode\ampChar=\active   \catcode\dotChar=\active
 
2609
  \catcode\hashChar=\active  \catcode\questChar=\active
 
2610
  \catcode\slashChar=\active
 
2611
}
 
2612
{
 
2613
  \urefcatcodes
 
2614
  %
 
2615
  \global\def\urefcode{\begingroup
 
2616
    \setupmarkupstyle{code}%
 
2617
    \urefcatcodes
 
2618
    \let&\urefcodeamp
 
2619
    \let.\urefcodedot
 
2620
    \let#\urefcodehash
 
2621
    \let?\urefcodequest
 
2622
    \let/\urefcodeslash
 
2623
    \codex
 
2624
  }
 
2625
  %
 
2626
  % By default, they are just regular characters.
 
2627
  \global\def&{\normalamp}
 
2628
  \global\def.{\normaldot}
 
2629
  \global\def#{\normalhash}
 
2630
  \global\def?{\normalquest}
 
2631
  \global\def/{\normalslash}
 
2632
}
 
2633
 
 
2634
% we put a little stretch before and after the breakable chars, to help
 
2635
% line breaking of long url's.  The unequal skips make look better in
 
2636
% cmtt at least, especially for dots.
 
2637
\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
 
2638
\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
 
2639
%
 
2640
\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
 
2641
\def\urefcodedot{\urefprestretch .\urefpoststretch}
 
2642
\def\urefcodehash{\urefprestretch \#\urefpoststretch}
 
2643
\def\urefcodequest{\urefprestretch ?\urefpoststretch}
 
2644
\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
 
2645
{
 
2646
  \catcode`\/=\active
 
2647
  \global\def\urefcodeslashfinish{%
 
2648
    \urefprestretch \slashChar
 
2649
    % Allow line break only after the final / in a sequence of
 
2650
    % slashes, to avoid line break between the slashes in http://.
 
2651
    \ifx\next/\else \urefpoststretch \fi
 
2652
  }
 
2653
}
 
2654
 
 
2655
% One more complication: by default we'll break after the special
 
2656
% characters, but some people like to break before the special chars, so
 
2657
% allow that.  Also allow no breaking at all, for manual control.
 
2658
 
2659
\parseargdef\urefbreakstyle{%
 
2660
  \def\txiarg{#1}%
 
2661
  \ifx\txiarg\wordnone
 
2662
    \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
 
2663
  \else\ifx\txiarg\wordbefore
 
2664
    \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
 
2665
  \else\ifx\txiarg\wordafter
 
2666
    \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
 
2667
  \else
 
2668
    \errhelp = \EMsimple
 
2669
    \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
 
2670
  \fi\fi\fi
 
2671
}
 
2672
\def\wordafter{after}
 
2673
\def\wordbefore{before}
 
2674
\def\wordnone{none}
 
2675
 
 
2676
\urefbreakstyle after
 
2677
 
 
2678
% @url synonym for @uref, since that's how everyone uses it.
 
2679
%
 
2680
\let\url=\uref
 
2681
 
 
2682
% rms does not like angle brackets --karl, 17may97.
 
2683
% So now @email is just like @uref, unless we are pdf.
 
2684
%
 
2685
%\def\email#1{\angleleft{\tt #1}\angleright}
 
2686
\ifpdf
 
2687
  \def\email#1{\doemail#1,,\finish}
 
2688
  \def\doemail#1,#2,#3\finish{\begingroup
 
2689
    \unsepspaces
 
2690
    \pdfurl{mailto:#1}%
 
2691
    \setbox0 = \hbox{\ignorespaces #2}%
 
2692
    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
 
2693
    \endlink
 
2694
  \endgroup}
 
2695
\else
 
2696
  \let\email=\uref
 
2697
\fi
 
2698
 
2115
2699
% @kbd is like @code, except that if the argument is just one @key command,
2116
2700
% then @kbd has no effect.
 
2701
\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
2117
2702
 
2118
2703
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
2119
2704
%   `example' (@kbd uses ttsl only inside of @example and friends),
2128
2713
    \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
2129
2714
  \else
2130
2715
    \errhelp = \EMsimple
2131
 
    \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
 
2716
    \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
2132
2717
  \fi\fi\fi
2133
2718
}
2134
2719
\def\worddistinct{distinct}
2135
2720
\def\wordexample{example}
2136
2721
\def\wordcode{code}
2137
2722
 
2138
 
% Default is `distinct.'
 
2723
% Default is `distinct'.
2139
2724
\kbdinputstyle distinct
2140
2725
 
2141
2726
\def\xkey{\key}
2142
2727
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
2143
2728
\ifx\one\xkey\ifx\threex\three \key{#2}%
2144
 
\else{\tclose{\kbdfont\look}}\fi
2145
 
\else{\tclose{\kbdfont\look}}\fi}
 
2729
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
 
2730
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
2146
2731
 
2147
2732
% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
2148
2733
\let\indicateurl=\code
2149
2734
\let\env=\code
2150
2735
\let\command=\code
2151
2736
 
2152
 
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
2153
 
% second argument specifying the text to display and an optional third
2154
 
% arg as text to display instead of (rather than in addition to) the url
2155
 
% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
2156
 
% a hypertex \special here.
2157
 
%
2158
 
\def\uref#1{\douref #1,,,\finish}
2159
 
\def\douref#1,#2,#3,#4\finish{\begingroup
2160
 
  \unsepspaces
2161
 
  \pdfurl{#1}%
2162
 
  \setbox0 = \hbox{\ignorespaces #3}%
2163
 
  \ifdim\wd0 > 0pt
2164
 
    \unhbox0 % third arg given, show only that
2165
 
  \else
2166
 
    \setbox0 = \hbox{\ignorespaces #2}%
2167
 
    \ifdim\wd0 > 0pt
2168
 
      \ifpdf
2169
 
        \unhbox0             % PDF: 2nd arg given, show only it
2170
 
      \else
2171
 
        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
2172
 
      \fi
2173
 
    \else
2174
 
      \code{#1}% only url given, so show it
2175
 
    \fi
2176
 
  \fi
2177
 
  \endlink
2178
 
\endgroup}
2179
 
 
2180
 
% @url synonym for @uref, since that's how everyone uses it.
2181
 
%
2182
 
\let\url=\uref
2183
 
 
2184
 
% rms does not like angle brackets --karl, 17may97.
2185
 
% So now @email is just like @uref, unless we are pdf.
2186
 
%
2187
 
%\def\email#1{\angleleft{\tt #1}\angleright}
2188
 
\ifpdf
2189
 
  \def\email#1{\doemail#1,,\finish}
2190
 
  \def\doemail#1,#2,#3\finish{\begingroup
2191
 
    \unsepspaces
2192
 
    \pdfurl{mailto:#1}%
2193
 
    \setbox0 = \hbox{\ignorespaces #2}%
2194
 
    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
2195
 
    \endlink
2196
 
  \endgroup}
2197
 
\else
2198
 
  \let\email=\uref
2199
 
\fi
2200
 
 
2201
 
% Check if we are currently using a typewriter font.  Since all the
2202
 
% Computer Modern typewriter fonts have zero interword stretch (and
2203
 
% shrink), and it is reasonable to expect all typewriter fonts to have
2204
 
% this property, we can check that font parameter.
2205
 
%
2206
 
\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
 
2737
% @clicksequence{File @click{} Open ...}
 
2738
\def\clicksequence#1{\begingroup #1\endgroup}
 
2739
 
 
2740
% @clickstyle @arrow   (by default)
 
2741
\parseargdef\clickstyle{\def\click{#1}}
 
2742
\def\click{\arrow}
2207
2743
 
2208
2744
% Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
2209
2745
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
2210
2746
%
2211
2747
\def\dmn#1{\thinspace #1}
2212
2748
 
2213
 
\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
2214
 
 
2215
2749
% @l was never documented to mean ``switch to the Lisp font'',
2216
2750
% and it is not used as such in any manual I can find.  We need it for
2217
2751
% Polish suppressed-l.  --karl, 22sep96.
2218
2752
%\def\l#1{{\li #1}\null}
2219
2753
 
2220
 
% Explicit font changes: @r, @sc, undocumented @ii.
2221
 
\def\r#1{{\rm #1}}              % roman font
2222
 
\def\sc#1{{\smallcaps#1}}       % smallcaps font
2223
 
\def\ii#1{{\it #1}}             % italic font
2224
 
 
2225
2754
% @acronym for "FBI", "NATO", and the like.
2226
2755
% We print this one point size smaller, since it's intended for
2227
2756
% all-uppercase.
2228
 
 
2757
%
2229
2758
\def\acronym#1{\doacronym #1,,\finish}
2230
2759
\def\doacronym#1,#2,#3\finish{%
2231
2760
  {\selectfonts\lsize #1}%
2237
2766
 
2238
2767
% @abbr for "Comput. J." and the like.
2239
2768
% No font change, but don't do end-of-sentence spacing.
2240
 
 
2769
%
2241
2770
\def\abbr#1{\doabbr #1,,\finish}
2242
2771
\def\doabbr#1,#2,#3\finish{%
2243
2772
  {\plainfrenchspacing #1}%
2247
2776
  \fi
2248
2777
}
2249
2778
 
 
2779
% @asis just yields its argument.  Used with @table, for example.
 
2780
%
 
2781
\def\asis#1{#1}
 
2782
 
 
2783
% @math outputs its argument in math mode.
 
2784
%
 
2785
% One complication: _ usually means subscripts, but it could also mean
 
2786
% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
 
2787
% _ active, and distinguish by seeing if the current family is \slfam,
 
2788
% which is what @var uses.
 
2789
{
 
2790
  \catcode`\_ = \active
 
2791
  \gdef\mathunderscore{%
 
2792
    \catcode`\_=\active
 
2793
    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
 
2794
  }
 
2795
}
 
2796
% Another complication: we want \\ (and @\) to output a math (or tt) \.
 
2797
% FYI, plain.tex uses \\ as a temporary control sequence (for no
 
2798
% particular reason), but this is not advertised and we don't care.
 
2799
%
 
2800
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
 
2801
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
 
2802
%
 
2803
\def\math{%
 
2804
  \tex
 
2805
  \mathunderscore
 
2806
  \let\\ = \mathbackslash
 
2807
  \mathactive
 
2808
  % make the texinfo accent commands work in math mode
 
2809
  \let\"=\ddot
 
2810
  \let\'=\acute
 
2811
  \let\==\bar
 
2812
  \let\^=\hat
 
2813
  \let\`=\grave
 
2814
  \let\u=\breve
 
2815
  \let\v=\check
 
2816
  \let\~=\tilde
 
2817
  \let\dotaccent=\dot
 
2818
  $\finishmath
 
2819
}
 
2820
\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
 
2821
 
 
2822
% Some active characters (such as <) are spaced differently in math.
 
2823
% We have to reset their definitions in case the @math was an argument
 
2824
% to a command which sets the catcodes (such as @item or @section).
 
2825
%
 
2826
{
 
2827
  \catcode`^ = \active
 
2828
  \catcode`< = \active
 
2829
  \catcode`> = \active
 
2830
  \catcode`+ = \active
 
2831
  \catcode`' = \active
 
2832
  \gdef\mathactive{%
 
2833
    \let^ = \ptexhat
 
2834
    \let< = \ptexless
 
2835
    \let> = \ptexgtr
 
2836
    \let+ = \ptexplus
 
2837
    \let' = \ptexquoteright
 
2838
  }
 
2839
}
 
2840
 
 
2841
 
 
2842
\message{glyphs,}
 
2843
% and logos.
 
2844
 
 
2845
% @@ prints an @.
 
2846
\def\@{\char64 }
 
2847
 
 
2848
% Used to generate quoted braces.  Unless we're in typewriter, use
 
2849
% \ecfont because the CM text fonts do not have braces, and we don't
 
2850
% want to switch into math.
 
2851
\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
 
2852
\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
 
2853
\let\{=\mylbrace
 
2854
\let\}=\myrbrace
 
2855
\begingroup
 
2856
  % Definitions to produce \{ and \} commands for indices,
 
2857
  % and @{ and @} for the aux/toc files.
 
2858
  \catcode`\{ = \other \catcode`\} = \other
 
2859
  \catcode`\[ = 1 \catcode`\] = 2
 
2860
  \catcode`\! = 0 \catcode`\\ = \other
 
2861
  !gdef!lbracecmd[\{]%
 
2862
  !gdef!rbracecmd[\}]%
 
2863
  !gdef!lbraceatcmd[@{]%
 
2864
  !gdef!rbraceatcmd[@}]%
 
2865
!endgroup
 
2866
 
 
2867
% @comma{} to avoid , parsing problems.
 
2868
\let\comma = ,
 
2869
 
 
2870
% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
 
2871
% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
 
2872
\let\, = \ptexc
 
2873
\let\dotaccent = \ptexdot
 
2874
\def\ringaccent#1{{\accent23 #1}}
 
2875
\let\tieaccent = \ptext
 
2876
\let\ubaraccent = \ptexb
 
2877
\let\udotaccent = \d
 
2878
 
 
2879
% Other special characters: @questiondown @exclamdown @ordf @ordm
 
2880
% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
 
2881
\def\questiondown{?`}
 
2882
\def\exclamdown{!`}
 
2883
\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
 
2884
\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
 
2885
 
 
2886
% Dotless i and dotless j, used for accents.
 
2887
\def\imacro{i}
 
2888
\def\jmacro{j}
 
2889
\def\dotless#1{%
 
2890
  \def\temp{#1}%
 
2891
  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
 
2892
  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
 
2893
  \else \errmessage{@dotless can be used only with i or j}%
 
2894
  \fi\fi
 
2895
}
 
2896
 
 
2897
% The \TeX{} logo, as in plain, but resetting the spacing so that a
 
2898
% period following counts as ending a sentence.  (Idea found in latex.)
 
2899
%
 
2900
\edef\TeX{\TeX \spacefactor=1000 }
 
2901
 
 
2902
% @LaTeX{} logo.  Not quite the same results as the definition in
 
2903
% latex.ltx, since we use a different font for the raised A; it's most
 
2904
% convenient for us to use an explicitly smaller font, rather than using
 
2905
% the \scriptstyle font (since we don't reset \scriptstyle and
 
2906
% \scriptscriptstyle).
 
2907
%
 
2908
\def\LaTeX{%
 
2909
  L\kern-.36em
 
2910
  {\setbox0=\hbox{T}%
 
2911
   \vbox to \ht0{\hbox{%
 
2912
     \ifx\textnominalsize\xwordpt
 
2913
       % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
 
2914
       % Revert to plain's \scriptsize, which is 7pt.
 
2915
       \count255=\the\fam $\fam\count255 \scriptstyle A$%
 
2916
     \else
 
2917
       % For 11pt, we can use our lllsize.
 
2918
       \selectfonts\lllsize A%
 
2919
     \fi
 
2920
     }%
 
2921
     \vss
 
2922
  }}%
 
2923
  \kern-.15em
 
2924
  \TeX
 
2925
}
 
2926
 
 
2927
% Some math mode symbols.
 
2928
\def\bullet{$\ptexbullet$}
 
2929
\def\geq{\ifmmode \ge\else $\ge$\fi}
 
2930
\def\leq{\ifmmode \le\else $\le$\fi}
 
2931
\def\minus{\ifmmode -\else $-$\fi}
 
2932
 
 
2933
% @dots{} outputs an ellipsis using the current font.
 
2934
% We do .5em per period so that it has the same spacing in the cm
 
2935
% typewriter fonts as three actual period characters; on the other hand,
 
2936
% in other typewriter fonts three periods are wider than 1.5em.  So do
 
2937
% whichever is larger.
 
2938
%
 
2939
\def\dots{%
 
2940
  \leavevmode
 
2941
  \setbox0=\hbox{...}% get width of three periods
 
2942
  \ifdim\wd0 > 1.5em
 
2943
    \dimen0 = \wd0
 
2944
  \else
 
2945
    \dimen0 = 1.5em
 
2946
  \fi
 
2947
  \hbox to \dimen0{%
 
2948
    \hskip 0pt plus.25fil
 
2949
    .\hskip 0pt plus1fil
 
2950
    .\hskip 0pt plus1fil
 
2951
    .\hskip 0pt plus.5fil
 
2952
  }%
 
2953
}
 
2954
 
 
2955
% @enddots{} is an end-of-sentence ellipsis.
 
2956
%
 
2957
\def\enddots{%
 
2958
  \dots
 
2959
  \spacefactor=\endofsentencespacefactor
 
2960
}
 
2961
 
 
2962
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
 
2963
%
 
2964
% Since these characters are used in examples, they should be an even number of
 
2965
% \tt widths. Each \tt character is 1en, so two makes it 1em.
 
2966
%
 
2967
\def\point{$\star$}
 
2968
\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
 
2969
\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
 
2970
\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
 
2971
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
 
2972
\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
 
2973
 
 
2974
% The @error{} command.
 
2975
% Adapted from the TeXbook's \boxit.
 
2976
%
 
2977
\newbox\errorbox
 
2978
%
 
2979
{\tentt \global\dimen0 = 3em}% Width of the box.
 
2980
\dimen2 = .55pt % Thickness of rules
 
2981
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
 
2982
\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
 
2983
%
 
2984
\setbox\errorbox=\hbox to \dimen0{\hfil
 
2985
   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
 
2986
   \advance\hsize by -2\dimen2 % Rules.
 
2987
   \vbox{%
 
2988
      \hrule height\dimen2
 
2989
      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
 
2990
         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
 
2991
         \kern3pt\vrule width\dimen2}% Space to right.
 
2992
      \hrule height\dimen2}
 
2993
    \hfil}
 
2994
%
 
2995
\def\error{\leavevmode\lower.7ex\copy\errorbox}
 
2996
 
2250
2997
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
2251
2998
%
2252
2999
\def\pounds{{\it\$}}
2256
3003
% Theiling, which support regular, slanted, bold and bold slanted (and
2257
3004
% "outlined" (blackboard board, sort of) versions, which we don't need).
2258
3005
% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
2259
 
 
3006
%
2260
3007
% Although only regular is the truly official Euro symbol, we ignore
2261
3008
% that.  The Euro is designed to be slightly taller than the regular
2262
3009
% font height.
2263
 
 
3010
%
2264
3011
% feymr - regular
2265
3012
% feymo - slanted
2266
3013
% feybr - bold
2267
3014
% feybo - bold slanted
2268
 
 
3015
%
2269
3016
% There is no good (free) typewriter version, to my knowledge.
2270
3017
% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
2271
3018
% Hmm.
2272
 
 
3019
%
2273
3020
% Also doesn't work in math.  Do we need to do math with euro symbols?
2274
3021
% Hope not.
2275
 
2276
 
 
3022
%
 
3023
%
2277
3024
\def\euro{{\eurofont e}}
2278
3025
\def\eurofont{%
2279
3026
  % We set the font at each command, rather than predefining it in
2280
3027
  % \textfonts and the other font-switching commands, so that
2281
3028
  % installations which never need the symbol don't have to have the
2282
3029
  % font installed.
2283
 
  % 
 
3030
  %
2284
3031
  % There is only one designed size (nominal 10pt), so we always scale
2285
3032
  % that to the current nominal size.
2286
 
  % 
 
3033
  %
2287
3034
  % By the way, simply using "at 1em" works for cmr10 and the like, but
2288
3035
  % does not work for cmbx10 and other extended/shrunken fonts.
2289
 
  % 
 
3036
  %
2290
3037
  \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
2291
3038
  %
2292
 
  \ifx\curfontstyle\bfstylename 
 
3039
  \ifx\curfontstyle\bfstylename
2293
3040
    % bold:
2294
3041
    \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
2295
 
  \else 
 
3042
  \else
2296
3043
    % regular:
2297
3044
    \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
2298
3045
  \fi
2299
3046
  \thiseurofont
2300
3047
}
2301
3048
 
 
3049
% Glyphs from the EC fonts.  We don't use \let for the aliases, because
 
3050
% sometimes we redefine the original macro, and the alias should reflect
 
3051
% the redefinition.
 
3052
%
 
3053
% Use LaTeX names for the Icelandic letters.
 
3054
\def\DH{{\ecfont \char"D0}} % Eth
 
3055
\def\dh{{\ecfont \char"F0}} % eth
 
3056
\def\TH{{\ecfont \char"DE}} % Thorn
 
3057
\def\th{{\ecfont \char"FE}} % thorn
 
3058
%
 
3059
\def\guillemetleft{{\ecfont \char"13}}
 
3060
\def\guillemotleft{\guillemetleft}
 
3061
\def\guillemetright{{\ecfont \char"14}}
 
3062
\def\guillemotright{\guillemetright}
 
3063
\def\guilsinglleft{{\ecfont \char"0E}}
 
3064
\def\guilsinglright{{\ecfont \char"0F}}
 
3065
\def\quotedblbase{{\ecfont \char"12}}
 
3066
\def\quotesinglbase{{\ecfont \char"0D}}
 
3067
%
 
3068
% This positioning is not perfect (see the ogonek LaTeX package), but
 
3069
% we have the precomposed glyphs for the most common cases.  We put the
 
3070
% tests to use those glyphs in the single \ogonek macro so we have fewer
 
3071
% dummy definitions to worry about for index entries, etc.
 
3072
%
 
3073
% ogonek is also used with other letters in Lithuanian (IOU), but using
 
3074
% the precomposed glyphs for those is not so easy since they aren't in
 
3075
% the same EC font.
 
3076
\def\ogonek#1{{%
 
3077
  \def\temp{#1}%
 
3078
  \ifx\temp\macrocharA\Aogonek
 
3079
  \else\ifx\temp\macrochara\aogonek
 
3080
  \else\ifx\temp\macrocharE\Eogonek
 
3081
  \else\ifx\temp\macrochare\eogonek
 
3082
  \else
 
3083
    \ecfont \setbox0=\hbox{#1}%
 
3084
    \ifdim\ht0=1ex\accent"0C #1%
 
3085
    \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
 
3086
    \fi
 
3087
  \fi\fi\fi\fi
 
3088
  }%
 
3089
}
 
3090
\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
 
3091
\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
 
3092
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
 
3093
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
 
3094
%
 
3095
% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
 
3096
\def\ecfont{%
 
3097
  % We can't distinguish serif/sans and italic/slanted, but this
 
3098
  % is used for crude hacks anyway (like adding French and German
 
3099
  % quotes to documents typeset with CM, where we lose kerning), so
 
3100
  % hopefully nobody will notice/care.
 
3101
  \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
 
3102
  \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
 
3103
  \ifx\curfontstyle\bfstylename
 
3104
    % bold:
 
3105
    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
 
3106
  \else
 
3107
    % regular:
 
3108
    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
 
3109
  \fi
 
3110
  \thisecfont
 
3111
}
 
3112
 
2302
3113
% @registeredsymbol - R in a circle.  The font for the R should really
2303
3114
% be smaller yet, but lllsize is the best we can do for now.
2304
3115
% Adapted from the plain.tex definition of \copyright.
2316
3127
% Laurent Siebenmann reports \Orb undefined with:
2317
3128
%  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
2318
3129
% so we'll define it if necessary.
2319
 
2320
 
\ifx\Orb\undefined
 
3130
%
 
3131
\ifx\Orb\thisisundefined
2321
3132
\def\Orb{\mathhexbox20D}
2322
3133
\fi
2323
3134
 
 
3135
% Quotes.
 
3136
\chardef\quotedblleft="5C
 
3137
\chardef\quotedblright=`\"
 
3138
\chardef\quoteleft=`\`
 
3139
\chardef\quoteright=`\'
 
3140
 
2324
3141
 
2325
3142
\message{page headings,}
2326
3143
 
2339
3156
\newif\ifsetshortcontentsaftertitlepage
2340
3157
 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
2341
3158
 
2342
 
\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
2343
 
        \endgroup\page\hbox{}\page}
 
3159
\parseargdef\shorttitlepage{%
 
3160
  \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
 
3161
  \endgroup\page\hbox{}\page}
2344
3162
 
2345
3163
\envdef\titlepage{%
2346
3164
  % Open one extra group, as we want to close it in the middle of \Etitlepage.
2400
3218
  \finishedtitlepagetrue
2401
3219
}
2402
3220
 
2403
 
%%% Macros to be used within @titlepage:
 
3221
% Macros to be used within @titlepage:
2404
3222
 
2405
3223
\let\subtitlerm=\tenrm
2406
3224
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
2407
3225
 
2408
 
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
2409
 
                \let\tt=\authortt}
2410
 
 
2411
3226
\parseargdef\title{%
2412
3227
  \checkenv\titlepage
2413
 
  \leftline{\titlefonts\rm #1}
 
3228
  \leftline{\titlefonts\rmisbold #1}
2414
3229
  % print a rule at the page bottom also.
2415
3230
  \finishedtitlepagefalse
2416
3231
  \vskip4pt \hrule height 4pt width \hsize \vskip4pt
2431
3246
  \else
2432
3247
    \checkenv\titlepage
2433
3248
    \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
2434
 
    {\authorfont \leftline{#1}}%
 
3249
    {\secfonts\rmisbold \leftline{#1}}%
2435
3250
  \fi
2436
3251
}
2437
3252
 
2438
3253
 
2439
 
%%% Set up page headings and footings.
 
3254
% Set up page headings and footings.
2440
3255
 
2441
3256
\let\thispage=\folio
2442
3257
 
2490
3305
 
2491
3306
\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
2492
3307
 
 
3308
% @evenheadingmarks top     \thischapter <- chapter at the top of a page
 
3309
% @evenheadingmarks bottom  \thischapter <- chapter at the bottom of a page
 
3310
%
 
3311
% The same set of arguments for:
 
3312
%
 
3313
% @oddheadingmarks
 
3314
% @evenfootingmarks
 
3315
% @oddfootingmarks
 
3316
% @everyheadingmarks
 
3317
% @everyfootingmarks
 
3318
 
 
3319
\def\evenheadingmarks{\headingmarks{even}{heading}}
 
3320
\def\oddheadingmarks{\headingmarks{odd}{heading}}
 
3321
\def\evenfootingmarks{\headingmarks{even}{footing}}
 
3322
\def\oddfootingmarks{\headingmarks{odd}{footing}}
 
3323
\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
 
3324
                          \headingmarks{odd}{heading}{#1} }
 
3325
\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
 
3326
                          \headingmarks{odd}{footing}{#1} }
 
3327
% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
 
3328
\def\headingmarks#1#2#3 {%
 
3329
  \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
 
3330
  \global\expandafter\let\csname get#1#2marks\endcsname \temp
 
3331
}
 
3332
 
 
3333
\everyheadingmarks bottom
 
3334
\everyfootingmarks bottom
2493
3335
 
2494
3336
% @headings double      turns headings on for double-sided printing.
2495
3337
% @headings single      turns headings on for single-sided printing.
2503
3345
 
2504
3346
\def\headings #1 {\csname HEADINGS#1\endcsname}
2505
3347
 
2506
 
\def\HEADINGSoff{%
2507
 
\global\evenheadline={\hfil} \global\evenfootline={\hfil}
2508
 
\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
2509
 
\HEADINGSoff
 
3348
\def\headingsoff{% non-global headings elimination
 
3349
  \evenheadline={\hfil}\evenfootline={\hfil}%
 
3350
   \oddheadline={\hfil}\oddfootline={\hfil}%
 
3351
}
 
3352
 
 
3353
\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
 
3354
\HEADINGSoff  % it's the default
 
3355
 
2510
3356
% When we turn headings on, set the page number to 1.
2511
3357
% For double-sided printing, put current file name in lower left corner,
2512
3358
% chapter name on inside top of right hand pages, document
2557
3403
% This produces Day Month Year style of output.
2558
3404
% Only define if not already defined, in case a txi-??.tex file has set
2559
3405
% up a different format (e.g., txi-cs.tex does this).
2560
 
\ifx\today\undefined
 
3406
\ifx\today\thisisundefined
2561
3407
\def\today{%
2562
3408
  \number\day\space
2563
3409
  \ifcase\month
2618
3464
    \begingroup
2619
3465
      \advance\leftskip by-\tableindent
2620
3466
      \advance\hsize by\tableindent
2621
 
      \advance\rightskip by0pt plus1fil
 
3467
      \advance\rightskip by0pt plus1fil\relax
2622
3468
      \leavevmode\unhbox0\par
2623
3469
    \endgroup
2624
3470
    %
2632
3478
    % cause the example and the item to crash together.  So we use this
2633
3479
    % bizarre value of 10001 as a signal to \aboveenvbreak to insert
2634
3480
    % \parskip glue after all.  Section titles are handled this way also.
2635
 
    % 
 
3481
    %
2636
3482
    \penalty 10001
2637
3483
    \endgroup
2638
3484
    \itemxneedsnegativevskipfalse
2726
3572
  \parindent=0pt
2727
3573
  \parskip=\smallskipamount
2728
3574
  \ifdim\parskip=0pt \parskip=2pt \fi
 
3575
  %
 
3576
  % Try typesetting the item mark that if the document erroneously says
 
3577
  % something like @itemize @samp (intending @table), there's an error
 
3578
  % right away at the @itemize.  It's not the best error message in the
 
3579
  % world, but it's better than leaving it to the @item.  This means if
 
3580
  % the user wants an empty mark, they have to say @w{} not just @w.
2729
3581
  \def\itemcontents{#1}%
 
3582
  \setbox0 = \hbox{\itemcontents}%
 
3583
  %
2730
3584
  % @itemize with no arg is equivalent to @itemize @bullet.
2731
3585
  \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
 
3586
  %
2732
3587
  \let\item=\itemizeitem
2733
3588
}
2734
3589
 
2749
3604
   \ifnum\lastpenalty<10000 \parskip=0in \fi
2750
3605
   \noindent
2751
3606
   \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
 
3607
   %
2752
3608
   \vadjust{\penalty 1200}}% not good to break after first line of item.
2753
3609
  \flushcr
2754
3610
}
2970
3826
%
2971
3827
% @headitem starts a heading row, which we typeset in bold.
2972
3828
% Assignments have to be global since we are inside the implicit group
2973
 
% of an alignment entry.  Note that \everycr resets \everytab.
2974
 
\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
 
3829
% of an alignment entry.  \everycr resets \everytab so we don't have to
 
3830
% undo it ourselves.
 
3831
\def\headitemfont{\b}% for people to use in the template row; not changeable
 
3832
\def\headitem{%
 
3833
  \checkenv\multitable
 
3834
  \crcr
 
3835
  \global\everytab={\bf}% can't use \headitemfont since the parsing differs
 
3836
  \the\everytab % for the first item
 
3837
}%
2975
3838
%
2976
3839
% A \tab used to include \hskip1sp.  But then the space in a template
2977
3840
% line is not enough.  That is bad.  So let's go back to just `&' until
2978
 
% we encounter the problem it was intended to solve again.
 
3841
% we again encounter the problem the 1sp was intended to solve.
2979
3842
%                                       --karl, nathan@acm.org, 20apr99.
2980
3843
\def\tab{\checkenv\multitable &\the\everytab}%
2981
3844
 
3087
3950
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
3088
3951
\global\advance\multitablelinespace by-\ht0
3089
3952
\fi
3090
 
%% Test to see if parskip is larger than space between lines of
3091
 
%% table. If not, do nothing.
3092
 
%%        If so, set to same dimension as multitablelinespace.
 
3953
% Test to see if parskip is larger than space between lines of
 
3954
% table. If not, do nothing.
 
3955
%        If so, set to same dimension as multitablelinespace.
3093
3956
\ifdim\multitableparskip>\multitablelinespace
3094
3957
\global\multitableparskip=\multitablelinespace
3095
3958
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
3374
4237
\def\dosynindex#1#2#3{%
3375
4238
  % Only do \closeout if we haven't already done it, else we'll end up
3376
4239
  % closing the target index.
3377
 
  \expandafter \ifx\csname donesynindex#2\endcsname \undefined
 
4240
  \expandafter \ifx\csname donesynindex#2\endcsname \relax
3378
4241
    % The \closeout helps reduce unnecessary open files; the limit on the
3379
4242
    % Acorn RISC OS is a mere 16 files.
3380
4243
    \expandafter\closeout\csname#2indfile\endcsname
3381
 
    \expandafter\let\csname\donesynindex#2\endcsname = 1
 
4244
    \expandafter\let\csname donesynindex#2\endcsname = 1
3382
4245
  \fi
3383
4246
  % redefine \fooindfile:
3384
4247
  \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
3413
4276
  \def\@{@}% change to @@ when we switch to @ as escape char in index files.
3414
4277
  \def\ {\realbackslash\space }%
3415
4278
  %
3416
 
  % Need these in case \tex is in effect and \{ is a \delimiter again.
3417
 
  % But can't use \lbracecmd and \rbracecmd because texindex assumes
3418
 
  % braces and backslashes are used only as delimiters.
3419
 
  \let\{ = \mylbrace
3420
 
  \let\} = \myrbrace
 
4279
  % Need these unexpandable (because we define \tt as a dummy)
 
4280
  % definitions when @{ or @} appear in index entry text.  Also, more
 
4281
  % complicated, when \tex is in effect and \{ is a \delimiter again.
 
4282
  % We can't use \lbracecmd and \rbracecmd because texindex assumes
 
4283
  % braces and backslashes are used only as delimiters.  Perhaps we
 
4284
  % should define @lbrace and @rbrace commands a la @comma.
 
4285
  \def\{{{\tt\char123}}%
 
4286
  \def\}{{\tt\char125}}%
3421
4287
  %
3422
4288
  % I don't entirely understand this, but when an index entry is
3423
4289
  % generated from a macro call, the \endinput which \scanmacro inserts
3428
4294
  % processing continues to some further point.  On the other hand, it
3429
4295
  % seems \endinput does not hurt in the printed index arg, since that
3430
4296
  % is still getting written without apparent harm.
3431
 
  % 
 
4297
  %
3432
4298
  % Sample source (mac-idx3.tex, reported by Graham Percival to
3433
4299
  % help-texinfo, 22may06):
3434
4300
  % @macro funindex {WORD}
3436
4302
  % @end macro
3437
4303
  % ...
3438
4304
  % @funindex commtest
3439
 
  % 
 
4305
  %
3440
4306
  % The above is not enough to reproduce the bug, but it gives the flavor.
3441
 
  % 
 
4307
  %
3442
4308
  % Sample whatsit resulting:
3443
4309
  % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
3444
 
  % 
 
4310
  %
3445
4311
  % So:
3446
4312
  \let\endinput = \empty
3447
4313
  %
3470
4336
\def\commondummies{%
3471
4337
  %
3472
4338
  % \definedummyword defines \#1 as \string\#1\space, thus effectively
3473
 
  % preventing its expansion.  This is used only for control% words,
 
4339
  % preventing its expansion.  This is used only for control words,
3474
4340
  % not control letters, because the \space would be incorrect for
3475
4341
  % control characters, but is needed to separate the control word
3476
4342
  % from whatever follows.
3489
4355
  \commondummiesnofonts
3490
4356
  %
3491
4357
  \definedummyletter\_%
 
4358
  \definedummyletter\-%
3492
4359
  %
3493
4360
  % Non-English letters.
3494
4361
  \definedummyword\AA
3495
4362
  \definedummyword\AE
 
4363
  \definedummyword\DH
3496
4364
  \definedummyword\L
 
4365
  \definedummyword\O
3497
4366
  \definedummyword\OE
3498
 
  \definedummyword\O
 
4367
  \definedummyword\TH
3499
4368
  \definedummyword\aa
3500
4369
  \definedummyword\ae
 
4370
  \definedummyword\dh
 
4371
  \definedummyword\exclamdown
3501
4372
  \definedummyword\l
 
4373
  \definedummyword\o
3502
4374
  \definedummyword\oe
3503
 
  \definedummyword\o
3504
 
  \definedummyword\ss
3505
 
  \definedummyword\exclamdown
3506
 
  \definedummyword\questiondown
3507
4375
  \definedummyword\ordf
3508
4376
  \definedummyword\ordm
 
4377
  \definedummyword\questiondown
 
4378
  \definedummyword\ss
 
4379
  \definedummyword\th
3509
4380
  %
3510
4381
  % Although these internal commands shouldn't show up, sometimes they do.
3511
4382
  \definedummyword\bf
3521
4392
  \definedummyword\TeX
3522
4393
  %
3523
4394
  % Assorted special characters.
 
4395
  \definedummyword\arrow
3524
4396
  \definedummyword\bullet
3525
4397
  \definedummyword\comma
3526
4398
  \definedummyword\copyright
3527
4399
  \definedummyword\registeredsymbol
3528
4400
  \definedummyword\dots
3529
4401
  \definedummyword\enddots
 
4402
  \definedummyword\entrybreak
3530
4403
  \definedummyword\equiv
3531
4404
  \definedummyword\error
3532
4405
  \definedummyword\euro
3533
4406
  \definedummyword\expansion
 
4407
  \definedummyword\geq
 
4408
  \definedummyword\guillemetleft
 
4409
  \definedummyword\guillemetright
 
4410
  \definedummyword\guilsinglleft
 
4411
  \definedummyword\guilsinglright
 
4412
  \definedummyword\leq
3534
4413
  \definedummyword\minus
 
4414
  \definedummyword\ogonek
3535
4415
  \definedummyword\pounds
3536
4416
  \definedummyword\point
3537
4417
  \definedummyword\print
 
4418
  \definedummyword\quotedblbase
 
4419
  \definedummyword\quotedblleft
 
4420
  \definedummyword\quotedblright
 
4421
  \definedummyword\quoteleft
 
4422
  \definedummyword\quoteright
 
4423
  \definedummyword\quotesinglbase
3538
4424
  \definedummyword\result
3539
4425
  \definedummyword\textdegree
3540
4426
  %
3569
4455
  \definedummyword\v
3570
4456
  \definedummyword\H
3571
4457
  \definedummyword\dotaccent
 
4458
  \definedummyword\ogonek
3572
4459
  \definedummyword\ringaccent
3573
4460
  \definedummyword\tieaccent
3574
4461
  \definedummyword\ubaraccent
3579
4466
  \definedummyword\b
3580
4467
  \definedummyword\i
3581
4468
  \definedummyword\r
 
4469
  \definedummyword\sansserif
3582
4470
  \definedummyword\sc
 
4471
  \definedummyword\slanted
3583
4472
  \definedummyword\t
3584
4473
  %
3585
4474
  % Commands that take arguments.
3588
4477
  \definedummyword\code
3589
4478
  \definedummyword\command
3590
4479
  \definedummyword\dfn
 
4480
  \definedummyword\dmn
 
4481
  \definedummyword\email
3591
4482
  \definedummyword\emph
3592
4483
  \definedummyword\env
3593
4484
  \definedummyword\file
 
4485
  \definedummyword\indicateurl
3594
4486
  \definedummyword\kbd
3595
4487
  \definedummyword\key
3596
4488
  \definedummyword\math
3618
4510
  \def\definedummyaccent##1{\let##1\asis}%
3619
4511
  % We can just ignore other control letters.
3620
4512
  \def\definedummyletter##1{\let##1\empty}%
3621
 
  % Hopefully, all control words can become @asis.
 
4513
  % All control words become @asis by default; overrides below.
3622
4514
  \let\definedummyword\definedummyaccent
3623
4515
  %
3624
4516
  \commondummiesnofonts
3630
4522
  %
3631
4523
  \def\ { }%
3632
4524
  \def\@{@}%
3633
 
  % how to handle braces?
3634
4525
  \def\_{\normalunderscore}%
 
4526
  \def\-{}% @- shouldn't affect sorting
 
4527
  %
 
4528
  % Unfortunately, texindex is not prepared to handle braces in the
 
4529
  % content at all.  So for index sorting, we map @{ and @} to strings
 
4530
  % starting with |, since that ASCII character is between ASCII { and }.
 
4531
  \def\{{|a}%
 
4532
  \def\}{|b}%
3635
4533
  %
3636
4534
  % Non-English letters.
3637
4535
  \def\AA{AA}%
3638
4536
  \def\AE{AE}%
 
4537
  \def\DH{DZZ}%
3639
4538
  \def\L{L}%
3640
4539
  \def\OE{OE}%
3641
4540
  \def\O{O}%
 
4541
  \def\TH{ZZZ}%
3642
4542
  \def\aa{aa}%
3643
4543
  \def\ae{ae}%
 
4544
  \def\dh{dzz}%
 
4545
  \def\exclamdown{!}%
3644
4546
  \def\l{l}%
3645
4547
  \def\oe{oe}%
 
4548
  \def\ordf{a}%
 
4549
  \def\ordm{o}%
3646
4550
  \def\o{o}%
 
4551
  \def\questiondown{?}%
3647
4552
  \def\ss{ss}%
3648
 
  \def\exclamdown{!}%
3649
 
  \def\questiondown{?}%
3650
 
  \def\ordf{a}%
3651
 
  \def\ordm{o}%
 
4553
  \def\th{zzz}%
3652
4554
  %
3653
4555
  \def\LaTeX{LaTeX}%
3654
4556
  \def\TeX{TeX}%
3655
4557
  %
3656
4558
  % Assorted special characters.
3657
4559
  % (The following {} will end up in the sort string, but that's ok.)
 
4560
  \def\arrow{->}%
3658
4561
  \def\bullet{bullet}%
3659
4562
  \def\comma{,}%
3660
4563
  \def\copyright{copyright}%
3661
 
  \def\registeredsymbol{R}%
3662
4564
  \def\dots{...}%
3663
4565
  \def\enddots{...}%
3664
4566
  \def\equiv{==}%
3665
4567
  \def\error{error}%
3666
4568
  \def\euro{euro}%
3667
4569
  \def\expansion{==>}%
 
4570
  \def\geq{>=}%
 
4571
  \def\guillemetleft{<<}%
 
4572
  \def\guillemetright{>>}%
 
4573
  \def\guilsinglleft{<}%
 
4574
  \def\guilsinglright{>}%
 
4575
  \def\leq{<=}%
3668
4576
  \def\minus{-}%
 
4577
  \def\point{.}%
3669
4578
  \def\pounds{pounds}%
3670
 
  \def\point{.}%
3671
4579
  \def\print{-|}%
 
4580
  \def\quotedblbase{"}%
 
4581
  \def\quotedblleft{"}%
 
4582
  \def\quotedblright{"}%
 
4583
  \def\quoteleft{`}%
 
4584
  \def\quoteright{'}%
 
4585
  \def\quotesinglbase{,}%
 
4586
  \def\registeredsymbol{R}%
3672
4587
  \def\result{=>}%
3673
 
  \def\textdegree{degrees}%
 
4588
  \def\textdegree{o}%
 
4589
  %
 
4590
  \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
 
4591
  \else \indexlquoteignore \fi
3674
4592
  %
3675
4593
  % We need to get rid of all macros, leaving only the arguments (if present).
3676
4594
  % Of course this is not nearly correct, but it is the best we can do for now.
3677
4595
  % makeinfo does not expand macros in the argument to @deffn, which ends up
3678
4596
  % writing an index entry, and texindex isn't prepared for an index sort entry
3679
4597
  % that starts with \.
3680
 
  % 
 
4598
  %
3681
4599
  % Since macro invocations are followed by braces, we can just redefine them
3682
4600
  % to take a single TeX argument.  The case of a macro invocation that
3683
4601
  % goes to end-of-line is not handled.
3684
 
  % 
 
4602
  %
3685
4603
  \macrolist
3686
4604
}
3687
4605
 
 
4606
% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
 
4607
% ignore left quotes in the sort term.
 
4608
{\catcode`\`=\active
 
4609
 \gdef\indexlquoteignore{\let`=\empty}}
 
4610
 
3688
4611
\let\indexbackslash=0  %overridden during \printindex.
3689
4612
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
3690
4613
 
3710
4633
    %
3711
4634
    \edef\writeto{\csname#1indfile\endcsname}%
3712
4635
    %
3713
 
    \ifvmode
3714
 
      \dosubindsanitize
3715
 
    \else
3716
 
      \dosubindwrite
3717
 
    \fi
 
4636
    \safewhatsit\dosubindwrite
3718
4637
  }%
3719
4638
  \fi
3720
4639
}
3751
4670
  \temp
3752
4671
}
3753
4672
 
3754
 
% Take care of unwanted page breaks:
 
4673
% Take care of unwanted page breaks/skips around a whatsit:
3755
4674
%
3756
4675
% If a skip is the last thing on the list now, preserve it
3757
4676
% by backing up by \lastskip, doing the \write, then inserting
3758
4677
% the skip again.  Otherwise, the whatsit generated by the
3759
 
% \write will make \lastskip zero.  The result is that sequences
3760
 
% like this:
 
4678
% \write or \pdfdest will make \lastskip zero.  The result is that
 
4679
% sequences like this:
3761
4680
% @end defun
3762
4681
% @tindex whatever
3763
4682
% @defun ...
3781
4700
%
3782
4701
\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
3783
4702
%
 
4703
\newskip\whatsitskip
 
4704
\newcount\whatsitpenalty
 
4705
%
3784
4706
% ..., ready, GO:
3785
4707
%
3786
 
\def\dosubindsanitize{%
 
4708
\def\safewhatsit#1{%
 
4709
\ifhmode
 
4710
  #1%
 
4711
\else
3787
4712
  % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
3788
 
  \skip0 = \lastskip
 
4713
  \whatsitskip = \lastskip
3789
4714
  \edef\lastskipmacro{\the\lastskip}%
3790
 
  \count255 = \lastpenalty
 
4715
  \whatsitpenalty = \lastpenalty
3791
4716
  %
3792
4717
  % If \lastskip is nonzero, that means the last item was a
3793
4718
  % skip.  And since a skip is discardable, that means this
3794
 
  % -\skip0 glue we're inserting is preceded by a
 
4719
  % -\whatsitskip glue we're inserting is preceded by a
3795
4720
  % non-discardable item, therefore it is not a potential
3796
4721
  % breakpoint, therefore no \nobreak needed.
3797
4722
  \ifx\lastskipmacro\zeroskipmacro
3798
4723
  \else
3799
 
    \vskip-\skip0
 
4724
    \vskip-\whatsitskip
3800
4725
  \fi
3801
4726
  %
3802
 
  \dosubindwrite
 
4727
  #1%
3803
4728
  %
3804
4729
  \ifx\lastskipmacro\zeroskipmacro
3805
4730
    % If \lastskip was zero, perhaps the last item was a penalty, and
3807
4732
    % to re-insert the same penalty (values >10000 are used for various
3808
4733
    % signals); since we just inserted a non-discardable item, any
3809
4734
    % following glue (such as a \parskip) would be a breakpoint.  For example:
3810
 
    % 
 
4735
    %
3811
4736
    %   @deffn deffn-whatever
3812
4737
    %   @vindex index-whatever
3813
4738
    %   Description.
3814
4739
    % would allow a break between the index-whatever whatsit
3815
4740
    % and the "Description." paragraph.
3816
 
    \ifnum\count255>9999 \penalty\count255 \fi
 
4741
    \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
3817
4742
  \else
3818
4743
    % On the other hand, if we had a nonzero \lastskip,
3819
4744
    % this make-up glue would be preceded by a non-discardable item
3820
4745
    % (the whatsit from the \write), so we must insert a \nobreak.
3821
 
    \nobreak\vskip\skip0
 
4746
    \nobreak\vskip\whatsitskip
3822
4747
  \fi
 
4748
\fi
3823
4749
}
3824
4750
 
3825
4751
% The index entry written in the file actually looks like
3862
4788
  %
3863
4789
  \smallfonts \rm
3864
4790
  \tolerance = 9500
 
4791
  \plainfrenchspacing
3865
4792
  \everypar = {}% don't want the \kern\-parindent from indentation suppression.
3866
4793
  %
3867
4794
  % See if the index file exists and is nonempty.
3935
4862
%
3936
4863
% A straightforward implementation would start like this:
3937
4864
%       \def\entry#1#2{...
3938
 
% But this frozes the catcodes in the argument, and can cause problems to
 
4865
% But this freezes the catcodes in the argument, and can cause problems to
3939
4866
% @code, which sets - active.  This problem was fixed by a kludge---
3940
4867
% ``-'' was active throughout whole index, but this isn't really right.
3941
 
%
3942
4868
% The right solution is to prevent \entry from swallowing the whole text.
3943
4869
%                                 --kasal, 21nov03
3944
4870
\def\entry{%
3975
4901
    % columns.
3976
4902
    \vskip 0pt plus1pt
3977
4903
    %
 
4904
    % When reading the text of entry, convert explicit line breaks
 
4905
    % from @* into spaces.  The user might give these in long section
 
4906
    % titles, for instance.
 
4907
    \def\*{\unskip\space\ignorespaces}%
 
4908
    \def\entrybreak{\hfil\break}%
 
4909
    %
3978
4910
    % Swallow the left brace of the text (first parameter):
3979
4911
    \afterassignment\doentry
3980
4912
    \let\temp =
3981
4913
}
 
4914
\def\entrybreak{\unskip\space\ignorespaces}%
3982
4915
\def\doentry{%
3983
4916
    \bgroup % Instead of the swallowed brace.
3984
4917
      \noindent
3991
4924
    % The following is kludged to not output a line of dots in the index if
3992
4925
    % there are no page numbers.  The next person who breaks this will be
3993
4926
    % cursed by a Unix daemon.
3994
 
    \def\tempa{{\rm }}%
3995
 
    \def\tempb{#1}%
3996
 
    \edef\tempc{\tempa}%
3997
 
    \edef\tempd{\tempb}%
3998
 
    \ifx\tempc\tempd
 
4927
    \setbox\boxA = \hbox{#1}%
 
4928
    \ifdim\wd\boxA = 0pt
3999
4929
      \ %
4000
4930
    \else
4001
4931
      %
4131
5061
%
4132
5062
% All done with double columns.
4133
5063
\def\enddoublecolumns{%
 
5064
  % The following penalty ensures that the page builder is exercised
 
5065
  % _before_ we change the output routine.  This is necessary in the
 
5066
  % following situation:
 
5067
  %
 
5068
  % The last section of the index consists only of a single entry.
 
5069
  % Before this section, \pagetotal is less than \pagegoal, so no
 
5070
  % break occurs before the last section starts.  However, the last
 
5071
  % section, consisting of \initial and the single \entry, does not
 
5072
  % fit on the page and has to be broken off.  Without the following
 
5073
  % penalty the page builder will not be exercised until \eject
 
5074
  % below, and by that time we'll already have changed the output
 
5075
  % routine to the \balancecolumns version, so the next-to-last
 
5076
  % double-column page will be processed with \balancecolumns, which
 
5077
  % is wrong:  The two columns will go to the main vertical list, with
 
5078
  % the broken-off section in the recent contributions.  As soon as
 
5079
  % the output routine finishes, TeX starts reconsidering the page
 
5080
  % break.  The two columns and the broken-off section both fit on the
 
5081
  % page, because the two columns now take up only half of the page
 
5082
  % goal.  When TeX sees \eject from below which follows the final
 
5083
  % section, it invokes the new output routine that we've set after
 
5084
  % \balancecolumns below; \onepageout will try to fit the two columns
 
5085
  % and the final section into the vbox of \pageheight (see
 
5086
  % \pagebody), causing an overfull box.
 
5087
  %
 
5088
  % Note that glue won't work here, because glue does not exercise the
 
5089
  % page builder, unlike penalties (see The TeXbook, pp. 280-281).
 
5090
  \penalty0
 
5091
  %
4134
5092
  \output = {%
4135
5093
    % Split the last of the double-column material.  Leave it on the
4136
5094
    % current page, no automatic page break.
4186
5144
\message{sectioning,}
4187
5145
% Chapters, sections, etc.
4188
5146
 
4189
 
% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
 
5147
% Let's start with @part.
 
5148
\outer\parseargdef\part{\partzzz{#1}}
 
5149
\def\partzzz#1{%
 
5150
  \chapoddpage
 
5151
  \null
 
5152
  \vskip.3\vsize  % move it down on the page a bit
 
5153
  \begingroup
 
5154
    \noindent \titlefonts\rmisbold #1\par % the text
 
5155
    \let\lastnode=\empty      % no node to associate with
 
5156
    \writetocentry{part}{#1}{}% but put it in the toc
 
5157
    \headingsoff              % no headline or footline on the part page
 
5158
    \chapoddpage
 
5159
  \endgroup
 
5160
}
 
5161
 
 
5162
% \unnumberedno is an oxymoron.  But we count the unnumbered
4190
5163
% sections so that we can refer to them unambiguously in the pdf
4191
5164
% outlines by their "section number".  We avoid collisions with chapter
4192
5165
% numbers by starting them at 10000.  (If a document ever has 10000
4240
5213
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
4241
5214
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
4242
5215
 
4243
 
% Each @chapter defines this as the name of the chapter.
4244
 
% page headings and footings can use it.  @section does likewise.
4245
 
% However, they are not reliable, because we don't use marks.
 
5216
% Each @chapter defines these (using marks) as the number+name, number
 
5217
% and name of the chapter.  Page headings and footings can use
 
5218
% these.  @section does likewise.
4246
5219
\def\thischapter{}
 
5220
\def\thischapternum{}
 
5221
\def\thischaptername{}
4247
5222
\def\thissection{}
 
5223
\def\thissectionnum{}
 
5224
\def\thissectionname{}
4248
5225
 
4249
5226
\newcount\absseclevel % used to calculate proper heading level
4250
5227
\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
4261
5238
\chardef\maxseclevel = 3
4262
5239
%
4263
5240
% A numbered section within an unnumbered changes to unnumbered too.
4264
 
% To achive this, remember the "biggest" unnum. sec. we are currently in:
4265
 
\chardef\unmlevel = \maxseclevel
 
5241
% To achieve this, remember the "biggest" unnum. sec. we are currently in:
 
5242
\chardef\unnlevel = \maxseclevel
4266
5243
%
4267
5244
% Trace whether the current chapter is an appendix or not:
4268
5245
% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
4287
5264
  % The heading type:
4288
5265
  \def\headtype{#1}%
4289
5266
  \if \headtype U%
4290
 
    \ifnum \absseclevel < \unmlevel
4291
 
      \chardef\unmlevel = \absseclevel
 
5267
    \ifnum \absseclevel < \unnlevel
 
5268
      \chardef\unnlevel = \absseclevel
4292
5269
    \fi
4293
5270
  \else
4294
5271
    % Check for appendix sections:
4300
5277
      \fi\fi
4301
5278
    \fi
4302
5279
    % Check for numbered within unnumbered:
4303
 
    \ifnum \absseclevel > \unmlevel
 
5280
    \ifnum \absseclevel > \unnlevel
4304
5281
      \def\headtype{U}%
4305
5282
    \else
4306
 
      \chardef\unmlevel = 3
 
5283
      \chardef\unnlevel = 3
4307
5284
    \fi
4308
5285
  \fi
4309
5286
  % Now print the heading:
4357
5334
  \gdef\chaplevelprefix{\the\chapno.}%
4358
5335
  \resetallfloatnos
4359
5336
  %
4360
 
  \message{\putwordChapter\space \the\chapno}%
 
5337
  % \putwordChapter can contain complex things in translations.
 
5338
  \toks0=\expandafter{\putwordChapter}%
 
5339
  \message{\the\toks0 \space \the\chapno}%
4361
5340
  %
4362
5341
  % Write the actual heading.
4363
5342
  \chapmacro{#1}{Ynumbered}{\the\chapno}%
4368
5347
  \global\let\subsubsection = \numberedsubsubsec
4369
5348
}
4370
5349
 
4371
 
\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
 
5350
\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
 
5351
%
4372
5352
\def\appendixzzz#1{%
4373
5353
  \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
4374
5354
    \global\advance\appendixno by 1
4375
5355
  \gdef\chaplevelprefix{\appendixletter.}%
4376
5356
  \resetallfloatnos
4377
5357
  %
4378
 
  \def\appendixnum{\putwordAppendix\space \appendixletter}%
4379
 
  \message{\appendixnum}%
 
5358
  % \putwordAppendix can contain complex things in translations.
 
5359
  \toks0=\expandafter{\putwordAppendix}%
 
5360
  \message{\the\toks0 \space \appendixletter}%
4380
5361
  %
4381
5362
  \chapmacro{#1}{Yappendix}{\appendixletter}%
4382
5363
  %
4385
5366
  \global\let\subsubsection = \appendixsubsubsec
4386
5367
}
4387
5368
 
4388
 
\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
 
5369
% normally unnmhead0 calls unnumberedzzz:
 
5370
\outer\parseargdef\unnumbered{\unnmhead0{#1}}
4389
5371
\def\unnumberedzzz#1{%
4390
5372
  \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
4391
5373
    \global\advance\unnumberedno by 1
4429
5411
\let\top\unnumbered
4430
5412
 
4431
5413
% Sections.
 
5414
4432
5415
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
4433
5416
\def\seczzz#1{%
4434
5417
  \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
4435
5418
  \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
4436
5419
}
4437
5420
 
4438
 
\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
 
5421
% normally calls appendixsectionzzz:
 
5422
\outer\parseargdef\appendixsection{\apphead1{#1}}
4439
5423
\def\appendixsectionzzz#1{%
4440
5424
  \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
4441
5425
  \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
4442
5426
}
4443
5427
\let\appendixsec\appendixsection
4444
5428
 
4445
 
\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
 
5429
% normally calls unnumberedseczzz:
 
5430
\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
4446
5431
\def\unnumberedseczzz#1{%
4447
5432
  \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
4448
5433
  \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
4449
5434
}
4450
5435
 
4451
5436
% Subsections.
4452
 
\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
 
5437
 
5438
% normally calls numberedsubseczzz:
 
5439
\outer\parseargdef\numberedsubsec{\numhead2{#1}}
4453
5440
\def\numberedsubseczzz#1{%
4454
5441
  \global\subsubsecno=0  \global\advance\subsecno by 1
4455
5442
  \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
4456
5443
}
4457
5444
 
4458
 
\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
 
5445
% normally calls appendixsubseczzz:
 
5446
\outer\parseargdef\appendixsubsec{\apphead2{#1}}
4459
5447
\def\appendixsubseczzz#1{%
4460
5448
  \global\subsubsecno=0  \global\advance\subsecno by 1
4461
5449
  \sectionheading{#1}{subsec}{Yappendix}%
4462
5450
                 {\appendixletter.\the\secno.\the\subsecno}%
4463
5451
}
4464
5452
 
4465
 
\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
 
5453
% normally calls unnumberedsubseczzz:
 
5454
\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
4466
5455
\def\unnumberedsubseczzz#1{%
4467
5456
  \global\subsubsecno=0  \global\advance\subsecno by 1
4468
5457
  \sectionheading{#1}{subsec}{Ynothing}%
4470
5459
}
4471
5460
 
4472
5461
% Subsubsections.
4473
 
\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
 
5462
 
5463
% normally numberedsubsubseczzz:
 
5464
\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
4474
5465
\def\numberedsubsubseczzz#1{%
4475
5466
  \global\advance\subsubsecno by 1
4476
5467
  \sectionheading{#1}{subsubsec}{Ynumbered}%
4477
5468
                 {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
4478
5469
}
4479
5470
 
4480
 
\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
 
5471
% normally appendixsubsubseczzz:
 
5472
\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
4481
5473
\def\appendixsubsubseczzz#1{%
4482
5474
  \global\advance\subsubsecno by 1
4483
5475
  \sectionheading{#1}{subsubsec}{Yappendix}%
4484
5476
                 {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
4485
5477
}
4486
5478
 
4487
 
\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
 
5479
% normally unnumberedsubsubseczzz:
 
5480
\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
4488
5481
\def\unnumberedsubsubseczzz#1{%
4489
5482
  \global\advance\subsubsecno by 1
4490
5483
  \sectionheading{#1}{subsubsec}{Ynothing}%
4508
5501
%       3) Likewise, headings look best if no \parindent is used, and
4509
5502
%          if justification is not attempted.  Hence \raggedright.
4510
5503
 
4511
 
 
4512
5504
\def\majorheading{%
4513
5505
  {\advance\chapheadingskip by 10pt \chapbreak }%
4514
5506
  \parsearg\chapheadingzzz
4517
5509
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
4518
5510
\def\chapheadingzzz#1{%
4519
5511
  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
4520
 
                    \parindent=0pt\raggedright
4521
 
                    \rm #1\hfill}}%
 
5512
                    \parindent=0pt\ptexraggedright
 
5513
                    \rmisbold #1\hfill}}%
4522
5514
  \bigskip \par\penalty 200\relax
4523
5515
  \suppressfirstparagraphindent
4524
5516
}
4535
5527
% (including whitespace, linebreaking, etc. around it),
4536
5528
% given all the information in convenient, parsed form.
4537
5529
 
4538
 
%%% Args are the skip and penalty (usually negative)
 
5530
% Args are the skip and penalty (usually negative)
4539
5531
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
4540
5532
 
4541
 
%%% Define plain chapter starts, and page on/off switching for it
4542
5533
% Parameter controlling skip before chapter headings (if needed)
4543
 
 
4544
5534
\newskip\chapheadingskip
4545
5535
 
 
5536
% Define plain chapter starts, and page on/off switching for it.
4546
5537
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
4547
5538
\def\chappager{\par\vfill\supereject}
4548
 
\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
 
5539
% Because \domark is called before \chapoddpage, the filler page will
 
5540
% get the headings for the next chapter, which is wrong.  But we don't
 
5541
% care -- we just disable all headings on the filler page.
 
5542
\def\chapoddpage{%
 
5543
  \chappager
 
5544
  \ifodd\pageno \else
 
5545
    \begingroup
 
5546
      \headingsoff
 
5547
      \null
 
5548
      \chappager
 
5549
    \endgroup
 
5550
  \fi
 
5551
}
4549
5552
 
4550
5553
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
4551
5554
 
4579
5582
\def\Yappendixkeyword{Yappendix}
4580
5583
%
4581
5584
\def\chapmacro#1#2#3{%
 
5585
  % Insert the first mark before the heading break (see notes for \domark).
 
5586
  \let\prevchapterdefs=\lastchapterdefs
 
5587
  \let\prevsectiondefs=\lastsectiondefs
 
5588
  \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
 
5589
                        \gdef\thissection{}}%
 
5590
  %
 
5591
  \def\temptype{#2}%
 
5592
  \ifx\temptype\Ynothingkeyword
 
5593
    \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
 
5594
                          \gdef\thischapter{\thischaptername}}%
 
5595
  \else\ifx\temptype\Yomitfromtockeyword
 
5596
    \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
 
5597
                          \gdef\thischapter{}}%
 
5598
  \else\ifx\temptype\Yappendixkeyword
 
5599
    \toks0={#1}%
 
5600
    \xdef\lastchapterdefs{%
 
5601
      \gdef\noexpand\thischaptername{\the\toks0}%
 
5602
      \gdef\noexpand\thischapternum{\appendixletter}%
 
5603
      % \noexpand\putwordAppendix avoids expanding indigestible
 
5604
      % commands in some of the translations.
 
5605
      \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
 
5606
                                 \noexpand\thischapternum:
 
5607
                                 \noexpand\thischaptername}%
 
5608
    }%
 
5609
  \else
 
5610
    \toks0={#1}%
 
5611
    \xdef\lastchapterdefs{%
 
5612
      \gdef\noexpand\thischaptername{\the\toks0}%
 
5613
      \gdef\noexpand\thischapternum{\the\chapno}%
 
5614
      % \noexpand\putwordChapter avoids expanding indigestible
 
5615
      % commands in some of the translations.
 
5616
      \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
 
5617
                                 \noexpand\thischapternum:
 
5618
                                 \noexpand\thischaptername}%
 
5619
    }%
 
5620
  \fi\fi\fi
 
5621
  %
 
5622
  % Output the mark.  Pass it through \safewhatsit, to take care of
 
5623
  % the preceding space.
 
5624
  \safewhatsit\domark
 
5625
  %
 
5626
  % Insert the chapter heading break.
4582
5627
  \pchapsepmacro
 
5628
  %
 
5629
  % Now the second mark, after the heading break.  No break points
 
5630
  % between here and the heading.
 
5631
  \let\prevchapterdefs=\lastchapterdefs
 
5632
  \let\prevsectiondefs=\lastsectiondefs
 
5633
  \domark
 
5634
  %
4583
5635
  {%
4584
 
    \chapfonts \rm
 
5636
    \chapfonts \rmisbold
4585
5637
    %
4586
 
    % Have to define \thissection before calling \donoderef, because the
 
5638
    % Have to define \lastsection before calling \donoderef, because the
4587
5639
    % xref code eventually uses it.  On the other hand, it has to be called
4588
5640
    % after \pchapsepmacro, or the headline will change too soon.
4589
 
    \gdef\thissection{#1}%
4590
 
    \gdef\thischaptername{#1}%
 
5641
    \gdef\lastsection{#1}%
4591
5642
    %
4592
5643
    % Only insert the separating space if we have a chapter/appendix
4593
5644
    % number, and don't print the unnumbered ``number''.
4594
 
    \def\temptype{#2}%
4595
5645
    \ifx\temptype\Ynothingkeyword
4596
5646
      \setbox0 = \hbox{}%
4597
5647
      \def\toctype{unnchap}%
4598
 
      \gdef\thischapternum{}%
4599
 
      \gdef\thischapter{#1}%
4600
5648
    \else\ifx\temptype\Yomitfromtockeyword
4601
5649
      \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
4602
5650
      \def\toctype{omit}%
4603
 
      \gdef\thischapternum{}%
4604
 
      \gdef\thischapter{}%
4605
5651
    \else\ifx\temptype\Yappendixkeyword
4606
5652
      \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
4607
5653
      \def\toctype{app}%
4608
 
      \xdef\thischapternum{\appendixletter}%
4609
 
      % We don't substitute the actual chapter name into \thischapter
4610
 
      % because we don't want its macros evaluated now.  And we don't
4611
 
      % use \thissection because that changes with each section.
4612
 
      %
4613
 
      \xdef\thischapter{\putwordAppendix{} \appendixletter:
4614
 
                        \noexpand\thischaptername}%
4615
5654
    \else
4616
5655
      \setbox0 = \hbox{#3\enspace}%
4617
5656
      \def\toctype{numchap}%
4618
 
      \xdef\thischapternum{\the\chapno}%
4619
 
      \xdef\thischapter{\putwordChapter{} \the\chapno:
4620
 
                        \noexpand\thischaptername}%
4621
5657
    \fi\fi\fi
4622
5658
    %
4623
5659
    % Write the toc entry for this chapter.  Must come before the
4633
5669
    \donoderef{#2}%
4634
5670
    %
4635
5671
    % Typeset the actual heading.
4636
 
    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
 
5672
    \nobreak % Avoid page breaks at the interline glue.
 
5673
    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
4637
5674
          \hangindent=\wd0 \centerparametersmaybe
4638
5675
          \unhbox0 #1\par}%
4639
5676
  }%
4657
5694
%
4658
5695
\def\unnchfopen #1{%
4659
5696
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
4660
 
                       \parindent=0pt\raggedright
4661
 
                       \rm #1\hfill}}\bigskip \par\nobreak
 
5697
                       \parindent=0pt\ptexraggedright
 
5698
                       \rmisbold #1\hfill}}\bigskip \par\nobreak
4662
5699
}
4663
5700
\def\chfopen #1#2{\chapoddpage {\chapfonts
4664
5701
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
4667
5704
\def\centerchfopen #1{%
4668
5705
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
4669
5706
                       \parindent=0pt
4670
 
                       \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
 
5707
                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
4671
5708
}
4672
5709
\def\CHAPFopen{%
4673
5710
  \global\let\chapmacro=\chfopen
4695
5732
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
4696
5733
% section number.
4697
5734
%
 
5735
\def\seckeyword{sec}
 
5736
%
4698
5737
\def\sectionheading#1#2#3#4{%
4699
5738
  {%
 
5739
    \checkenv{}% should not be in an environment.
 
5740
    %
4700
5741
    % Switch to the right set of fonts.
4701
 
    \csname #2fonts\endcsname \rm
 
5742
    \csname #2fonts\endcsname \rmisbold
 
5743
    %
 
5744
    \def\sectionlevel{#2}%
 
5745
    \def\temptype{#3}%
 
5746
    %
 
5747
    % Insert first mark before the heading break (see notes for \domark).
 
5748
    \let\prevsectiondefs=\lastsectiondefs
 
5749
    \ifx\temptype\Ynothingkeyword
 
5750
      \ifx\sectionlevel\seckeyword
 
5751
        \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
 
5752
                              \gdef\thissection{\thissectionname}}%
 
5753
      \fi
 
5754
    \else\ifx\temptype\Yomitfromtockeyword
 
5755
      % Don't redefine \thissection.
 
5756
    \else\ifx\temptype\Yappendixkeyword
 
5757
      \ifx\sectionlevel\seckeyword
 
5758
        \toks0={#1}%
 
5759
        \xdef\lastsectiondefs{%
 
5760
          \gdef\noexpand\thissectionname{\the\toks0}%
 
5761
          \gdef\noexpand\thissectionnum{#4}%
 
5762
          % \noexpand\putwordSection avoids expanding indigestible
 
5763
          % commands in some of the translations.
 
5764
          \gdef\noexpand\thissection{\noexpand\putwordSection{}
 
5765
                                     \noexpand\thissectionnum:
 
5766
                                     \noexpand\thissectionname}%
 
5767
        }%
 
5768
      \fi
 
5769
    \else
 
5770
      \ifx\sectionlevel\seckeyword
 
5771
        \toks0={#1}%
 
5772
        \xdef\lastsectiondefs{%
 
5773
          \gdef\noexpand\thissectionname{\the\toks0}%
 
5774
          \gdef\noexpand\thissectionnum{#4}%
 
5775
          % \noexpand\putwordSection avoids expanding indigestible
 
5776
          % commands in some of the translations.
 
5777
          \gdef\noexpand\thissection{\noexpand\putwordSection{}
 
5778
                                     \noexpand\thissectionnum:
 
5779
                                     \noexpand\thissectionname}%
 
5780
        }%
 
5781
      \fi
 
5782
    \fi\fi\fi
 
5783
    %
 
5784
    % Go into vertical mode.  Usually we'll already be there, but we
 
5785
    % don't want the following whatsit to end up in a preceding paragraph
 
5786
    % if the document didn't happen to have a blank line.
 
5787
    \par
 
5788
    %
 
5789
    % Output the mark.  Pass it through \safewhatsit, to take care of
 
5790
    % the preceding space.
 
5791
    \safewhatsit\domark
4702
5792
    %
4703
5793
    % Insert space above the heading.
4704
5794
    \csname #2headingbreak\endcsname
4705
5795
    %
 
5796
    % Now the second mark, after the heading break.  No break points
 
5797
    % between here and the heading.
 
5798
    \let\prevsectiondefs=\lastsectiondefs
 
5799
    \domark
 
5800
    %
4706
5801
    % Only insert the space after the number if we have a section number.
4707
 
    \def\sectionlevel{#2}%
4708
 
    \def\temptype{#3}%
4709
 
    %
4710
5802
    \ifx\temptype\Ynothingkeyword
4711
5803
      \setbox0 = \hbox{}%
4712
5804
      \def\toctype{unn}%
4713
 
      \gdef\thissection{#1}%
 
5805
      \gdef\lastsection{#1}%
4714
5806
    \else\ifx\temptype\Yomitfromtockeyword
4715
5807
      % for @headings -- no section number, don't include in toc,
4716
 
      % and don't redefine \thissection.
 
5808
      % and don't redefine \lastsection.
4717
5809
      \setbox0 = \hbox{}%
4718
5810
      \def\toctype{omit}%
4719
5811
      \let\sectionlevel=\empty
4720
5812
    \else\ifx\temptype\Yappendixkeyword
4721
5813
      \setbox0 = \hbox{#4\enspace}%
4722
5814
      \def\toctype{app}%
4723
 
      \gdef\thissection{#1}%
 
5815
      \gdef\lastsection{#1}%
4724
5816
    \else
4725
5817
      \setbox0 = \hbox{#4\enspace}%
4726
5818
      \def\toctype{num}%
4727
 
      \gdef\thissection{#1}%
 
5819
      \gdef\lastsection{#1}%
4728
5820
    \fi\fi\fi
4729
5821
    %
4730
5822
    % Write the toc entry (before \donoderef).  See comments in \chapmacro.
4743
5835
    \nobreak
4744
5836
    %
4745
5837
    % Output the actual section heading.
4746
 
    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
 
5838
    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
4747
5839
          \hangindent=\wd0  % zero if no section number
4748
5840
          \unhbox0 #1}%
4749
5841
  }%
4759
5851
  % glue accumulate.  (Not a breakpoint because it's preceded by a
4760
5852
  % discardable item.)
4761
5853
  \vskip-\parskip
4762
 
  % 
 
5854
  %
4763
5855
  % This is purely so the last item on the list is a known \penalty >
4764
5856
  % 10000.  This is so \startdefun can avoid allowing breakpoints after
4765
5857
  % section headings.  Otherwise, it would insert a valid breakpoint between:
4766
 
  % 
 
5858
  %
4767
5859
  %   @section sec-whatever
4768
5860
  %   @deffn def-whatever
4769
5861
  \penalty 10001
4821
5913
% These characters do not print properly in the Computer Modern roman
4822
5914
% fonts, so we must take special care.  This is more or less redundant
4823
5915
% with the Texinfo input format setup at the end of this file.
4824
 
 
5916
%
4825
5917
\def\activecatcodes{%
4826
5918
  \catcode`\"=\active
4827
5919
  \catcode`\$=\active
4839
5931
\def\readtocfile{%
4840
5932
  \setupdatafile
4841
5933
  \activecatcodes
4842
 
  \input \jobname.toc
 
5934
  \input \tocreadfilename
4843
5935
}
4844
5936
 
4845
5937
\newskip\contentsrightmargin \contentsrightmargin=1in
4858
5950
  %
4859
5951
  % Don't need to put `Contents' or `Short Contents' in the headline.
4860
5952
  % It is abundantly clear what they are.
4861
 
  \def\thischapter{}%
4862
5953
  \chapmacro{#1}{Yomitfromtoc}{}%
4863
5954
  %
4864
5955
  \savepageno = \pageno
4870
5961
    \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
4871
5962
}
4872
5963
 
 
5964
% redefined for the two-volume lispref.  We always output on
 
5965
% \jobname.toc even if this is redefined.
 
5966
%
 
5967
\def\tocreadfilename{\jobname.toc}
4873
5968
 
4874
5969
% Normal (long) toc.
 
5970
%
4875
5971
\def\contents{%
4876
5972
  \startcontents{\putwordTOC}%
4877
 
    \openin 1 \jobname.toc
 
5973
    \openin 1 \tocreadfilename\space
4878
5974
    \ifeof 1 \else
4879
5975
      \readtocfile
4880
5976
    \fi
4893
5989
\def\summarycontents{%
4894
5990
  \startcontents{\putwordShortTOC}%
4895
5991
    %
 
5992
    \let\partentry = \shortpartentry
4896
5993
    \let\numchapentry = \shortchapentry
4897
5994
    \let\appentry = \shortchapentry
4898
5995
    \let\unnchapentry = \shortunnchapentry
4912
6009
    \let\numsubsubsecentry = \numsecentry
4913
6010
    \let\appsubsubsecentry = \numsecentry
4914
6011
    \let\unnsubsubsecentry = \numsecentry
4915
 
    \openin 1 \jobname.toc
 
6012
    \openin 1 \tocreadfilename\space
4916
6013
    \ifeof 1 \else
4917
6014
      \readtocfile
4918
6015
    \fi
4948
6045
% The last argument is the page number.
4949
6046
% The arguments in between are the chapter number, section number, ...
4950
6047
 
 
6048
% Parts, in the main contents.  Replace the part number, which doesn't
 
6049
% exist, with an empty box.  Let's hope all the numbers have the same width.
 
6050
% Also ignore the page number, which is conventionally not printed.
 
6051
\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
 
6052
\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
 
6053
%
 
6054
% Parts, in the short toc.
 
6055
\def\shortpartentry#1#2#3#4{%
 
6056
  \penalty-300
 
6057
  \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
 
6058
  \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
 
6059
}
 
6060
 
4951
6061
% Chapters, in the main contents.
4952
6062
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
4953
6063
%
5037
6147
\message{environments,}
5038
6148
% @foo ... @end foo.
5039
6149
 
5040
 
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
5041
 
%
5042
 
% Since these characters are used in examples, it should be an even number of
5043
 
% \tt widths. Each \tt character is 1en, so two makes it 1em.
5044
 
%
5045
 
\def\point{$\star$}
5046
 
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
5047
 
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
5048
 
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
5049
 
\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
5050
 
 
5051
 
% The @error{} command.
5052
 
% Adapted from the TeXbook's \boxit.
5053
 
%
5054
 
\newbox\errorbox
5055
 
%
5056
 
{\tentt \global\dimen0 = 3em}% Width of the box.
5057
 
\dimen2 = .55pt % Thickness of rules
5058
 
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
5059
 
\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
5060
 
%
5061
 
\setbox\errorbox=\hbox to \dimen0{\hfil
5062
 
   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
5063
 
   \advance\hsize by -2\dimen2 % Rules.
5064
 
   \vbox{%
5065
 
      \hrule height\dimen2
5066
 
      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
5067
 
         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
5068
 
         \kern3pt\vrule width\dimen2}% Space to right.
5069
 
      \hrule height\dimen2}
5070
 
    \hfil}
5071
 
%
5072
 
\def\error{\leavevmode\lower.7ex\copy\errorbox}
5073
 
 
5074
 
% @tex ... @end tex    escapes into raw Tex temporarily.
 
6150
% @tex ... @end tex    escapes into raw TeX temporarily.
5075
6151
% One exception: @ is still an escape character, so that @end tex works.
5076
 
% But \@ or @@ will get a plain tex @ character.
 
6152
% But \@ or @@ will get a plain @ character.
5077
6153
 
5078
6154
\envdef\tex{%
 
6155
  \setupmarkupstyle{tex}%
5079
6156
  \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
5080
6157
  \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
5081
6158
  \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
5085
6162
  \catcode `\|=\other
5086
6163
  \catcode `\<=\other
5087
6164
  \catcode `\>=\other
 
6165
  \catcode`\`=\other
 
6166
  \catcode`\'=\other
5088
6167
  \escapechar=`\\
5089
6168
  %
 
6169
  % ' is active in math mode (mathcode"8000).  So reset it, and all our
 
6170
  % other math active characters (just in case), to plain's definitions.
 
6171
  \mathactive
 
6172
  %
5090
6173
  \let\b=\ptexb
5091
6174
  \let\bullet=\ptexbullet
5092
6175
  \let\c=\ptexc
5104
6187
  \let\/=\ptexslash
5105
6188
  \let\*=\ptexstar
5106
6189
  \let\t=\ptext
 
6190
  \expandafter \let\csname top\endcsname=\ptextop  % outer
5107
6191
  \let\frenchspacing=\plainfrenchspacing
5108
6192
  %
5109
6193
  \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
5219
6303
 
5220
6304
% This macro is called at the beginning of all the @example variants,
5221
6305
% inside a group.
 
6306
\newdimen\nonfillparindent
5222
6307
\def\nonfillstart{%
5223
6308
  \aboveenvbreak
5224
6309
  \hfuzz = 12pt % Don't be fussy
5226
6311
  \let\par = \lisppar % don't ignore blank lines
5227
6312
  \obeylines % each line of input is a line of output
5228
6313
  \parskip = 0pt
 
6314
  % Turn off paragraph indentation but redefine \indent to emulate
 
6315
  % the normal \indent.
 
6316
  \nonfillparindent=\parindent
5229
6317
  \parindent = 0pt
 
6318
  \let\indent\nonfillindent
 
6319
  %
5230
6320
  \emergencystretch = 0pt % don't try to avoid overfull boxes
5231
6321
  \ifx\nonarrowing\relax
5232
6322
    \advance \leftskip by \lispnarrowing
5237
6327
  \let\exdent=\nofillexdent
5238
6328
}
5239
6329
 
 
6330
\begingroup
 
6331
\obeyspaces
 
6332
% We want to swallow spaces (but not other tokens) after the fake
 
6333
% @indent in our nonfill-environments, where spaces are normally
 
6334
% active and set to @tie, resulting in them not being ignored after
 
6335
% @indent.
 
6336
\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
 
6337
\gdef\nonfillindentcheck{%
 
6338
\ifx\temp %
 
6339
\expandafter\nonfillindentgobble%
 
6340
\else%
 
6341
\leavevmode\nonfillindentbox%
 
6342
\fi%
 
6343
}%
 
6344
\endgroup
 
6345
\def\nonfillindentgobble#1{\nonfillindent}
 
6346
\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
 
6347
 
5240
6348
% If you want all examples etc. small: @set dispenvsize small.
5241
6349
% If you want even small examples the full size: @set dispenvsize nosmall.
5242
6350
% This affects the following displayed environments:
5247
6355
\let\SETdispenvsize\relax
5248
6356
\def\setnormaldispenv{%
5249
6357
  \ifx\SETdispenvsize\smallword
 
6358
    % end paragraph for sake of leading, in case document has no blank
 
6359
    % line.  This is redundant with what happens in \aboveenvbreak, but
 
6360
    % we need to do it before changing the fonts, and it's inconvenient
 
6361
    % to change the fonts afterward.
 
6362
    \ifnum \lastpenalty=10000 \else \endgraf \fi
5250
6363
    \smallexamplefonts \rm
5251
6364
  \fi
5252
6365
}
5253
6366
\def\setsmalldispenv{%
5254
6367
  \ifx\SETdispenvsize\nosmallword
5255
6368
  \else
 
6369
    \ifnum \lastpenalty=10000 \else \endgraf \fi
5256
6370
    \smallexamplefonts \rm
5257
6371
  \fi
5258
6372
}
5259
6373
 
5260
6374
% We often define two environments, @foo and @smallfoo.
5261
 
% Let's do it by one command:
5262
 
\def\makedispenv #1#2{
5263
 
  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
5264
 
  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
 
6375
% Let's do it in one command.  #1 is the env name, #2 the definition.
 
6376
\def\makedispenvdef#1#2{%
 
6377
  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
 
6378
  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
5265
6379
  \expandafter\let\csname E#1\endcsname \afterenvbreak
5266
6380
  \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
5267
6381
}
5268
6382
 
5269
 
% Define two synonyms:
5270
 
\def\maketwodispenvs #1#2#3{
5271
 
  \makedispenv{#1}{#3}
5272
 
  \makedispenv{#2}{#3}
 
6383
% Define two environment synonyms (#1 and #2) for an environment.
 
6384
\def\maketwodispenvdef#1#2#3{%
 
6385
  \makedispenvdef{#1}{#3}%
 
6386
  \makedispenvdef{#2}{#3}%
5273
6387
}
5274
 
 
5275
 
% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
 
6388
%
 
6389
% @lisp: indented, narrowed, typewriter font;
 
6390
% @example: same as @lisp.
5276
6391
%
5277
6392
% @smallexample and @smalllisp: use smaller fonts.
5278
6393
% Originally contributed by Pavel@xerox.
5279
6394
%
5280
 
\maketwodispenvs {lisp}{example}{%
 
6395
\maketwodispenvdef{lisp}{example}{%
5281
6396
  \nonfillstart
5282
 
  \tt\quoteexpand
 
6397
  \tt\setupmarkupstyle{example}%
5283
6398
  \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
5284
 
  \gobble       % eat return
 
6399
  \gobble % eat return
5285
6400
}
5286
6401
% @display/@smalldisplay: same as @lisp except keep current font.
5287
6402
%
5288
 
\makedispenv {display}{%
 
6403
\makedispenvdef{display}{%
5289
6404
  \nonfillstart
5290
6405
  \gobble
5291
6406
}
5292
6407
 
5293
6408
% @format/@smallformat: same as @display except don't narrow margins.
5294
6409
%
5295
 
\makedispenv{format}{%
 
6410
\makedispenvdef{format}{%
5296
6411
  \let\nonarrowing = t%
5297
6412
  \nonfillstart
5298
6413
  \gobble
5311
6426
\envdef\flushright{%
5312
6427
  \let\nonarrowing = t%
5313
6428
  \nonfillstart
5314
 
  \advance\leftskip by 0pt plus 1fill
 
6429
  \advance\leftskip by 0pt plus 1fill\relax
5315
6430
  \gobble
5316
6431
}
5317
6432
\let\Eflushright = \afterenvbreak
5318
6433
 
5319
6434
 
 
6435
% @raggedright does more-or-less normal line breaking but no right
 
6436
% justification.  From plain.tex.
 
6437
\envdef\raggedright{%
 
6438
  \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
 
6439
}
 
6440
\let\Eraggedright\par
 
6441
 
 
6442
\envdef\raggedleft{%
 
6443
  \parindent=0pt \leftskip0pt plus2em
 
6444
  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
 
6445
  \hbadness=10000 % Last line will usually be underfull, so turn off
 
6446
                  % badness reporting.
 
6447
}
 
6448
\let\Eraggedleft\par
 
6449
 
 
6450
\envdef\raggedcenter{%
 
6451
  \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
 
6452
  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
 
6453
  \hbadness=10000 % Last line will usually be underfull, so turn off
 
6454
                  % badness reporting.
 
6455
}
 
6456
\let\Eraggedcenter\par
 
6457
 
 
6458
 
5320
6459
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
5321
6460
% and narrows the margins.  We keep \parskip nonzero in general, since
5322
6461
% we're doing normal filling.  So, when using \aboveenvbreak and
5323
6462
% \afterenvbreak, temporarily make \parskip 0.
5324
6463
%
5325
 
\envdef\quotation{%
 
6464
\makedispenvdef{quotation}{\quotationstart}
 
6465
%
 
6466
\def\quotationstart{%
5326
6467
  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
5327
6468
  \parindent=0pt
5328
6469
  %
5342
6483
%
5343
6484
\def\Equotation{%
5344
6485
  \par
5345
 
  \ifx\quotationauthor\undefined\else
 
6486
  \ifx\quotationauthor\thisisundefined\else
5346
6487
    % indent a bit.
5347
6488
    \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
5348
6489
  \fi
5349
6490
  {\parskip=0pt \afterenvbreak}%
5350
6491
}
 
6492
\def\Esmallquotation{\Equotation}
5351
6493
 
5352
6494
% If we're given an argument, typeset it in bold with a colon after.
5353
6495
\def\quotationlabel#1{%
5372
6514
  \do\ \do\\\do\{\do\}\do\$\do\&%
5373
6515
  \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
5374
6516
  \do\<\do\>\do\|\do\@\do+\do\"%
 
6517
  % Don't do the quotes -- if we do, @set txicodequoteundirected and
 
6518
  % @set txicodequotebacktick will not have effect on @verb and
 
6519
  % @verbatim, and ?` and !` ligatures won't get disabled.
 
6520
  %\do\`\do\'%
5375
6521
}
5376
6522
%
5377
6523
% [Knuth] p. 380
5378
6524
\def\uncatcodespecials{%
5379
6525
  \def\do##1{\catcode`##1=\other}\dospecials}
5380
6526
%
5381
 
% [Knuth] pp. 380,381,391
5382
 
% Disable Spanish ligatures ?` and !` of \tt font
5383
 
\begingroup
5384
 
  \catcode`\`=\active\gdef`{\relax\lq}
5385
 
\endgroup
5386
 
%
5387
6527
% Setup for the @verb command.
5388
6528
%
5389
6529
% Eight spaces for a tab
5395
6535
\def\setupverb{%
5396
6536
  \tt  % easiest (and conventionally used) font for verbatim
5397
6537
  \def\par{\leavevmode\endgraf}%
5398
 
  \catcode`\`=\active
 
6538
  \setupmarkupstyle{verb}%
5399
6539
  \tabeightspaces
5400
6540
  % Respect line breaks,
5401
6541
  % print special symbols as themselves, and
5406
6546
 
5407
6547
% Setup for the @verbatim environment
5408
6548
%
5409
 
% Real tab expansion
 
6549
% Real tab expansion.
5410
6550
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
5411
6551
%
5412
 
\def\starttabbox{\setbox0=\hbox\bgroup}
5413
 
 
5414
 
% Allow an option to not replace quotes with a regular directed right
5415
 
% quote/apostrophe (char 0x27), but instead use the undirected quote
5416
 
% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
5417
 
% the default, but it works for pasting with more pdf viewers (at least
5418
 
% evince), the lilypond developers report.  xpdf does work with the
5419
 
% regular 0x27.  
5420
 
5421
 
\def\codequoteright{%
5422
 
  \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
5423
 
    '%
5424
 
  \else
5425
 
    \char'15
5426
 
  \fi
5427
 
}
5428
 
%
5429
 
% and a similar option for the left quote char vs. a grave accent.
5430
 
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
5431
 
% the code environments to do likewise.
5432
 
5433
 
\def\codequoteleft{%
5434
 
  \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
5435
 
    `%
5436
 
  \else
5437
 
    \char'22
5438
 
  \fi
5439
 
}
 
6552
% We typeset each line of the verbatim in an \hbox, so we can handle
 
6553
% tabs.  The \global is in case the verbatim line starts with an accent,
 
6554
% or some other command that starts with a begin-group.  Otherwise, the
 
6555
% entire \verbbox would disappear at the corresponding end-group, before
 
6556
% it is typeset.  Meanwhile, we can't have nested verbatim commands
 
6557
% (can we?), so the \global won't be overwriting itself.
 
6558
\newbox\verbbox
 
6559
\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
5440
6560
%
5441
6561
\begingroup
5442
6562
  \catcode`\^^I=\active
5443
6563
  \gdef\tabexpand{%
5444
6564
    \catcode`\^^I=\active
5445
6565
    \def^^I{\leavevmode\egroup
5446
 
      \dimen0=\wd0 % the width so far, or since the previous tab
5447
 
      \divide\dimen0 by\tabw
5448
 
      \multiply\dimen0 by\tabw % compute previous multiple of \tabw
5449
 
      \advance\dimen0 by\tabw  % advance to next multiple of \tabw
5450
 
      \wd0=\dimen0 \box0 \starttabbox
 
6566
      \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
 
6567
      \divide\dimen\verbbox by\tabw
 
6568
      \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
 
6569
      \advance\dimen\verbbox by\tabw  % advance to next multiple of \tabw
 
6570
      \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
5451
6571
    }%
5452
6572
  }
5453
 
  \catcode`\'=\active
5454
 
  \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
5455
 
  %
5456
 
  \catcode`\`=\active
5457
 
  \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
5458
 
  %
5459
 
  \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
5460
6573
\endgroup
5461
6574
 
5462
6575
% start the verbatim environment.
5463
6576
\def\setupverbatim{%
5464
6577
  \let\nonarrowing = t%
5465
6578
  \nonfillstart
5466
 
  % Easiest (and conventionally used) font for verbatim
5467
 
  \tt
5468
 
  \def\par{\leavevmode\egroup\box0\endgraf}%
5469
 
  \catcode`\`=\active
 
6579
  \tt % easiest (and conventionally used) font for verbatim
 
6580
  % The \leavevmode here is for blank lines.  Otherwise, we would
 
6581
  % never \starttabox and the \egroup would end verbatim mode.
 
6582
  \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
5470
6583
  \tabexpand
5471
 
  \quoteexpand
 
6584
  \setupmarkupstyle{verbatim}%
5472
6585
  % Respect line breaks,
5473
6586
  % print special symbols as themselves, and
5474
 
  % make each space count
5475
 
  % must do in this order:
 
6587
  % make each space count.
 
6588
  % Must do in this order:
5476
6589
  \obeylines \uncatcodespecials \sepspaces
5477
6590
  \everypar{\starttabbox}%
5478
6591
}
5528
6641
  {%
5529
6642
    \makevalueexpandable
5530
6643
    \setupverbatim
 
6644
    \indexnofonts       % Allow `@@' and other weird things in file names.
 
6645
    \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
5531
6646
    \input #1
5532
6647
    \afterenvbreak
5533
6648
  }%
5553
6668
  \endgroup
5554
6669
}
5555
6670
 
 
6671
 
5556
6672
\message{defuns,}
5557
6673
% @defun etc.
5558
6674
 
5559
6675
\newskip\defbodyindent \defbodyindent=.4in
5560
6676
\newskip\defargsindent \defargsindent=50pt
5561
6677
\newskip\deflastargmargin \deflastargmargin=18pt
 
6678
\newcount\defunpenalty
5562
6679
 
5563
6680
% Start the processing of @deffn:
5564
6681
\def\startdefun{%
5565
6682
  \ifnum\lastpenalty<10000
5566
6683
    \medbreak
 
6684
    \defunpenalty=10003 % Will keep this @deffn together with the
 
6685
                        % following @def command, see below.
5567
6686
  \else
5568
6687
    % If there are two @def commands in a row, we'll have a \nobreak,
5569
6688
    % which is there to keep the function description together with its
5570
6689
    % header.  But if there's nothing but headers, we need to allow a
5571
6690
    % break somewhere.  Check specifically for penalty 10002, inserted
5572
 
    % by \defargscommonending, instead of 10000, since the sectioning
 
6691
    % by \printdefunline, instead of 10000, since the sectioning
5573
6692
    % commands also insert a nobreak penalty, and we don't want to allow
5574
6693
    % a break between a section heading and a defun.
5575
 
    % 
5576
 
    \ifnum\lastpenalty=10002 \penalty2000 \fi
 
6694
    %
 
6695
    % As a further refinement, we avoid "club" headers by signalling
 
6696
    % with penalty of 10003 after the very first @deffn in the
 
6697
    % sequence (see above), and penalty of 10002 after any following
 
6698
    % @def command.
 
6699
    \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
5577
6700
    %
5578
6701
    % Similarly, after a section heading, do not allow a break.
5579
6702
    % But do insert the glue.
5591
6714
  %
5592
6715
  % As above, allow line break if we have multiple x headers in a row.
5593
6716
  % It's not a great place, though.
5594
 
  \ifnum\lastpenalty=10002 \penalty3000 \fi
 
6717
  \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
5595
6718
  %
5596
6719
  % And now, it's time to reuse the body of the original defun:
5597
6720
  \expandafter\gobbledefun#1%
5606
6729
    #1#2 \endheader
5607
6730
    % common ending:
5608
6731
    \interlinepenalty = 10000
5609
 
    \advance\rightskip by 0pt plus 1fil
 
6732
    \advance\rightskip by 0pt plus 1fil\relax
5610
6733
    \endgraf
5611
6734
    \nobreak\vskip -\parskip
5612
 
    \penalty 10002  % signal to \startdefun and \dodefunx
 
6735
    \penalty\defunpenalty  % signal to \startdefun and \dodefunx
5613
6736
    % Some of the @defun-type tags do not enable magic parentheses,
5614
6737
    % rendering the following check redundant.  But we don't optimize.
5615
6738
    \checkparencounts
5619
6742
\def\Edefun{\endgraf\medbreak}
5620
6743
 
5621
6744
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
5622
 
% the only thing remainnig is to define \deffnheader.
 
6745
% the only thing remaining is to define \deffnheader.
5623
6746
%
5624
6747
\def\makedefun#1{%
5625
6748
  \expandafter\let\csname E#1\endcsname = \Edefun
5636
6759
\def\domakedefun#1#2#3{%
5637
6760
  \envdef#1{%
5638
6761
    \startdefun
 
6762
    \doingtypefnfalse    % distinguish typed functions from all else
5639
6763
    \parseargusing\activeparens{\printdefunline#3}%
5640
6764
  }%
5641
6765
  \def#2{\dodefunx#1}%
5642
6766
  \def#3%
5643
6767
}
5644
6768
 
5645
 
%%% Untyped functions:
 
6769
\newif\ifdoingtypefn       % doing typed function?
 
6770
\newif\ifrettypeownline    % typeset return type on its own line?
 
6771
 
 
6772
% @deftypefnnewline on|off says whether the return type of typed functions
 
6773
% are printed on their own line.  This affects @deftypefn, @deftypefun,
 
6774
% @deftypeop, and @deftypemethod.
 
6775
 
6776
\parseargdef\deftypefnnewline{%
 
6777
  \def\temp{#1}%
 
6778
  \ifx\temp\onword
 
6779
    \expandafter\let\csname SETtxideftypefnnl\endcsname
 
6780
      = \empty
 
6781
  \else\ifx\temp\offword
 
6782
    \expandafter\let\csname SETtxideftypefnnl\endcsname
 
6783
      = \relax
 
6784
  \else
 
6785
    \errhelp = \EMsimple
 
6786
    \errmessage{Unknown @txideftypefnnl value `\temp',
 
6787
                must be on|off}%
 
6788
  \fi\fi
 
6789
}
 
6790
 
 
6791
% Untyped functions:
5646
6792
 
5647
6793
% @deffn category name args
5648
6794
\makedefun{deffn}{\deffngeneral{}}
5661
6807
  \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
5662
6808
}
5663
6809
 
5664
 
%%% Typed functions:
 
6810
% Typed functions:
5665
6811
 
5666
6812
% @deftypefn category type name args
5667
6813
\makedefun{deftypefn}{\deftypefngeneral{}}
5676
6822
%
5677
6823
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
5678
6824
  \dosubind{fn}{\code{#4}}{#1}%
 
6825
  \doingtypefntrue
5679
6826
  \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
5680
6827
}
5681
6828
 
5682
 
%%% Typed variables:
 
6829
% Typed variables:
5683
6830
 
5684
6831
% @deftypevr category type var args
5685
6832
\makedefun{deftypevr}{\deftypecvgeneral{}}
5697
6844
  \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
5698
6845
}
5699
6846
 
5700
 
%%% Untyped variables:
 
6847
% Untyped variables:
5701
6848
 
5702
6849
% @defvr category var args
5703
6850
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
5708
6855
% \defcvof {category of}class var args
5709
6856
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
5710
6857
 
5711
 
%%% Type:
 
6858
% Types:
 
6859
 
5712
6860
% @deftp category name args
5713
6861
\makedefun{deftp}#1 #2 #3\endheader{%
5714
6862
  \doind{tp}{\code{#2}}%
5736
6884
% We are followed by (but not passed) the arguments, if any.
5737
6885
%
5738
6886
\def\defname#1#2#3{%
 
6887
  \par
5739
6888
  % Get the values of \leftskip and \rightskip as they were outside the @def...
5740
6889
  \advance\leftskip by -\defbodyindent
5741
6890
  %
5742
 
  % How we'll format the type name.  Putting it in brackets helps
 
6891
  % Determine if we are typesetting the return type of a typed function
 
6892
  % on a line by itself.
 
6893
  \rettypeownlinefalse
 
6894
  \ifdoingtypefn  % doing a typed function specifically?
 
6895
    % then check user option for putting return type on its own line:
 
6896
    \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
 
6897
      \rettypeownlinetrue
 
6898
    \fi
 
6899
  \fi
 
6900
  %
 
6901
  % How we'll format the category name.  Putting it in brackets helps
5743
6902
  % distinguish it from the body text that may end up on the next line
5744
6903
  % just below it.
5745
6904
  \def\temp{#1}%
5746
6905
  \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
5747
6906
  %
5748
 
  % Figure out line sizes for the paragraph shape.
 
6907
  % Figure out line sizes for the paragraph shape.  We'll always have at
 
6908
  % least two.
 
6909
  \tempnum = 2
 
6910
  %
5749
6911
  % The first line needs space for \box0; but if \rightskip is nonzero,
5750
6912
  % we need only space for the part of \box0 which exceeds it:
5751
6913
  \dimen0=\hsize  \advance\dimen0 by -\wd0  \advance\dimen0 by \rightskip
 
6914
  %
 
6915
  % If doing a return type on its own line, we'll have another line.
 
6916
  \ifrettypeownline
 
6917
    \advance\tempnum by 1
 
6918
    \def\maybeshapeline{0in \hsize}%
 
6919
  \else
 
6920
    \def\maybeshapeline{}%
 
6921
  \fi
 
6922
  %
5752
6923
  % The continuations:
5753
6924
  \dimen2=\hsize  \advance\dimen2 by -\defargsindent
5754
 
  % (plain.tex says that \dimen1 should be used only as global.)
5755
 
  \parshape 2 0in \dimen0 \defargsindent \dimen2
5756
 
  %
5757
 
  % Put the type name to the right margin.
 
6925
  %
 
6926
  % The final paragraph shape:
 
6927
  \parshape \tempnum  0in \dimen0  \maybeshapeline  \defargsindent \dimen2
 
6928
  %
 
6929
  % Put the category name at the right margin.
5758
6930
  \noindent
5759
6931
  \hbox to 0pt{%
5760
6932
    \hfil\box0 \kern-\hsize
5776
6948
    % . this still does not fix the ?` and !` ligatures, but so far no
5777
6949
    %   one has made identifiers using them :).
5778
6950
    \df \tt
5779
 
    \def\temp{#2}% return value type
5780
 
    \ifx\temp\empty\else \tclose{\temp} \fi
 
6951
    \def\temp{#2}% text of the return type
 
6952
    \ifx\temp\empty\else
 
6953
      \tclose{\temp}% typeset the return type
 
6954
      \ifrettypeownline
 
6955
        % put return type on its own line; prohibit line break following:
 
6956
        \hfil\vadjust{\nobreak}\break  
 
6957
      \else
 
6958
        \space  % type on same line, so just followed by a space
 
6959
      \fi
 
6960
    \fi           % no return type
5781
6961
    #3% output function name
5782
6962
  }%
5783
6963
  {\rm\enskip}% hskip 0.5 em of \tenrm
5798
6978
  %
5799
6979
  % On the other hand, if an argument has two dashes (for instance), we
5800
6980
  % want a way to get ttsl.  Let's try @var for that.
5801
 
  \let\var=\ttslanted
 
6981
  \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
5802
6982
  #1%
5803
6983
  \sl\hyphenchar\font=45
5804
6984
}
5878
7058
  \ifnum\parencount=0 \else \badparencount \fi
5879
7059
  \ifnum\brackcount=0 \else \badbrackcount \fi
5880
7060
}
 
7061
% these should not use \errmessage; the glibc manual, at least, actually
 
7062
% has such constructs (when documenting function pointers).
5881
7063
\def\badparencount{%
5882
 
  \errmessage{Unbalanced parentheses in @def}%
 
7064
  \message{Warning: unbalanced parentheses in @def...}%
5883
7065
  \global\parencount=0
5884
7066
}
5885
7067
\def\badbrackcount{%
5886
 
  \errmessage{Unbalanced square braces in @def}%
 
7068
  \message{Warning: unbalanced square brackets in @def...}%
5887
7069
  \global\brackcount=0
5888
7070
}
5889
7071
 
5893
7075
 
5894
7076
% To do this right we need a feature of e-TeX, \scantokens,
5895
7077
% which we arrange to emulate with a temporary file in ordinary TeX.
5896
 
\ifx\eTeXversion\undefined
 
7078
\ifx\eTeXversion\thisisundefined
5897
7079
  \newwrite\macscribble
5898
7080
  \def\scantokens#1{%
5899
7081
    \toks0={#1}%
5904
7086
  }
5905
7087
\fi
5906
7088
 
5907
 
\def\scanmacro#1{%
5908
 
  \begingroup
5909
 
    \newlinechar`\^^M
5910
 
    \let\xeatspaces\eatspaces
5911
 
    % Undo catcode changes of \startcontents and \doprintindex
5912
 
    % When called from @insertcopying or (short)caption, we need active
5913
 
    % backslash to get it printed correctly.  Previously, we had
5914
 
    % \catcode`\\=\other instead.  We'll see whether a problem appears
5915
 
    % with macro expansion.                             --kasal, 19aug04
5916
 
    \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
5917
 
    % ... and \example
5918
 
    \spaceisspace
5919
 
    %
5920
 
    % Append \endinput to make sure that TeX does not see the ending newline.
5921
 
    % I've verified that it is necessary both for e-TeX and for ordinary TeX
5922
 
    %                                                   --kasal, 29nov03
5923
 
    \scantokens{#1\endinput}%
5924
 
  \endgroup
5925
 
}
 
7089
\def\scanmacro#1{\begingroup
 
7090
  \newlinechar`\^^M
 
7091
  \let\xeatspaces\eatspaces
 
7092
  %
 
7093
  % Undo catcode changes of \startcontents and \doprintindex
 
7094
  % When called from @insertcopying or (short)caption, we need active
 
7095
  % backslash to get it printed correctly.  Previously, we had
 
7096
  % \catcode`\\=\other instead.  We'll see whether a problem appears
 
7097
  % with macro expansion.                               --kasal, 19aug04
 
7098
  \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
 
7099
  %
 
7100
  % ... and for \example:
 
7101
  \spaceisspace
 
7102
  %
 
7103
  % The \empty here causes a following catcode 5 newline to be eaten as
 
7104
  % part of reading whitespace after a control sequence.  It does not
 
7105
  % eat a catcode 13 newline.  There's no good way to handle the two
 
7106
  % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
 
7107
  % would then have different behavior).  See the Macro Details node in
 
7108
  % the manual for the workaround we recommend for macros and
 
7109
  % line-oriented commands.
 
7110
  % 
 
7111
  \scantokens{#1\empty}%
 
7112
\endgroup}
5926
7113
 
5927
7114
\def\scanexp#1{%
5928
7115
  \edef\temp{\noexpand\scanmacro{#1}}%
5950
7137
% This does \let #1 = #2, with \csnames; that is,
5951
7138
%   \let \csname#1\endcsname = \csname#2\endcsname
5952
7139
% (except of course we have to play expansion games).
5953
 
 
7140
%
5954
7141
\def\cslet#1#2{%
5955
7142
  \expandafter\let
5956
7143
  \csname#1\expandafter\endcsname
5976
7163
 
5977
7164
% Macro bodies are absorbed as an argument in a context where
5978
7165
% all characters are catcode 10, 11 or 12, except \ which is active
5979
 
% (as in normal texinfo). It is necessary to change the definition of \.
5980
 
 
 
7166
% (as in normal texinfo). It is necessary to change the definition of \
 
7167
% to recognize macro arguments; this is the job of \mbodybackslash.
 
7168
%
 
7169
% Non-ASCII encodings make 8-bit characters active, so un-activate
 
7170
% them to avoid their expansion.  Must do this non-globally, to
 
7171
% confine the change to the current group.
 
7172
%
5981
7173
% It's necessary to have hard CRs when the macro is executed. This is
5982
 
% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
 
7174
% done by making ^^M (\endlinechar) catcode 12 when reading the macro
5983
7175
% body, and then making it the \newlinechar in \scanmacro.
5984
 
 
5985
 
\def\scanctxt{%
 
7176
%
 
7177
\def\scanctxt{% used as subroutine
5986
7178
  \catcode`\"=\other
5987
7179
  \catcode`\+=\other
5988
7180
  \catcode`\<=\other
5992
7184
  \catcode`\_=\other
5993
7185
  \catcode`\|=\other
5994
7186
  \catcode`\~=\other
 
7187
  \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
5995
7188
}
5996
7189
 
5997
 
\def\scanargctxt{%
 
7190
\def\scanargctxt{% used for copying and captions, not macros.
5998
7191
  \scanctxt
5999
7192
  \catcode`\\=\other
6000
7193
  \catcode`\^^M=\other
6001
7194
}
6002
7195
 
6003
 
\def\macrobodyctxt{%
 
7196
\def\macrobodyctxt{% used for @macro definitions
6004
7197
  \scanctxt
6005
7198
  \catcode`\{=\other
6006
7199
  \catcode`\}=\other
6008
7201
  \usembodybackslash
6009
7202
}
6010
7203
 
6011
 
\def\macroargctxt{%
 
7204
\def\macroargctxt{% used when scanning invocations
6012
7205
  \scanctxt
6013
 
  \catcode`\\=\other
 
7206
  \catcode`\\=0
6014
7207
}
 
7208
% why catcode 0 for \ in the above?  To recognize \\ \{ \} as "escapes"
 
7209
% for the single characters \ { }.  Thus, we end up with the "commands"
 
7210
% that would be written @\ @{ @} in a Texinfo document.
 
7211
 
7212
% We already have @{ and @}.  For @\, we define it here, and only for
 
7213
% this purpose, to produce a typewriter backslash (so, the @\ that we
 
7214
% define for @math can't be used with @macro calls):
 
7215
%
 
7216
\def\\{\normalbackslash}%
 
7217
 
7218
% We would like to do this for \, too, since that is what makeinfo does.
 
7219
% But it is not possible, because Texinfo already has a command @, for a
 
7220
% cedilla accent.  Documents must use @comma{} instead.
 
7221
%
 
7222
% \anythingelse will almost certainly be an error of some kind.
 
7223
 
6015
7224
 
6016
7225
% \mbodybackslash is the definition of \ in @macro bodies.
6017
7226
% It maps \foo\ => \csname macarg.foo\endcsname => #N
6018
7227
% where N is the macro parameter number.
6019
7228
% We define \csname macarg.\endcsname to be \realbackslash, so
6020
7229
% \\ in macro replacement text gets you a backslash.
6021
 
 
 
7230
%
6022
7231
{\catcode`@=0 @catcode`@\=@active
6023
7232
 @gdef@usembodybackslash{@let\=@mbodybackslash}
6024
7233
 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
6025
7234
}
6026
7235
\expandafter\def\csname macarg.\endcsname{\realbackslash}
6027
7236
 
 
7237
\def\margbackslash#1{\char`\#1 }
 
7238
 
6028
7239
\def\macro{\recursivefalse\parsearg\macroxxx}
6029
7240
\def\rmacro{\recursivetrue\parsearg\macroxxx}
6030
7241
 
6031
7242
\def\macroxxx#1{%
6032
 
  \getargs{#1}%           now \macname is the macname and \argl the arglist
 
7243
  \getargs{#1}% now \macname is the macname and \argl the arglist
6033
7244
  \ifx\argl\empty       % no arguments
6034
 
     \paramno=0%
 
7245
     \paramno=0
6035
7246
  \else
6036
7247
     \expandafter\parsemargdef \argl;%
6037
7248
  \fi
6080
7291
% an opening brace, and that opening brace is not consumed.
6081
7292
\def\getargs#1{\getargsxxx#1{}}
6082
7293
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
6083
 
\def\getmacname #1 #2\relax{\macname={#1}}
 
7294
\def\getmacname#1 #2\relax{\macname={#1}}
6084
7295
\def\getmacargs#1{\def\argl{#1}}
6085
7296
 
6086
7297
% Parse the optional {params} list.  Set up \paramno and \paramlist
6087
7298
% so \defmacro knows what to do.  Define \macarg.blah for each blah
6088
 
% in the params list, to be ##N where N is the position in that list.
 
7299
% in the params list to be ##N where N is the position in that list.
6089
7300
% That gets used by \mbodybackslash (above).
6090
 
 
 
7301
%
6091
7302
% We need to get `macro parameter char #' into several definitions.
6092
 
% The technique used is stolen from LaTeX:  let \hash be something
 
7303
% The technique used is stolen from LaTeX: let \hash be something
6093
7304
% unexpandable, insert that wherever you need a #, and then redefine
6094
7305
% it to # just before using the token list produced.
6095
7306
%
6096
7307
% The same technique is used to protect \eatspaces till just before
6097
7308
% the macro is used.
6098
7309
 
6099
 
\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
6100
 
        \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
 
7310
\def\parsemargdef#1;{%
 
7311
  \paramno=0\def\paramlist{}%
 
7312
  \let\hash\relax
 
7313
  \let\xeatspaces\relax
 
7314
  \parsemargdefxxx#1,;,%
 
7315
}
6101
7316
\def\parsemargdefxxx#1,{%
6102
7317
  \if#1;\let\next=\relax
6103
7318
  \else \let\next=\parsemargdefxxx
6104
 
    \advance\paramno by 1%
 
7319
    \advance\paramno by 1
6105
7320
    \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
6106
7321
        {\xeatspaces{\hash\the\paramno}}%
6107
7322
    \edef\paramlist{\paramlist\hash\the\paramno,}%
6109
7324
 
6110
7325
% These two commands read recursive and nonrecursive macro bodies.
6111
7326
% (They're different since rec and nonrec macros end differently.)
6112
 
 
 
7327
%
6113
7328
\long\def\parsemacbody#1@end macro%
6114
7329
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
6115
7330
\long\def\parsermacbody#1@end rmacro%
6120
7335
% Much magic with \expandafter here.
6121
7336
% \xdef is used so that macro definitions will survive the file
6122
7337
% they're defined in; @include reads the file inside a group.
 
7338
%
6123
7339
\def\defmacro{%
6124
7340
  \let\hash=##% convert placeholders to macro parameter chars
6125
7341
  \ifrecursive
6183
7399
% \braceorline decides whether the next nonwhitespace character is a
6184
7400
% {.  If so it reads up to the closing }, if not, it reads the whole
6185
7401
% line.  Whatever was read is then fed to the next control sequence
6186
 
% as an argument (by \parsebrace or \parsearg)
 
7402
% as an argument (by \parsebrace or \parsearg).
 
7403
6187
7404
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
6188
7405
\def\braceorlinexxx{%
6189
7406
  \ifx\nchar\bgroup\else
6193
7410
 
6194
7411
% @alias.
6195
7412
% We need some trickery to remove the optional spaces around the equal
6196
 
% sign.  Just make them active and then expand them all to nothing.
 
7413
% sign.  Make them active and then expand them all to nothing.
 
7414
%
6197
7415
\def\alias{\parseargusing\obeyspaces\aliasxxx}
6198
7416
\def\aliasxxx #1{\aliasyyy#1\relax}
6199
7417
\def\aliasyyy #1=#2\relax{%
6209
7427
\message{cross references,}
6210
7428
 
6211
7429
\newwrite\auxfile
6212
 
 
6213
7430
\newif\ifhavexrefs    % True if xref values are known.
6214
7431
\newif\ifwarnedxrefs  % True if we warned once that they aren't known.
6215
7432
 
6216
7433
% @inforef is relatively simple.
6217
7434
\def\inforef #1{\inforefzzz #1,,,,**}
6218
 
\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
 
7435
\def\inforefzzz #1,#2,#3,#4**{%
 
7436
  \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
6219
7437
  node \samp{\ignorespaces#1{}}}
6220
7438
 
6221
7439
% @node's only job in TeX is to define \lastnode, which is used in
6254
7472
 
6255
7473
% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
6256
7474
% anchor), which consists of three parts:
6257
 
% 1) NAME-title - the current sectioning name taken from \thissection,
 
7475
% 1) NAME-title - the current sectioning name taken from \lastsection,
6258
7476
%                 or the anchor name.
6259
7477
% 2) NAME-snt   - section number and type, passed as the SNT arg, or
6260
7478
%                 empty for anchors.
6273
7491
        \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
6274
7492
          ##1}{##2}}% these are parameters of \writexrdef
6275
7493
      }%
6276
 
      \toks0 = \expandafter{\thissection}%
 
7494
      \toks0 = \expandafter{\lastsection}%
6277
7495
      \immediate \writexrdef{title}{\the\toks0 }%
6278
7496
      \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
6279
 
      \writexrdef{pg}{\folio}% will be written later, during \shipout
 
7497
      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
6280
7498
    }%
6281
7499
  \fi
6282
7500
}
6283
7501
 
 
7502
% @xrefautosectiontitle on|off says whether @section(ing) names are used
 
7503
% automatically in xrefs, if the third arg is not explicitly specified.
 
7504
% This was provided as a "secret" @set xref-automatic-section-title
 
7505
% variable, now it's official.
 
7506
 
7507
\parseargdef\xrefautomaticsectiontitle{%
 
7508
  \def\temp{#1}%
 
7509
  \ifx\temp\onword
 
7510
    \expandafter\let\csname SETxref-automatic-section-title\endcsname
 
7511
      = \empty
 
7512
  \else\ifx\temp\offword
 
7513
    \expandafter\let\csname SETxref-automatic-section-title\endcsname
 
7514
      = \relax
 
7515
  \else
 
7516
    \errhelp = \EMsimple
 
7517
    \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
 
7518
                must be on|off}%
 
7519
  \fi\fi
 
7520
}
 
7521
 
 
7522
 
6284
7523
% @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
6285
7524
% the node name, #2 the name of the Info cross-reference, #3 the printed
6286
7525
% node name, #4 the name of the Info file, #5 the name of the printed
6297
7536
  \setbox0=\hbox{\printedrefname\unskip}%
6298
7537
  \ifdim \wd0 = 0pt
6299
7538
    % No printed node name was explicitly given.
6300
 
    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
 
7539
    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
6301
7540
      % Use the node name inside the square brackets.
6302
7541
      \def\printedrefname{\ignorespaces #1}%
6303
7542
    \else
6320
7559
  %
6321
7560
  % Make link in pdf output.
6322
7561
  \ifpdf
6323
 
    \leavevmode
6324
 
    \getfilename{#4}%
6325
 
    {\turnoffactive
 
7562
    {\indexnofonts
 
7563
     \turnoffactive
 
7564
     % This expands tokens, so do it after making catcode changes, so _
 
7565
     % etc. don't get their TeX definitions.
 
7566
     \getfilename{#4}%
 
7567
     %
6326
7568
     % See comments at \activebackslashdouble.
6327
7569
     {\activebackslashdouble \xdef\pdfxrefdest{#1}%
6328
7570
      \backslashparens\pdfxrefdest}%
6329
7571
     %
 
7572
     \leavevmode
 
7573
     \startlink attr{/Border [0 0 0]}%
6330
7574
     \ifnum\filenamelength>0
6331
 
       \startlink attr{/Border [0 0 0]}%
6332
 
         goto file{\the\filename.pdf} name{\pdfxrefdest}%
 
7575
       goto file{\the\filename.pdf} name{\pdfxrefdest}%
6333
7576
     \else
6334
 
       \startlink attr{/Border [0 0 0]}%
6335
 
         goto name{\pdfmkpgn{\pdfxrefdest}}%
 
7577
       goto name{\pdfmkpgn{\pdfxrefdest}}%
6336
7578
     \fi
6337
7579
    }%
6338
 
    \linkcolor
 
7580
    \setcolor{\linkcolor}%
6339
7581
  \fi
6340
7582
  %
6341
7583
  % Float references are printed completely differently: "Figure 1.2"
6373
7615
    % is a loss.  Therefore, we give the text of the node name again, so it
6374
7616
    % is as if TeX is seeing it for the first time.
6375
7617
    \ifdim \wd1 > 0pt
6376
 
      \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
 
7618
      \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
6377
7619
    \else
6378
7620
      % _ (for example) has to be the character _ for the purposes of the
6379
7621
      % control sequence corresponding to the node, but it has to expand
6449
7691
    \angleleft un\-de\-fined\angleright
6450
7692
    \iflinks
6451
7693
      \ifhavexrefs
6452
 
        \message{\linenumber Undefined cross reference `#1'.}%
 
7694
        {\toks0 = {#1}% avoid expansion of possibly-complex value
 
7695
         \message{\linenumber Undefined cross reference `\the\toks0'.}}%
6453
7696
      \else
6454
7697
        \ifwarnedxrefs\else
6455
7698
          \global\warnedxrefstrue
6469
7712
% collisions).  But if this is a float type, we have more work to do.
6470
7713
%
6471
7714
\def\xrdef#1#2{%
6472
 
  \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value.
 
7715
  {% The node name might contain 8-bit characters, which in our current
 
7716
   % implementation are changed to commands like @'e.  Don't let these
 
7717
   % mess up the control sequence name.
 
7718
    \indexnofonts
 
7719
    \turnoffactive
 
7720
    \xdef\safexrefname{#1}%
 
7721
  }%
 
7722
  %
 
7723
  \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
6473
7724
  %
6474
7725
  % Was that xref control sequence that we just defined for a float?
6475
 
  \expandafter\iffloat\csname XR#1\endcsname
 
7726
  \expandafter\iffloat\csname XR\safexrefname\endcsname
6476
7727
    % it was a float, and we have the (safe) float type in \iffloattype.
6477
7728
    \expandafter\let\expandafter\floatlist
6478
7729
      \csname floatlist\iffloattype\endcsname
6487
7738
    %
6488
7739
    % Remember this xref in the control sequence \floatlistFLOATTYPE,
6489
7740
    % for later use in \listoffloats.
6490
 
    \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}%
 
7741
    \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
 
7742
      {\safexrefname}}%
6491
7743
  \fi
6492
7744
}
6493
7745
 
6591
7843
  \input\jobname.#1
6592
7844
\endgroup}
6593
7845
 
 
7846
 
6594
7847
\message{insertions,}
6595
7848
% including footnotes.
6596
7849
 
6673
7926
% In case a @footnote appears in a vbox, save the footnote text and create
6674
7927
% the real \insert just after the vbox finished.  Otherwise, the insertion
6675
7928
% would be lost.
6676
 
% Similarily, if a @footnote appears inside an alignment, save the footnote
 
7929
% Similarly, if a @footnote appears inside an alignment, save the footnote
6677
7930
% text to a box and make the \insert when a row of the table is finished.
6678
7931
% And the same can be done for other insert classes.  --kasal, 16nov03.
6679
7932
 
6753
8006
  it from ftp://tug.org/tex/epsf.tex.}
6754
8007
%
6755
8008
\def\image#1{%
6756
 
  \ifx\epsfbox\undefined
 
8009
  \ifx\epsfbox\thisiundefined
6757
8010
    \ifwarnednoepsf \else
6758
8011
      \errhelp = \noepsfhelp
6759
8012
      \errmessage{epsf.tex not found, images will be ignored}%
6769
8022
% #2 is (optional) width, #3 is (optional) height.
6770
8023
% #4 is (ignored optional) html alt text.
6771
8024
% #5 is (ignored optional) extension.
6772
 
% #6 is just the usual extra ignored arg for parsing this stuff.
 
8025
% #6 is just the usual extra ignored arg for parsing stuff.
6773
8026
\newif\ifimagevmode
6774
8027
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
6775
8028
  \catcode`\^^M = 5     % in case we're inside an example
6777
8030
  % If the image is by itself, center it.
6778
8031
  \ifvmode
6779
8032
    \imagevmodetrue
6780
 
    \nobreak\bigskip
 
8033
    \nobreak\medskip
6781
8034
    % Usually we'll have text after the image which will insert
6782
8035
    % \parskip glue, so insert it here too to equalize the space
6783
8036
    % above and below.
6784
8037
    \nobreak\vskip\parskip
6785
8038
    \nobreak
6786
 
    \line\bgroup
6787
8039
  \fi
6788
8040
  %
 
8041
  % Leave vertical mode so that indentation from an enclosing
 
8042
  % environment such as @quotation is respected.  On the other hand, if
 
8043
  % it's at the top level, we don't want the normal paragraph indentation.
 
8044
  \noindent
 
8045
  %
6789
8046
  % Output the image.
6790
8047
  \ifpdf
6791
8048
    \dopdfimage{#1}{#2}{#3}%
6796
8053
    \epsfbox{#1.eps}%
6797
8054
  \fi
6798
8055
  %
6799
 
  \ifimagevmode \egroup \bigbreak \fi  % space after the image
 
8056
  \ifimagevmode \medskip \fi  % space after the standalone image
6800
8057
\endgroup}
6801
8058
 
6802
8059
 
6863
8120
      \global\advance\floatno by 1
6864
8121
      %
6865
8122
      {%
6866
 
        % This magic value for \thissection is output by \setref as the
 
8123
        % This magic value for \lastsection is output by \setref as the
6867
8124
        % XREFLABEL-title value.  \xrefX uses it to distinguish float
6868
8125
        % labels (which have a completely different output format) from
6869
8126
        % node and anchor labels.  And \xrdef uses it to construct the
6870
8127
        % lists of floats.
6871
8128
        %
6872
 
        \edef\thissection{\floatmagic=\safefloattype}%
 
8129
        \edef\lastsection{\floatmagic=\safefloattype}%
6873
8130
        \setref{\floatlabel}{Yfloat}%
6874
8131
      }%
6875
8132
    \fi
7004
8261
 
7005
8262
% #1 is the control sequence we are passed; we expand into a conditional
7006
8263
% which is true if #1 represents a float ref.  That is, the magic
7007
 
% \thissection value which we \setref above.
 
8264
% \lastsection value which we \setref above.
7008
8265
%
7009
8266
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
7010
8267
%
7065
8322
  \writeentry
7066
8323
}}
7067
8324
 
 
8325
 
7068
8326
\message{localization,}
7069
 
% and i18n.
7070
8327
 
7071
 
% @documentlanguage is usually given very early, just after
7072
 
% @setfilename.  If done too late, it may not override everything
7073
 
% properly.  Single argument is the language abbreviation.
7074
 
% It would be nice if we could set up a hyphenation file here.
 
8328
% For single-language documents, @documentlanguage is usually given very
 
8329
% early, just after @documentencoding.  Single argument is the language
 
8330
% (de) or locale (de_DE) abbreviation.
7075
8331
%
7076
 
\parseargdef\documentlanguage{%
 
8332
{
 
8333
  \catcode`\_ = \active
 
8334
  \globaldefs=1
 
8335
\parseargdef\documentlanguage{\begingroup
 
8336
  \let_=\normalunderscore  % normal _ character for filenames
7077
8337
  \tex % read txi-??.tex file in plain TeX.
7078
 
    % Read the file if it exists.
 
8338
    % Read the file by the name they passed if it exists.
7079
8339
    \openin 1 txi-#1.tex
7080
8340
    \ifeof 1
7081
 
      \errhelp = \nolanghelp
7082
 
      \errmessage{Cannot read language file txi-#1.tex}%
 
8341
      \documentlanguagetrywithoutunderscore{#1_\finish}%
7083
8342
    \else
 
8343
      \globaldefs = 1  % everything in the txi-LL files needs to persist
7084
8344
      \input txi-#1.tex
7085
8345
    \fi
7086
8346
    \closein 1
7087
 
  \endgroup
 
8347
  \endgroup % end raw TeX
 
8348
\endgroup}
 
8349
%
 
8350
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
 
8351
% try txi-de.tex.
 
8352
%
 
8353
\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
 
8354
  \openin 1 txi-#1.tex
 
8355
  \ifeof 1
 
8356
    \errhelp = \nolanghelp
 
8357
    \errmessage{Cannot read language file txi-#1.tex}%
 
8358
  \else
 
8359
    \globaldefs = 1  % everything in the txi-LL files needs to persist
 
8360
    \input txi-#1.tex
 
8361
  \fi
 
8362
  \closein 1
7088
8363
}
 
8364
}% end of special _ catcode
 
8365
%
7089
8366
\newhelp\nolanghelp{The given language definition file cannot be found or
7090
 
is empty.  Maybe you need to install it?  In the current directory
7091
 
should work if nowhere else does.}
7092
 
 
7093
 
 
7094
 
% @documentencoding should change something in TeX eventually, most
7095
 
% likely, but for now just recognize it.
7096
 
\let\documentencoding = \comment
7097
 
 
7098
 
 
7099
 
% Page size parameters.
7100
 
%
 
8367
is empty.  Maybe you need to install it?  Putting it in the current
 
8368
directory should work if nowhere else does.}
 
8369
 
 
8370
% This macro is called from txi-??.tex files; the first argument is the
 
8371
% \language name to set (without the "\lang@" prefix), the second and
 
8372
% third args are \{left,right}hyphenmin.
 
8373
%
 
8374
% The language names to pass are determined when the format is built.
 
8375
% See the etex.log file created at that time, e.g.,
 
8376
% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
 
8377
%
 
8378
% With TeX Live 2008, etex now includes hyphenation patterns for all
 
8379
% available languages.  This means we can support hyphenation in
 
8380
% Texinfo, at least to some extent.  (This still doesn't solve the
 
8381
% accented characters problem.)
 
8382
%
 
8383
\catcode`@=11
 
8384
\def\txisetlanguage#1#2#3{%
 
8385
  % do not set the language if the name is undefined in the current TeX.
 
8386
  \expandafter\ifx\csname lang@#1\endcsname \relax
 
8387
    \message{no patterns for #1}%
 
8388
  \else
 
8389
    \global\language = \csname lang@#1\endcsname
 
8390
  \fi
 
8391
  % but there is no harm in adjusting the hyphenmin values regardless.
 
8392
  \global\lefthyphenmin = #2\relax
 
8393
  \global\righthyphenmin = #3\relax
 
8394
}
 
8395
 
 
8396
% Helpers for encodings.
 
8397
% Set the catcode of characters 128 through 255 to the specified number.
 
8398
%
 
8399
\def\setnonasciicharscatcode#1{%
 
8400
   \count255=128
 
8401
   \loop\ifnum\count255<256
 
8402
      \global\catcode\count255=#1\relax
 
8403
      \advance\count255 by 1
 
8404
   \repeat
 
8405
}
 
8406
 
 
8407
\def\setnonasciicharscatcodenonglobal#1{%
 
8408
   \count255=128
 
8409
   \loop\ifnum\count255<256
 
8410
      \catcode\count255=#1\relax
 
8411
      \advance\count255 by 1
 
8412
   \repeat
 
8413
}
 
8414
 
 
8415
% @documentencoding sets the definition of non-ASCII characters
 
8416
% according to the specified encoding.
 
8417
%
 
8418
\parseargdef\documentencoding{%
 
8419
  % Encoding being declared for the document.
 
8420
  \def\declaredencoding{\csname #1.enc\endcsname}%
 
8421
  %
 
8422
  % Supported encodings: names converted to tokens in order to be able
 
8423
  % to compare them with \ifx.
 
8424
  \def\ascii{\csname US-ASCII.enc\endcsname}%
 
8425
  \def\latnine{\csname ISO-8859-15.enc\endcsname}%
 
8426
  \def\latone{\csname ISO-8859-1.enc\endcsname}%
 
8427
  \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
 
8428
  \def\utfeight{\csname UTF-8.enc\endcsname}%
 
8429
  %
 
8430
  \ifx \declaredencoding \ascii
 
8431
     \asciichardefs
 
8432
  %
 
8433
  \else \ifx \declaredencoding \lattwo
 
8434
     \setnonasciicharscatcode\active
 
8435
     \lattwochardefs
 
8436
  %
 
8437
  \else \ifx \declaredencoding \latone
 
8438
     \setnonasciicharscatcode\active
 
8439
     \latonechardefs
 
8440
  %
 
8441
  \else \ifx \declaredencoding \latnine
 
8442
     \setnonasciicharscatcode\active
 
8443
     \latninechardefs
 
8444
  %
 
8445
  \else \ifx \declaredencoding \utfeight
 
8446
     \setnonasciicharscatcode\active
 
8447
     \utfeightchardefs
 
8448
  %
 
8449
  \else
 
8450
    \message{Unknown document encoding #1, ignoring.}%
 
8451
  %
 
8452
  \fi % utfeight
 
8453
  \fi % latnine
 
8454
  \fi % latone
 
8455
  \fi % lattwo
 
8456
  \fi % ascii
 
8457
}
 
8458
 
 
8459
% A message to be logged when using a character that isn't available
 
8460
% the default font encoding (OT1).
 
8461
%
 
8462
\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
 
8463
 
 
8464
% Take account of \c (plain) vs. \, (Texinfo) difference.
 
8465
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
 
8466
 
 
8467
% First, make active non-ASCII characters in order for them to be
 
8468
% correctly categorized when TeX reads the replacement text of
 
8469
% macros containing the character definitions.
 
8470
\setnonasciicharscatcode\active
 
8471
%
 
8472
% Latin1 (ISO-8859-1) character definitions.
 
8473
\def\latonechardefs{%
 
8474
  \gdef^^a0{\tie}
 
8475
  \gdef^^a1{\exclamdown}
 
8476
  \gdef^^a2{\missingcharmsg{CENT SIGN}}
 
8477
  \gdef^^a3{{\pounds}}
 
8478
  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
 
8479
  \gdef^^a5{\missingcharmsg{YEN SIGN}}
 
8480
  \gdef^^a6{\missingcharmsg{BROKEN BAR}}
 
8481
  \gdef^^a7{\S}
 
8482
  \gdef^^a8{\"{}}
 
8483
  \gdef^^a9{\copyright}
 
8484
  \gdef^^aa{\ordf}
 
8485
  \gdef^^ab{\guillemetleft}
 
8486
  \gdef^^ac{$\lnot$}
 
8487
  \gdef^^ad{\-}
 
8488
  \gdef^^ae{\registeredsymbol}
 
8489
  \gdef^^af{\={}}
 
8490
  %
 
8491
  \gdef^^b0{\textdegree}
 
8492
  \gdef^^b1{$\pm$}
 
8493
  \gdef^^b2{$^2$}
 
8494
  \gdef^^b3{$^3$}
 
8495
  \gdef^^b4{\'{}}
 
8496
  \gdef^^b5{$\mu$}
 
8497
  \gdef^^b6{\P}
 
8498
  %
 
8499
  \gdef^^b7{$^.$}
 
8500
  \gdef^^b8{\cedilla\ }
 
8501
  \gdef^^b9{$^1$}
 
8502
  \gdef^^ba{\ordm}
 
8503
  %
 
8504
  \gdef^^bb{\guillemetright}
 
8505
  \gdef^^bc{$1\over4$}
 
8506
  \gdef^^bd{$1\over2$}
 
8507
  \gdef^^be{$3\over4$}
 
8508
  \gdef^^bf{\questiondown}
 
8509
  %
 
8510
  \gdef^^c0{\`A}
 
8511
  \gdef^^c1{\'A}
 
8512
  \gdef^^c2{\^A}
 
8513
  \gdef^^c3{\~A}
 
8514
  \gdef^^c4{\"A}
 
8515
  \gdef^^c5{\ringaccent A}
 
8516
  \gdef^^c6{\AE}
 
8517
  \gdef^^c7{\cedilla C}
 
8518
  \gdef^^c8{\`E}
 
8519
  \gdef^^c9{\'E}
 
8520
  \gdef^^ca{\^E}
 
8521
  \gdef^^cb{\"E}
 
8522
  \gdef^^cc{\`I}
 
8523
  \gdef^^cd{\'I}
 
8524
  \gdef^^ce{\^I}
 
8525
  \gdef^^cf{\"I}
 
8526
  %
 
8527
  \gdef^^d0{\DH}
 
8528
  \gdef^^d1{\~N}
 
8529
  \gdef^^d2{\`O}
 
8530
  \gdef^^d3{\'O}
 
8531
  \gdef^^d4{\^O}
 
8532
  \gdef^^d5{\~O}
 
8533
  \gdef^^d6{\"O}
 
8534
  \gdef^^d7{$\times$}
 
8535
  \gdef^^d8{\O}
 
8536
  \gdef^^d9{\`U}
 
8537
  \gdef^^da{\'U}
 
8538
  \gdef^^db{\^U}
 
8539
  \gdef^^dc{\"U}
 
8540
  \gdef^^dd{\'Y}
 
8541
  \gdef^^de{\TH}
 
8542
  \gdef^^df{\ss}
 
8543
  %
 
8544
  \gdef^^e0{\`a}
 
8545
  \gdef^^e1{\'a}
 
8546
  \gdef^^e2{\^a}
 
8547
  \gdef^^e3{\~a}
 
8548
  \gdef^^e4{\"a}
 
8549
  \gdef^^e5{\ringaccent a}
 
8550
  \gdef^^e6{\ae}
 
8551
  \gdef^^e7{\cedilla c}
 
8552
  \gdef^^e8{\`e}
 
8553
  \gdef^^e9{\'e}
 
8554
  \gdef^^ea{\^e}
 
8555
  \gdef^^eb{\"e}
 
8556
  \gdef^^ec{\`{\dotless i}}
 
8557
  \gdef^^ed{\'{\dotless i}}
 
8558
  \gdef^^ee{\^{\dotless i}}
 
8559
  \gdef^^ef{\"{\dotless i}}
 
8560
  %
 
8561
  \gdef^^f0{\dh}
 
8562
  \gdef^^f1{\~n}
 
8563
  \gdef^^f2{\`o}
 
8564
  \gdef^^f3{\'o}
 
8565
  \gdef^^f4{\^o}
 
8566
  \gdef^^f5{\~o}
 
8567
  \gdef^^f6{\"o}
 
8568
  \gdef^^f7{$\div$}
 
8569
  \gdef^^f8{\o}
 
8570
  \gdef^^f9{\`u}
 
8571
  \gdef^^fa{\'u}
 
8572
  \gdef^^fb{\^u}
 
8573
  \gdef^^fc{\"u}
 
8574
  \gdef^^fd{\'y}
 
8575
  \gdef^^fe{\th}
 
8576
  \gdef^^ff{\"y}
 
8577
}
 
8578
 
 
8579
% Latin9 (ISO-8859-15) encoding character definitions.
 
8580
\def\latninechardefs{%
 
8581
  % Encoding is almost identical to Latin1.
 
8582
  \latonechardefs
 
8583
  %
 
8584
  \gdef^^a4{\euro}
 
8585
  \gdef^^a6{\v S}
 
8586
  \gdef^^a8{\v s}
 
8587
  \gdef^^b4{\v Z}
 
8588
  \gdef^^b8{\v z}
 
8589
  \gdef^^bc{\OE}
 
8590
  \gdef^^bd{\oe}
 
8591
  \gdef^^be{\"Y}
 
8592
}
 
8593
 
 
8594
% Latin2 (ISO-8859-2) character definitions.
 
8595
\def\lattwochardefs{%
 
8596
  \gdef^^a0{\tie}
 
8597
  \gdef^^a1{\ogonek{A}}
 
8598
  \gdef^^a2{\u{}}
 
8599
  \gdef^^a3{\L}
 
8600
  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
 
8601
  \gdef^^a5{\v L}
 
8602
  \gdef^^a6{\'S}
 
8603
  \gdef^^a7{\S}
 
8604
  \gdef^^a8{\"{}}
 
8605
  \gdef^^a9{\v S}
 
8606
  \gdef^^aa{\cedilla S}
 
8607
  \gdef^^ab{\v T}
 
8608
  \gdef^^ac{\'Z}
 
8609
  \gdef^^ad{\-}
 
8610
  \gdef^^ae{\v Z}
 
8611
  \gdef^^af{\dotaccent Z}
 
8612
  %
 
8613
  \gdef^^b0{\textdegree}
 
8614
  \gdef^^b1{\ogonek{a}}
 
8615
  \gdef^^b2{\ogonek{ }}
 
8616
  \gdef^^b3{\l}
 
8617
  \gdef^^b4{\'{}}
 
8618
  \gdef^^b5{\v l}
 
8619
  \gdef^^b6{\'s}
 
8620
  \gdef^^b7{\v{}}
 
8621
  \gdef^^b8{\cedilla\ }
 
8622
  \gdef^^b9{\v s}
 
8623
  \gdef^^ba{\cedilla s}
 
8624
  \gdef^^bb{\v t}
 
8625
  \gdef^^bc{\'z}
 
8626
  \gdef^^bd{\H{}}
 
8627
  \gdef^^be{\v z}
 
8628
  \gdef^^bf{\dotaccent z}
 
8629
  %
 
8630
  \gdef^^c0{\'R}
 
8631
  \gdef^^c1{\'A}
 
8632
  \gdef^^c2{\^A}
 
8633
  \gdef^^c3{\u A}
 
8634
  \gdef^^c4{\"A}
 
8635
  \gdef^^c5{\'L}
 
8636
  \gdef^^c6{\'C}
 
8637
  \gdef^^c7{\cedilla C}
 
8638
  \gdef^^c8{\v C}
 
8639
  \gdef^^c9{\'E}
 
8640
  \gdef^^ca{\ogonek{E}}
 
8641
  \gdef^^cb{\"E}
 
8642
  \gdef^^cc{\v E}
 
8643
  \gdef^^cd{\'I}
 
8644
  \gdef^^ce{\^I}
 
8645
  \gdef^^cf{\v D}
 
8646
  %
 
8647
  \gdef^^d0{\DH}
 
8648
  \gdef^^d1{\'N}
 
8649
  \gdef^^d2{\v N}
 
8650
  \gdef^^d3{\'O}
 
8651
  \gdef^^d4{\^O}
 
8652
  \gdef^^d5{\H O}
 
8653
  \gdef^^d6{\"O}
 
8654
  \gdef^^d7{$\times$}
 
8655
  \gdef^^d8{\v R}
 
8656
  \gdef^^d9{\ringaccent U}
 
8657
  \gdef^^da{\'U}
 
8658
  \gdef^^db{\H U}
 
8659
  \gdef^^dc{\"U}
 
8660
  \gdef^^dd{\'Y}
 
8661
  \gdef^^de{\cedilla T}
 
8662
  \gdef^^df{\ss}
 
8663
  %
 
8664
  \gdef^^e0{\'r}
 
8665
  \gdef^^e1{\'a}
 
8666
  \gdef^^e2{\^a}
 
8667
  \gdef^^e3{\u a}
 
8668
  \gdef^^e4{\"a}
 
8669
  \gdef^^e5{\'l}
 
8670
  \gdef^^e6{\'c}
 
8671
  \gdef^^e7{\cedilla c}
 
8672
  \gdef^^e8{\v c}
 
8673
  \gdef^^e9{\'e}
 
8674
  \gdef^^ea{\ogonek{e}}
 
8675
  \gdef^^eb{\"e}
 
8676
  \gdef^^ec{\v e}
 
8677
  \gdef^^ed{\'{\dotless{i}}}
 
8678
  \gdef^^ee{\^{\dotless{i}}}
 
8679
  \gdef^^ef{\v d}
 
8680
  %
 
8681
  \gdef^^f0{\dh}
 
8682
  \gdef^^f1{\'n}
 
8683
  \gdef^^f2{\v n}
 
8684
  \gdef^^f3{\'o}
 
8685
  \gdef^^f4{\^o}
 
8686
  \gdef^^f5{\H o}
 
8687
  \gdef^^f6{\"o}
 
8688
  \gdef^^f7{$\div$}
 
8689
  \gdef^^f8{\v r}
 
8690
  \gdef^^f9{\ringaccent u}
 
8691
  \gdef^^fa{\'u}
 
8692
  \gdef^^fb{\H u}
 
8693
  \gdef^^fc{\"u}
 
8694
  \gdef^^fd{\'y}
 
8695
  \gdef^^fe{\cedilla t}
 
8696
  \gdef^^ff{\dotaccent{}}
 
8697
}
 
8698
 
 
8699
% UTF-8 character definitions.
 
8700
%
 
8701
% This code to support UTF-8 is based on LaTeX's utf8.def, with some
 
8702
% changes for Texinfo conventions.  It is included here under the GPL by
 
8703
% permission from Frank Mittelbach and the LaTeX team.
 
8704
%
 
8705
\newcount\countUTFx
 
8706
\newcount\countUTFy
 
8707
\newcount\countUTFz
 
8708
 
 
8709
\gdef\UTFviiiTwoOctets#1#2{\expandafter
 
8710
   \UTFviiiDefined\csname u8:#1\string #2\endcsname}
 
8711
%
 
8712
\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
 
8713
   \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
 
8714
%
 
8715
\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
 
8716
   \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
 
8717
 
 
8718
\gdef\UTFviiiDefined#1{%
 
8719
  \ifx #1\relax
 
8720
    \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
 
8721
  \else
 
8722
    \expandafter #1%
 
8723
  \fi
 
8724
}
 
8725
 
 
8726
\begingroup
 
8727
  \catcode`\~13
 
8728
  \catcode`\"12
 
8729
 
 
8730
  \def\UTFviiiLoop{%
 
8731
    \global\catcode\countUTFx\active
 
8732
    \uccode`\~\countUTFx
 
8733
    \uppercase\expandafter{\UTFviiiTmp}%
 
8734
    \advance\countUTFx by 1
 
8735
    \ifnum\countUTFx < \countUTFy
 
8736
      \expandafter\UTFviiiLoop
 
8737
    \fi}
 
8738
 
 
8739
  \countUTFx = "C2
 
8740
  \countUTFy = "E0
 
8741
  \def\UTFviiiTmp{%
 
8742
    \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
 
8743
  \UTFviiiLoop
 
8744
 
 
8745
  \countUTFx = "E0
 
8746
  \countUTFy = "F0
 
8747
  \def\UTFviiiTmp{%
 
8748
    \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
 
8749
  \UTFviiiLoop
 
8750
 
 
8751
  \countUTFx = "F0
 
8752
  \countUTFy = "F4
 
8753
  \def\UTFviiiTmp{%
 
8754
    \xdef~{\noexpand\UTFviiiFourOctets\string~}}
 
8755
  \UTFviiiLoop
 
8756
\endgroup
 
8757
 
 
8758
\begingroup
 
8759
  \catcode`\"=12
 
8760
  \catcode`\<=12
 
8761
  \catcode`\.=12
 
8762
  \catcode`\,=12
 
8763
  \catcode`\;=12
 
8764
  \catcode`\!=12
 
8765
  \catcode`\~=13
 
8766
 
 
8767
  \gdef\DeclareUnicodeCharacter#1#2{%
 
8768
    \countUTFz = "#1\relax
 
8769
    %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
 
8770
    \begingroup
 
8771
      \parseXMLCharref
 
8772
      \def\UTFviiiTwoOctets##1##2{%
 
8773
        \csname u8:##1\string ##2\endcsname}%
 
8774
      \def\UTFviiiThreeOctets##1##2##3{%
 
8775
        \csname u8:##1\string ##2\string ##3\endcsname}%
 
8776
      \def\UTFviiiFourOctets##1##2##3##4{%
 
8777
        \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
 
8778
      \expandafter\expandafter\expandafter\expandafter
 
8779
       \expandafter\expandafter\expandafter
 
8780
       \gdef\UTFviiiTmp{#2}%
 
8781
    \endgroup}
 
8782
 
 
8783
  \gdef\parseXMLCharref{%
 
8784
    \ifnum\countUTFz < "A0\relax
 
8785
      \errhelp = \EMsimple
 
8786
      \errmessage{Cannot define Unicode char value < 00A0}%
 
8787
    \else\ifnum\countUTFz < "800\relax
 
8788
      \parseUTFviiiA,%
 
8789
      \parseUTFviiiB C\UTFviiiTwoOctets.,%
 
8790
    \else\ifnum\countUTFz < "10000\relax
 
8791
      \parseUTFviiiA;%
 
8792
      \parseUTFviiiA,%
 
8793
      \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
 
8794
    \else
 
8795
      \parseUTFviiiA;%
 
8796
      \parseUTFviiiA,%
 
8797
      \parseUTFviiiA!%
 
8798
      \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
 
8799
    \fi\fi\fi
 
8800
  }
 
8801
 
 
8802
  \gdef\parseUTFviiiA#1{%
 
8803
    \countUTFx = \countUTFz
 
8804
    \divide\countUTFz by 64
 
8805
    \countUTFy = \countUTFz
 
8806
    \multiply\countUTFz by 64
 
8807
    \advance\countUTFx by -\countUTFz
 
8808
    \advance\countUTFx by 128
 
8809
    \uccode `#1\countUTFx
 
8810
    \countUTFz = \countUTFy}
 
8811
 
 
8812
  \gdef\parseUTFviiiB#1#2#3#4{%
 
8813
    \advance\countUTFz by "#10\relax
 
8814
    \uccode `#3\countUTFz
 
8815
    \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
 
8816
\endgroup
 
8817
 
 
8818
\def\utfeightchardefs{%
 
8819
  \DeclareUnicodeCharacter{00A0}{\tie}
 
8820
  \DeclareUnicodeCharacter{00A1}{\exclamdown}
 
8821
  \DeclareUnicodeCharacter{00A3}{\pounds}
 
8822
  \DeclareUnicodeCharacter{00A8}{\"{ }}
 
8823
  \DeclareUnicodeCharacter{00A9}{\copyright}
 
8824
  \DeclareUnicodeCharacter{00AA}{\ordf}
 
8825
  \DeclareUnicodeCharacter{00AB}{\guillemetleft}
 
8826
  \DeclareUnicodeCharacter{00AD}{\-}
 
8827
  \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
 
8828
  \DeclareUnicodeCharacter{00AF}{\={ }}
 
8829
 
 
8830
  \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
 
8831
  \DeclareUnicodeCharacter{00B4}{\'{ }}
 
8832
  \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
 
8833
  \DeclareUnicodeCharacter{00BA}{\ordm}
 
8834
  \DeclareUnicodeCharacter{00BB}{\guillemetright}
 
8835
  \DeclareUnicodeCharacter{00BF}{\questiondown}
 
8836
 
 
8837
  \DeclareUnicodeCharacter{00C0}{\`A}
 
8838
  \DeclareUnicodeCharacter{00C1}{\'A}
 
8839
  \DeclareUnicodeCharacter{00C2}{\^A}
 
8840
  \DeclareUnicodeCharacter{00C3}{\~A}
 
8841
  \DeclareUnicodeCharacter{00C4}{\"A}
 
8842
  \DeclareUnicodeCharacter{00C5}{\AA}
 
8843
  \DeclareUnicodeCharacter{00C6}{\AE}
 
8844
  \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
 
8845
  \DeclareUnicodeCharacter{00C8}{\`E}
 
8846
  \DeclareUnicodeCharacter{00C9}{\'E}
 
8847
  \DeclareUnicodeCharacter{00CA}{\^E}
 
8848
  \DeclareUnicodeCharacter{00CB}{\"E}
 
8849
  \DeclareUnicodeCharacter{00CC}{\`I}
 
8850
  \DeclareUnicodeCharacter{00CD}{\'I}
 
8851
  \DeclareUnicodeCharacter{00CE}{\^I}
 
8852
  \DeclareUnicodeCharacter{00CF}{\"I}
 
8853
 
 
8854
  \DeclareUnicodeCharacter{00D0}{\DH}
 
8855
  \DeclareUnicodeCharacter{00D1}{\~N}
 
8856
  \DeclareUnicodeCharacter{00D2}{\`O}
 
8857
  \DeclareUnicodeCharacter{00D3}{\'O}
 
8858
  \DeclareUnicodeCharacter{00D4}{\^O}
 
8859
  \DeclareUnicodeCharacter{00D5}{\~O}
 
8860
  \DeclareUnicodeCharacter{00D6}{\"O}
 
8861
  \DeclareUnicodeCharacter{00D8}{\O}
 
8862
  \DeclareUnicodeCharacter{00D9}{\`U}
 
8863
  \DeclareUnicodeCharacter{00DA}{\'U}
 
8864
  \DeclareUnicodeCharacter{00DB}{\^U}
 
8865
  \DeclareUnicodeCharacter{00DC}{\"U}
 
8866
  \DeclareUnicodeCharacter{00DD}{\'Y}
 
8867
  \DeclareUnicodeCharacter{00DE}{\TH}
 
8868
  \DeclareUnicodeCharacter{00DF}{\ss}
 
8869
 
 
8870
  \DeclareUnicodeCharacter{00E0}{\`a}
 
8871
  \DeclareUnicodeCharacter{00E1}{\'a}
 
8872
  \DeclareUnicodeCharacter{00E2}{\^a}
 
8873
  \DeclareUnicodeCharacter{00E3}{\~a}
 
8874
  \DeclareUnicodeCharacter{00E4}{\"a}
 
8875
  \DeclareUnicodeCharacter{00E5}{\aa}
 
8876
  \DeclareUnicodeCharacter{00E6}{\ae}
 
8877
  \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
 
8878
  \DeclareUnicodeCharacter{00E8}{\`e}
 
8879
  \DeclareUnicodeCharacter{00E9}{\'e}
 
8880
  \DeclareUnicodeCharacter{00EA}{\^e}
 
8881
  \DeclareUnicodeCharacter{00EB}{\"e}
 
8882
  \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
 
8883
  \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
 
8884
  \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
 
8885
  \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
 
8886
 
 
8887
  \DeclareUnicodeCharacter{00F0}{\dh}
 
8888
  \DeclareUnicodeCharacter{00F1}{\~n}
 
8889
  \DeclareUnicodeCharacter{00F2}{\`o}
 
8890
  \DeclareUnicodeCharacter{00F3}{\'o}
 
8891
  \DeclareUnicodeCharacter{00F4}{\^o}
 
8892
  \DeclareUnicodeCharacter{00F5}{\~o}
 
8893
  \DeclareUnicodeCharacter{00F6}{\"o}
 
8894
  \DeclareUnicodeCharacter{00F8}{\o}
 
8895
  \DeclareUnicodeCharacter{00F9}{\`u}
 
8896
  \DeclareUnicodeCharacter{00FA}{\'u}
 
8897
  \DeclareUnicodeCharacter{00FB}{\^u}
 
8898
  \DeclareUnicodeCharacter{00FC}{\"u}
 
8899
  \DeclareUnicodeCharacter{00FD}{\'y}
 
8900
  \DeclareUnicodeCharacter{00FE}{\th}
 
8901
  \DeclareUnicodeCharacter{00FF}{\"y}
 
8902
 
 
8903
  \DeclareUnicodeCharacter{0100}{\=A}
 
8904
  \DeclareUnicodeCharacter{0101}{\=a}
 
8905
  \DeclareUnicodeCharacter{0102}{\u{A}}
 
8906
  \DeclareUnicodeCharacter{0103}{\u{a}}
 
8907
  \DeclareUnicodeCharacter{0104}{\ogonek{A}}
 
8908
  \DeclareUnicodeCharacter{0105}{\ogonek{a}}
 
8909
  \DeclareUnicodeCharacter{0106}{\'C}
 
8910
  \DeclareUnicodeCharacter{0107}{\'c}
 
8911
  \DeclareUnicodeCharacter{0108}{\^C}
 
8912
  \DeclareUnicodeCharacter{0109}{\^c}
 
8913
  \DeclareUnicodeCharacter{0118}{\ogonek{E}}
 
8914
  \DeclareUnicodeCharacter{0119}{\ogonek{e}}
 
8915
  \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
 
8916
  \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
 
8917
  \DeclareUnicodeCharacter{010C}{\v{C}}
 
8918
  \DeclareUnicodeCharacter{010D}{\v{c}}
 
8919
  \DeclareUnicodeCharacter{010E}{\v{D}}
 
8920
 
 
8921
  \DeclareUnicodeCharacter{0112}{\=E}
 
8922
  \DeclareUnicodeCharacter{0113}{\=e}
 
8923
  \DeclareUnicodeCharacter{0114}{\u{E}}
 
8924
  \DeclareUnicodeCharacter{0115}{\u{e}}
 
8925
  \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
 
8926
  \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
 
8927
  \DeclareUnicodeCharacter{011A}{\v{E}}
 
8928
  \DeclareUnicodeCharacter{011B}{\v{e}}
 
8929
  \DeclareUnicodeCharacter{011C}{\^G}
 
8930
  \DeclareUnicodeCharacter{011D}{\^g}
 
8931
  \DeclareUnicodeCharacter{011E}{\u{G}}
 
8932
  \DeclareUnicodeCharacter{011F}{\u{g}}
 
8933
 
 
8934
  \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
 
8935
  \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
 
8936
  \DeclareUnicodeCharacter{0124}{\^H}
 
8937
  \DeclareUnicodeCharacter{0125}{\^h}
 
8938
  \DeclareUnicodeCharacter{0128}{\~I}
 
8939
  \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
 
8940
  \DeclareUnicodeCharacter{012A}{\=I}
 
8941
  \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
 
8942
  \DeclareUnicodeCharacter{012C}{\u{I}}
 
8943
  \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
 
8944
 
 
8945
  \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
 
8946
  \DeclareUnicodeCharacter{0131}{\dotless{i}}
 
8947
  \DeclareUnicodeCharacter{0132}{IJ}
 
8948
  \DeclareUnicodeCharacter{0133}{ij}
 
8949
  \DeclareUnicodeCharacter{0134}{\^J}
 
8950
  \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
 
8951
  \DeclareUnicodeCharacter{0139}{\'L}
 
8952
  \DeclareUnicodeCharacter{013A}{\'l}
 
8953
 
 
8954
  \DeclareUnicodeCharacter{0141}{\L}
 
8955
  \DeclareUnicodeCharacter{0142}{\l}
 
8956
  \DeclareUnicodeCharacter{0143}{\'N}
 
8957
  \DeclareUnicodeCharacter{0144}{\'n}
 
8958
  \DeclareUnicodeCharacter{0147}{\v{N}}
 
8959
  \DeclareUnicodeCharacter{0148}{\v{n}}
 
8960
  \DeclareUnicodeCharacter{014C}{\=O}
 
8961
  \DeclareUnicodeCharacter{014D}{\=o}
 
8962
  \DeclareUnicodeCharacter{014E}{\u{O}}
 
8963
  \DeclareUnicodeCharacter{014F}{\u{o}}
 
8964
 
 
8965
  \DeclareUnicodeCharacter{0150}{\H{O}}
 
8966
  \DeclareUnicodeCharacter{0151}{\H{o}}
 
8967
  \DeclareUnicodeCharacter{0152}{\OE}
 
8968
  \DeclareUnicodeCharacter{0153}{\oe}
 
8969
  \DeclareUnicodeCharacter{0154}{\'R}
 
8970
  \DeclareUnicodeCharacter{0155}{\'r}
 
8971
  \DeclareUnicodeCharacter{0158}{\v{R}}
 
8972
  \DeclareUnicodeCharacter{0159}{\v{r}}
 
8973
  \DeclareUnicodeCharacter{015A}{\'S}
 
8974
  \DeclareUnicodeCharacter{015B}{\'s}
 
8975
  \DeclareUnicodeCharacter{015C}{\^S}
 
8976
  \DeclareUnicodeCharacter{015D}{\^s}
 
8977
  \DeclareUnicodeCharacter{015E}{\cedilla{S}}
 
8978
  \DeclareUnicodeCharacter{015F}{\cedilla{s}}
 
8979
 
 
8980
  \DeclareUnicodeCharacter{0160}{\v{S}}
 
8981
  \DeclareUnicodeCharacter{0161}{\v{s}}
 
8982
  \DeclareUnicodeCharacter{0162}{\cedilla{t}}
 
8983
  \DeclareUnicodeCharacter{0163}{\cedilla{T}}
 
8984
  \DeclareUnicodeCharacter{0164}{\v{T}}
 
8985
 
 
8986
  \DeclareUnicodeCharacter{0168}{\~U}
 
8987
  \DeclareUnicodeCharacter{0169}{\~u}
 
8988
  \DeclareUnicodeCharacter{016A}{\=U}
 
8989
  \DeclareUnicodeCharacter{016B}{\=u}
 
8990
  \DeclareUnicodeCharacter{016C}{\u{U}}
 
8991
  \DeclareUnicodeCharacter{016D}{\u{u}}
 
8992
  \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
 
8993
  \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
 
8994
 
 
8995
  \DeclareUnicodeCharacter{0170}{\H{U}}
 
8996
  \DeclareUnicodeCharacter{0171}{\H{u}}
 
8997
  \DeclareUnicodeCharacter{0174}{\^W}
 
8998
  \DeclareUnicodeCharacter{0175}{\^w}
 
8999
  \DeclareUnicodeCharacter{0176}{\^Y}
 
9000
  \DeclareUnicodeCharacter{0177}{\^y}
 
9001
  \DeclareUnicodeCharacter{0178}{\"Y}
 
9002
  \DeclareUnicodeCharacter{0179}{\'Z}
 
9003
  \DeclareUnicodeCharacter{017A}{\'z}
 
9004
  \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
 
9005
  \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
 
9006
  \DeclareUnicodeCharacter{017D}{\v{Z}}
 
9007
  \DeclareUnicodeCharacter{017E}{\v{z}}
 
9008
 
 
9009
  \DeclareUnicodeCharacter{01C4}{D\v{Z}}
 
9010
  \DeclareUnicodeCharacter{01C5}{D\v{z}}
 
9011
  \DeclareUnicodeCharacter{01C6}{d\v{z}}
 
9012
  \DeclareUnicodeCharacter{01C7}{LJ}
 
9013
  \DeclareUnicodeCharacter{01C8}{Lj}
 
9014
  \DeclareUnicodeCharacter{01C9}{lj}
 
9015
  \DeclareUnicodeCharacter{01CA}{NJ}
 
9016
  \DeclareUnicodeCharacter{01CB}{Nj}
 
9017
  \DeclareUnicodeCharacter{01CC}{nj}
 
9018
  \DeclareUnicodeCharacter{01CD}{\v{A}}
 
9019
  \DeclareUnicodeCharacter{01CE}{\v{a}}
 
9020
  \DeclareUnicodeCharacter{01CF}{\v{I}}
 
9021
 
 
9022
  \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
 
9023
  \DeclareUnicodeCharacter{01D1}{\v{O}}
 
9024
  \DeclareUnicodeCharacter{01D2}{\v{o}}
 
9025
  \DeclareUnicodeCharacter{01D3}{\v{U}}
 
9026
  \DeclareUnicodeCharacter{01D4}{\v{u}}
 
9027
 
 
9028
  \DeclareUnicodeCharacter{01E2}{\={\AE}}
 
9029
  \DeclareUnicodeCharacter{01E3}{\={\ae}}
 
9030
  \DeclareUnicodeCharacter{01E6}{\v{G}}
 
9031
  \DeclareUnicodeCharacter{01E7}{\v{g}}
 
9032
  \DeclareUnicodeCharacter{01E8}{\v{K}}
 
9033
  \DeclareUnicodeCharacter{01E9}{\v{k}}
 
9034
 
 
9035
  \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
 
9036
  \DeclareUnicodeCharacter{01F1}{DZ}
 
9037
  \DeclareUnicodeCharacter{01F2}{Dz}
 
9038
  \DeclareUnicodeCharacter{01F3}{dz}
 
9039
  \DeclareUnicodeCharacter{01F4}{\'G}
 
9040
  \DeclareUnicodeCharacter{01F5}{\'g}
 
9041
  \DeclareUnicodeCharacter{01F8}{\`N}
 
9042
  \DeclareUnicodeCharacter{01F9}{\`n}
 
9043
  \DeclareUnicodeCharacter{01FC}{\'{\AE}}
 
9044
  \DeclareUnicodeCharacter{01FD}{\'{\ae}}
 
9045
  \DeclareUnicodeCharacter{01FE}{\'{\O}}
 
9046
  \DeclareUnicodeCharacter{01FF}{\'{\o}}
 
9047
 
 
9048
  \DeclareUnicodeCharacter{021E}{\v{H}}
 
9049
  \DeclareUnicodeCharacter{021F}{\v{h}}
 
9050
 
 
9051
  \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
 
9052
  \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
 
9053
  \DeclareUnicodeCharacter{0228}{\cedilla{E}}
 
9054
  \DeclareUnicodeCharacter{0229}{\cedilla{e}}
 
9055
  \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
 
9056
  \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
 
9057
 
 
9058
  \DeclareUnicodeCharacter{0232}{\=Y}
 
9059
  \DeclareUnicodeCharacter{0233}{\=y}
 
9060
  \DeclareUnicodeCharacter{0237}{\dotless{j}}
 
9061
 
 
9062
  \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
 
9063
 
 
9064
  \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
 
9065
  \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
 
9066
  \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
 
9067
  \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
 
9068
  \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
 
9069
  \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
 
9070
  \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
 
9071
  \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
 
9072
  \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
 
9073
  \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
 
9074
  \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
 
9075
  \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
 
9076
 
 
9077
  \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
 
9078
  \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
 
9079
 
 
9080
  \DeclareUnicodeCharacter{1E20}{\=G}
 
9081
  \DeclareUnicodeCharacter{1E21}{\=g}
 
9082
  \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
 
9083
  \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
 
9084
  \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
 
9085
  \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
 
9086
  \DeclareUnicodeCharacter{1E26}{\"H}
 
9087
  \DeclareUnicodeCharacter{1E27}{\"h}
 
9088
 
 
9089
  \DeclareUnicodeCharacter{1E30}{\'K}
 
9090
  \DeclareUnicodeCharacter{1E31}{\'k}
 
9091
  \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
 
9092
  \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
 
9093
  \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
 
9094
  \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
 
9095
  \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
 
9096
  \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
 
9097
  \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
 
9098
  \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
 
9099
  \DeclareUnicodeCharacter{1E3E}{\'M}
 
9100
  \DeclareUnicodeCharacter{1E3F}{\'m}
 
9101
 
 
9102
  \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
 
9103
  \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
 
9104
  \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
 
9105
  \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
 
9106
  \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
 
9107
  \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
 
9108
  \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
 
9109
  \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
 
9110
  \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
 
9111
  \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
 
9112
 
 
9113
  \DeclareUnicodeCharacter{1E54}{\'P}
 
9114
  \DeclareUnicodeCharacter{1E55}{\'p}
 
9115
  \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
 
9116
  \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
 
9117
  \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
 
9118
  \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
 
9119
  \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
 
9120
  \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
 
9121
  \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
 
9122
  \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
 
9123
 
 
9124
  \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
 
9125
  \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
 
9126
  \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
 
9127
  \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
 
9128
  \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
 
9129
  \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
 
9130
  \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
 
9131
  \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
 
9132
  \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
 
9133
  \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
 
9134
 
 
9135
  \DeclareUnicodeCharacter{1E7C}{\~V}
 
9136
  \DeclareUnicodeCharacter{1E7D}{\~v}
 
9137
  \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
 
9138
  \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
 
9139
 
 
9140
  \DeclareUnicodeCharacter{1E80}{\`W}
 
9141
  \DeclareUnicodeCharacter{1E81}{\`w}
 
9142
  \DeclareUnicodeCharacter{1E82}{\'W}
 
9143
  \DeclareUnicodeCharacter{1E83}{\'w}
 
9144
  \DeclareUnicodeCharacter{1E84}{\"W}
 
9145
  \DeclareUnicodeCharacter{1E85}{\"w}
 
9146
  \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
 
9147
  \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
 
9148
  \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
 
9149
  \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
 
9150
  \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
 
9151
  \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
 
9152
  \DeclareUnicodeCharacter{1E8C}{\"X}
 
9153
  \DeclareUnicodeCharacter{1E8D}{\"x}
 
9154
  \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
 
9155
  \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
 
9156
 
 
9157
  \DeclareUnicodeCharacter{1E90}{\^Z}
 
9158
  \DeclareUnicodeCharacter{1E91}{\^z}
 
9159
  \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
 
9160
  \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
 
9161
  \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
 
9162
  \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
 
9163
  \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
 
9164
  \DeclareUnicodeCharacter{1E97}{\"t}
 
9165
  \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
 
9166
  \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
 
9167
 
 
9168
  \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
 
9169
  \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
 
9170
 
 
9171
  \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
 
9172
  \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
 
9173
  \DeclareUnicodeCharacter{1EBC}{\~E}
 
9174
  \DeclareUnicodeCharacter{1EBD}{\~e}
 
9175
 
 
9176
  \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
 
9177
  \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
 
9178
  \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
 
9179
  \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
 
9180
 
 
9181
  \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
 
9182
  \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
 
9183
 
 
9184
  \DeclareUnicodeCharacter{1EF2}{\`Y}
 
9185
  \DeclareUnicodeCharacter{1EF3}{\`y}
 
9186
  \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
 
9187
 
 
9188
  \DeclareUnicodeCharacter{1EF8}{\~Y}
 
9189
  \DeclareUnicodeCharacter{1EF9}{\~y}
 
9190
 
 
9191
  \DeclareUnicodeCharacter{2013}{--}
 
9192
  \DeclareUnicodeCharacter{2014}{---}
 
9193
  \DeclareUnicodeCharacter{2018}{\quoteleft}
 
9194
  \DeclareUnicodeCharacter{2019}{\quoteright}
 
9195
  \DeclareUnicodeCharacter{201A}{\quotesinglbase}
 
9196
  \DeclareUnicodeCharacter{201C}{\quotedblleft}
 
9197
  \DeclareUnicodeCharacter{201D}{\quotedblright}
 
9198
  \DeclareUnicodeCharacter{201E}{\quotedblbase}
 
9199
  \DeclareUnicodeCharacter{2022}{\bullet}
 
9200
  \DeclareUnicodeCharacter{2026}{\dots}
 
9201
  \DeclareUnicodeCharacter{2039}{\guilsinglleft}
 
9202
  \DeclareUnicodeCharacter{203A}{\guilsinglright}
 
9203
  \DeclareUnicodeCharacter{20AC}{\euro}
 
9204
 
 
9205
  \DeclareUnicodeCharacter{2192}{\expansion}
 
9206
  \DeclareUnicodeCharacter{21D2}{\result}
 
9207
 
 
9208
  \DeclareUnicodeCharacter{2212}{\minus}
 
9209
  \DeclareUnicodeCharacter{2217}{\point}
 
9210
  \DeclareUnicodeCharacter{2261}{\equiv}
 
9211
}% end of \utfeightchardefs
 
9212
 
 
9213
 
 
9214
% US-ASCII character definitions.
 
9215
\def\asciichardefs{% nothing need be done
 
9216
   \relax
 
9217
}
 
9218
 
 
9219
% Make non-ASCII characters printable again for compatibility with
 
9220
% existing Texinfo documents that may use them, even without declaring a
 
9221
% document encoding.
 
9222
%
 
9223
\setnonasciicharscatcode \other
 
9224
 
 
9225
 
 
9226
\message{formatting,}
 
9227
 
7101
9228
\newdimen\defaultparindent \defaultparindent = 15pt
7102
9229
 
7103
9230
\chapheadingskip = 15pt plus 4pt minus 2pt
7107
9234
% Prevent underfull vbox error messages.
7108
9235
\vbadness = 10000
7109
9236
 
7110
 
% Don't be so finicky about underfull hboxes, either.
7111
 
\hbadness = 2000
 
9237
% Don't be very finicky about underfull hboxes, either.
 
9238
\hbadness = 6666
7112
9239
 
7113
 
% Following George Bush, just get rid of widows and orphans.
 
9240
% Following George Bush, get rid of widows and orphans.
7114
9241
\widowpenalty=10000
7115
9242
\clubpenalty=10000
7116
9243
 
7157
9284
  \ifpdf
7158
9285
    \pdfpageheight #7\relax
7159
9286
    \pdfpagewidth #8\relax
 
9287
    % if we don't reset these, they will remain at "1 true in" of
 
9288
    % whatever layout pdftex was dumped with.
 
9289
    \pdfhorigin = 1 true in
 
9290
    \pdfvorigin = 1 true in
7160
9291
  \fi
7161
9292
  %
7162
9293
  \setleading{\textleading}
7171
9302
  \textleading = 13.2pt
7172
9303
  %
7173
9304
  % If page is nothing but text, make it come out even.
7174
 
  \internalpagesizes{46\baselineskip}{6in}%
 
9305
  \internalpagesizes{607.2pt}{6in}% that's 46 lines
7175
9306
                    {\voffset}{.25in}%
7176
9307
                    {\bindingoffset}{36pt}%
7177
9308
                    {11in}{8.5in}%
7183
9314
  \textleading = 12pt
7184
9315
  %
7185
9316
  \internalpagesizes{7.5in}{5in}%
7186
 
                    {\voffset}{.25in}%
 
9317
                    {-.2in}{0in}%
7187
9318
                    {\bindingoffset}{16pt}%
7188
9319
                    {9.25in}{7in}%
7189
9320
  %
7227
9358
  % \global\normaloffset = -6mm
7228
9359
  % \global\bindingoffset = 10mm
7229
9360
  % @end tex
7230
 
  \internalpagesizes{51\baselineskip}{160mm}
 
9361
  \internalpagesizes{673.2pt}{160mm}% that's 51 lines
7231
9362
                    {\voffset}{\hoffset}%
7232
9363
                    {\bindingoffset}{44pt}%
7233
9364
                    {297mm}{210mm}%
7292
9423
  \parskip = 3pt plus 2pt minus 1pt
7293
9424
  \setleading{\textleading}%
7294
9425
  %
7295
 
  \dimen0 = #1
 
9426
  \dimen0 = #1\relax
7296
9427
  \advance\dimen0 by \voffset
7297
9428
  %
7298
9429
  \dimen2 = \hsize
7311
9442
 
7312
9443
\message{and turning on texinfo input format.}
7313
9444
 
 
9445
\def^^L{\par} % remove \outer, so ^L can appear in an @comment
 
9446
 
 
9447
% DEL is a comment character, in case @c does not suffice.
 
9448
\catcode`\^^? = 14
 
9449
 
7314
9450
% Define macros to output various characters with catcode for normal text.
7315
 
\catcode`\"=\other
7316
 
\catcode`\~=\other
7317
 
\catcode`\^=\other
7318
 
\catcode`\_=\other
7319
 
\catcode`\|=\other
7320
 
\catcode`\<=\other
7321
 
\catcode`\>=\other
7322
 
\catcode`\+=\other
7323
 
\catcode`\$=\other
7324
 
\def\normaldoublequote{"}
7325
 
\def\normaltilde{~}
7326
 
\def\normalcaret{^}
7327
 
\def\normalunderscore{_}
7328
 
\def\normalverticalbar{|}
7329
 
\def\normalless{<}
7330
 
\def\normalgreater{>}
7331
 
\def\normalplus{+}
7332
 
\def\normaldollar{$}%$ font-lock fix
 
9451
\catcode`\"=\other \def\normaldoublequote{"}
 
9452
\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
 
9453
\catcode`\+=\other \def\normalplus{+}
 
9454
\catcode`\<=\other \def\normalless{<}
 
9455
\catcode`\>=\other \def\normalgreater{>}
 
9456
\catcode`\^=\other \def\normalcaret{^}
 
9457
\catcode`\_=\other \def\normalunderscore{_}
 
9458
\catcode`\|=\other \def\normalverticalbar{|}
 
9459
\catcode`\~=\other \def\normaltilde{~}
7333
9460
 
7334
9461
% This macro is used to make a character print one way in \tt
7335
9462
% (where it can probably be output as-is), and another way in other fonts,
7420
9547
 
7421
9548
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
7422
9549
% the literal character `\'.
7423
 
 
9550
%
7424
9551
@def@normalturnoffactive{%
 
9552
  @let"=@normaldoublequote
 
9553
  @let$=@normaldollar %$ font-lock fix
 
9554
  @let+=@normalplus
 
9555
  @let<=@normalless
 
9556
  @let>=@normalgreater
7425
9557
  @let\=@normalbackslash
7426
 
  @let"=@normaldoublequote
7427
 
  @let~=@normaltilde
7428
9558
  @let^=@normalcaret
7429
9559
  @let_=@normalunderscore
7430
9560
  @let|=@normalverticalbar
7431
 
  @let<=@normalless
7432
 
  @let>=@normalgreater
7433
 
  @let+=@normalplus
7434
 
  @let$=@normaldollar %$ font-lock fix
 
9561
  @let~=@normaltilde
 
9562
  @markupsetuplqdefault
 
9563
  @markupsetuprqdefault
7435
9564
  @unsepspaces
7436
9565
}
7437
9566
 
7461
9590
% Say @foo, not \foo, in error messages.
7462
9591
@escapechar = `@@
7463
9592
 
 
9593
% These (along with & and #) are made active for url-breaking, so need
 
9594
% active definitions as the normal characters.
 
9595
@def@normaldot{.}
 
9596
@def@normalquest{?}
 
9597
@def@normalslash{/}
 
9598
 
7464
9599
% These look ok in all fonts, so just make them not special.
7465
 
@catcode`@& = @other
7466
 
@catcode`@# = @other
7467
 
@catcode`@% = @other
 
9600
@catcode`@& = @other @def@normalamp{&}
 
9601
@catcode`@# = @other @def@normalhash{#}
 
9602
@catcode`@% = @other @def@normalpercent{%}
7468
9603
 
 
9604
@c Finally, make ` and ' active, so that txicodequoteundirected and
 
9605
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}.  If we
 
9606
@c don't make ` and ' active, @code will not get them as active chars.
 
9607
@c Do this last of all since we use ` in the previous @catcode assignments.
 
9608
@catcode`@'=@active
 
9609
@catcode`@`=@active
 
9610
@markupsetuplqdefault
 
9611
@markupsetuprqdefault
7469
9612
 
7470
9613
@c Local variables:
7471
9614
@c eval: (add-hook 'write-file-hooks 'time-stamp)