Debian Codegraph @

texmf-dist/tex/plain/cweb-old/pdffcwebmac.tex

raw
1 % standard macros for CWEB listings (in addition to plain.tex)
2 % modified for use with "tex2pdf" --- March 1997
3 % Version 2.0 --- Don Knuth, July 1990
4 % Version 2.0 [german] --- Carsten Steger, October 1991
5 % Version 2.0 [german] --- Andreas Scherer, February 1993
6 % Version 2.7 --- Don Knuth, July 1992
7 % Version 2.7 [p6c] --- Andreas Scherer, September 1993
8 % Version 2.8 --- Don Knuth, September 1992
9 % Version 2.8 [german] --- Carsten Steger, 1993
10 % Version 2.8 [p7] --- Andreas Scherer, October 1993
11 % Version 3.0 --- Don Knuth, June 1993
12 % Version 3.0 [p8e] --- Andreas Scherer, November 1993
13 % Version 3.1 [p9b] --- Andreas Scherer, January 1994
14 % Version 3.1 [p9c] --- Andreas Scherer, March 1994
15 % Version 3.1 [p9d] --- Andreas Scherer, July 1994
16 % Version 3.2 [p10] --- Andreas Scherer, July 1994
17 % Version 3.2 [p10a] --- Denis B. Roegel, September 1994
18 % Version 3.3 [p10b] --- Andreas Scherer, October 1994
19 % Version 3.3 [p11b] --- Andreas Scherer, March 1995
20 % Version 3.4 [p13] --- Andreas Scherer, August 1995
21 % Version 3.4 [p14] --- Andreas Scherer, March 1997
22
23 % french translations --- Denis Roegel, 18 September 1994
24
25 \ifx\undefined\documentclass\else\endinput\fi % LaTeX will use other macros
26
27 \input pdfXcwebmac.tex
28
29 \def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
30 \ifx\Cstringchars\undefined\else\Cstringchars\fi % special string characters
31 \let\\=\BS % backslash in a string
32 \let\{=\LB % left brace in a string
33 \let\}=\RB % right brace in a string
34 \let\~=\TL % tilde in a string
35 \let\ =\SP % space in a string
36 \let\_=\UL % underline in a string
37 \let\&=\AM % ampersand in a string
38 \let\^=\CF % circumflex in a string
39 #1\kern.05em}}
40
41 \def\postATL#1 #2 {\bf La lettre \\{\uppercase{\char"#1}}
42 est \string`\string`tanglee\string'\string' en \tentex "#2"\egroup\par}
43 \def\ATH{\X\kern-.5em:D\'efinitions du pr\'eprocesseur\X}
44
45 \def\A{\note{Voir aussi la section}} % xref for doubly defined section name
46 \def\As{\note{Voir aussi les sections}} % xref for multiply defined
47 % section name
48
49 \def\ET{ et~} % conjunction between two section numbers
50 \def\ETs{ et~} % conjunction between the last two of several section numbers
51
52 \def\Q{\note{Cette partie du programme est cit\'ee dans la section}}
53 % xref for mention of a section
54 \def\Qs{\note{Cette partie du programme est cit\'ee dans les sections}}
55 % xref for mentions of a section
56
57 \def\U{\note{Cette partie du programme est utilis\'ee dans la section}}
58 % xref for use of a section
59 \def\Us{\note{Cette partie du programme est utilis\'ee dans les sections}}
60 % xref for uses of a section
61
62 \gtitle={Sortie \.{CWEB}} % this running head is reset by starred sections
63 \mark{\noexpand\nullsec0{\the\gtitle}}
64
65 \def\ch{\note{Les sections suivantes ont \'et\'e modifi\'ees dans le
66 Change-File:}\let\*=\relax}
67
68 \def\fin{\par\vfill\eject % this is done when we are ending the index
69 \ifpagesaved\null\vfill\eject\fi % output a null index column
70 \if L\lr\else\null\vfill\eject\fi % finish the current page
71 \parfillskip 0pt plus 1fil
72 \def\grouptitle{NOMS DES SECTIONS}
73 \let\topsecno=\nullsec
74 \message{Noms des sections:}
75 \output={\normaloutput\page\lheader\rheader}
76 \setpage
77 %
78 % Change for PDFTeX
79 % \def\note##1##2.{\quad{\eightrm##1~##2.}}
80 \def\note##1##2.{\quad{\eightrm##1~\pdfnote##2..}}
81 % End of PDFTeX change
82 %
83 \def\Q{\note{Cit\'e dans la section}} % crossref for mention of a section
84 \def\Qs{\note{Cit\'e dans les sections}} % crossref for mentions of a section
85 \def\U{\note{Utilis\'e dans la section}} % crossref for use of a section
86 \def\Us{\note{Utilis\'e dans les sections}} % crossref for uses of a section
87 \def\I{\par\hangindent 2em}\let\*=*
88 \readsections}
89 \def\con{\par\vfill\eject % finish the section names
90 % \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
91 \rightskip 0pt \hyphenpenalty 50 \tolerance 200
92 \setpage \output={\normaloutput\page\lheader\rheader}
93 \titletrue % prepare to output the table of contents
94 \pageno=\contentspagenumber
95 \def\grouptitle{SOMMAIRE:}
96 \message{Sommaire:}
97 \topofcontents
98 \line{\hfil Section\hbox to3em{\hss Page}}
99 \let\ZZ=\contentsline
100 \readcontents\relax % read the contents info
101 \botofcontents \end} % print the contents page(s) and terminate
102 \def\today{\number\day.~\ifcase\month\or
103 Janvier\or F\'evrier\or Mars\or Avril\or Mai\or Juin\or
104 Juillet\or Ao\^ut\or Septembre\or Octobre\or Novembre\or D\'ecembre\fi
105 \space\number\year}
106 \newcount\twodigits
107 \def\hours{\twodigits=\time \divide\twodigits by60 \printtwodigits
108 \null\space\sc h\space % distinguish between time and year
109 \multiply\twodigits by-60 \advance\twodigits by\time \printtwodigits}
110 \def\datethis{\def\startsection{\leftline{\sc\today\ \`a \hours}\bigskip
111 \let\startsection=\stsec\stsec}}
112 % say `\datethis' in limbo, to get your listing timestamped before section 1
113 \def\datecontentspage{%
114 \def\topofcontents{\leftline{\sc\today\ \`a \hours}\bigskip
115 \centerline{\titlefont\title}\vfill}} % timestamps the contents page