Debian Codegraph @

texmf-dist/tex/plain/cweb/cwebbin/fcwebmac.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 % Version 3.42 [p15] --- Andreas Scherer, August 1998
23 % Version 3.43 [p16] --- Andreas Scherer, October 1998
24 % Version 3.5 [p17] --- Andreas Scherer, December 1999
25 % Version 3.61 [p18] --- Andreas Scherer, July 2000
26 % Version 3.63 [p19] --- Andreas Scherer, January 2001
27 % Version 3.64 [p20] --- Andreas Scherer, March 2002
28 % Version 3.64 [p21] --- Andreas Scherer, October 2005
29 % Version 3.64 [p22] --- Andreas Scherer, March 2016
30 % Version 4.9 --- Andreas Scherer, June 2022
31 % Version 4.12 --- Andreas Scherer, August 2024
32 % Version 4.12.2 --- Andreas Scherer, January 2026
33
34 % french translations --- Denis Roegel, 18 September 1994
35
36 \ifx\undefined\botofcontents\input cwebmac.tex\fi
37
38 \def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
39 \ifx\Cstringchars\undefined\else\Cstringchars\fi % special string characters
40 \let\\=\BS % backslash in a string
41 \let\{=\LB % left brace in a string
42 \let\}=\RB % right brace in a string
43 \let\~=\TL % tilde in a string
44 \let\ =\SP % space in a string
45 \let\_=\UL % underline in a string
46 \let\&=\AM % ampersand in a string
47 \let\^=\CF % circumflex in a string
48 #1\kern.05em}}
49
50 \def\postATL#1 #2 {\bf La lettre \\{\uppercase{\char"#1}}
51 est \string`\string`tanglee\string'\string' en \tentex "#2"\egroup\par}
52 \def\ATH{{\acrohintfalse\X\kern-.5em:D\'efinitions du pr\'eprocesseur\X}}
53
54 \def\A{\note{Voir aussi la section}} % xref for doubly defined section name
55 \def\As{\note{Voir aussi les sections}} % xref for multiply defined section name
56
57 \def\ET{ et~} % conjunction between two section numbers
58 \def\ETs{ et~} % conjunction between the last two of several section numbers
59
60 \def\Q{\note{Cette partie du programme est cit\'ee dans la section}}
61 % xref for mention of a section
62 \def\Qs{\note{Cette partie du programme est cit\'ee dans les sections}}
63 % xref for mentions of a section
64
65 \def\U{\note{Cette partie du programme est utilis\'ee dans la section}}
66 % xref for use of a section
67 \def\Us{\note{Cette partie du programme est utilis\'ee dans les sections}}
68 % xref for uses of a section
69
70 \gtitle={Sortie \.{CWEB}} % this running head is reset by starred sections
71 \mark{\noexpand\nullsec0{\the\gtitle}}
72
73 \def\ch{\note{Les sections suivantes ont \'et\'e modifi\'ees dans le
74 Change-File:}\let\*=\relax}
75
76 \def\fin{\par\vfill\eject % this is done when we are ending the index
77 \ifpagesaved\null\vfill\eject\fi % output a null index column
78 \if L\lr\else\null\vfill\eject\fi % finish the current page
79 \ifpdf \ifpdflua \makebookmarks % added in Version 3.68
80 \countsections \fi\fi % and in Version 4.9
81 \parfillskip 0pt plus 1fil
82 \def\grouptitle{NOMS DES SECTIONS}
83 \let\topsecno=\nullsec
84 \message{Noms des sections:}
85 \output={\normaloutput\page\lheader\rheader}
86 \setpage
87 \def\note##1##2.{\quad{\eightrm##1~\ifacrohint{\pdfnote##2.}\else{##2}\fi.}}
88 \def\Q{\note{Cit\'e dans la section}} % crossref for mention of a section
89 \def\Qs{\note{Cit\'e dans les sections}} % crossref for mentions of a section
90 \def\U{\note{Utilis\'e dans la section}} % crossref for use of a section
91 \def\Us{\note{Utilis\'e dans les sections}} % crossref for uses of a section
92 \def\I{\par\hangindent 2em}\let\*=*
93 \ifpdf \def\outsecname{Noms des sections} \let\Xpdf\X
94 % \ifpdflua \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
95 \ifpdflua \pdfdest name {NOS} fith % changed in version 3.69
96 \pdfoutline goto name {NOS} count -\the\countNOS {\outsecname}
97 \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
98 {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%
99 \pdfoutline goto num \the\toksA \expandafter{\the\toksE}}
100 \else \special{pdf: outline -1 << /Title (\outsecname)
101 /Dest [ @thispage /FitH @ypos ] >>}
102 \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
103 {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%
104 \special{pdf: outline 0 << /Title (\the\toksE)
105 /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}}
106 \fi\fi
107 \readsections}
108 \def\con{\par\vfill\eject % finish the section names
109 % \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
110 \rightskip 0pt \hyphenpenalty 50 \tolerance 200
111 \setpage \output={\normaloutput\page\lheader\rheader}
112 \ifpdf\startpdf\fi \titletrue % prepare to output the table of contents
113 \pageno=\contentspagenumber
114 \def\grouptitle{SOMMAIRE:}
115 \message{Sommaire:}
116 \ifhint\HINThome\fi% Mark the Table of contents as home page
117 \topofcontents
118 \line{\hfil Section\ifhint\else\hbox to3em{\hss Page}\fi}% No Page in HINT
119 \let\ZZ=\contentsline
120 \readcontents\relax % read the contents info
121 \botofcontents \end} % print the contents page(s) and terminate
122 \def\today{\number\day.~\ifcase\month\or
123 Janvier\or F\'evrier\or Mars\or Avril\or Mai\or Juin\or
124 Juillet\or Ao\^ut\or Septembre\or Octobre\or Novembre\or D\'ecembre\fi
125 \space\number\year}
126 \def\hours{\twodigits=\time \divide\twodigits by60 \printtwodigits
127 \null\space\sc h\space % distinguish between time and year
128 \multiply\twodigits by-60 \advance\twodigits by\time \printtwodigits}
129 \def\datethis{\def\startsection{\leftline{\sc\today\ \`a \hours}\bigskip
130 \let\startsection=\stsec\stsec}}
131 % say `\datethis' in limbo, to get your listing timestamped before section 1
132 %\def\datecontentspage{% versions up to 3.65
133 % \def\topofcontents{\leftline{\sc\today\ \`a \hours}\bigskip
134 % \centerline{\titlefont\title}\vfill}} % timestamps the contents page
135 \def\datecontentspage{% changed in version 3.66
136 \def\botofcontents{\vfill
137 \centerline{\covernote}
138 \bigskip
139 \leftline{\sc\today\ \`a \hours}}} % timestamps the contents page