Mercurial > cpython-lru_cache-weakref
annotate Doc/myformat.sty @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | e78d1e0ecc59 |
| children | 0ae8c7d33464 |
| rev | line source |
|---|---|
|
3706
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
1 % |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
2 % myformat.sty for the Python doc [updated to work with Latex2e] |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
3 % |
| 803 | 4 |
|
5688
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
5 % Increase printable page size (copied from fullpage.sty) |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
6 \topmargin 0pt |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
7 \advance \topmargin by -\headheight |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
8 \advance \topmargin by -\headsep |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
9 |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
10 \textheight 8.9in |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
11 |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
12 \oddsidemargin 0pt |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
13 \evensidemargin \oddsidemargin |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
14 \marginparwidth 0.5in |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
15 |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
16 \textwidth 6.5in |
|
e78d1e0ecc59
Increase printable page size.
Guido van Rossum <guido@python.org>
parents:
5600
diff
changeset
|
17 |
|
3706
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
18 % Style parameters and macros used by most documents here |
| 439 | 19 \raggedbottom |
| 20 \sloppy | |
| 668 | 21 \parindent = 0mm |
| 22 \parskip = 2mm | |
| 439 | 23 |
|
133
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
24 % Variable used by begin code command |
|
130
8f214d617aca
Better solution for code environment.
Guido van Rossum <guido@python.org>
parents:
122
diff
changeset
|
25 \newlength{\codewidth} |
|
8f214d617aca
Better solution for code environment.
Guido van Rossum <guido@python.org>
parents:
122
diff
changeset
|
26 |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
27 % Command to start a code block (follow this by \begin{verbatim}) |
|
133
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
28 \newcommand{\bcode}{ |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
29 % Calculate the text width for the minipage: |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
30 \setlength{\codewidth}{\linewidth} |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
31 \addtolength{\codewidth}{-\parindent} |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
32 % |
| 439 | 33 \par |
|
133
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
34 \vspace{3mm} |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
35 \indent |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
36 \begin{minipage}[t]{\codewidth} |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
37 } |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
38 |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
39 % Command to end a code block (precede this by \end{verbatim}) |
|
133
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
40 \newcommand{\ecode}{ |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
41 \end{minipage} |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
42 \vspace{3mm} |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
43 \par |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
44 \noindent |
|
06889685eb62
Changed code environment into \bcode and \ecode macros.
Guido van Rossum <guido@python.org>
parents:
130
diff
changeset
|
45 } |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
46 |
|
3706
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
47 % Underscore hack (only act like subscript operator if in math mode) |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
48 % |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
49 % The following is due to Mark Wooding (the old version didn't work with |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
50 % Latex 2e. |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
51 |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
52 \DeclareRobustCommand\hackscore{% |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
53 \ifmmode_\else\textunderscore\fi% |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
54 } |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
55 \begingroup |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
56 \catcode`\_\active |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
57 \def\next{% |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
58 \AtBeginDocument{\catcode`\_\active\def_{\hackscore{}}}% |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
59 } |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
60 \expandafter\endgroup\next |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
61 |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
62 % |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
63 % This is the old hack, which didn't work with 2e. |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
64 % If you're still using Latex 2.09, you can give it a try if the above fails. |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
65 % |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
66 %\def\_{\ifnum\fam=\ttfamily \char'137\else{\tt\char'137}\fi} |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
67 %\catcode`\_=12 |
|
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
68 %\catcode`\_=\active\def_{\ifnum\fam=\ttfamily \char'137 \else{\tt\char'137}\fi} |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
69 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
70 % Define \itembreak: force the text after an item to start on a new line |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
71 \newcommand{\itembreak}{ |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
72 \mbox{} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
73 \\*[0mm] |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
74 } |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
75 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
76 % Command to generate two index entries (using subentries) |
|
1767
907605320a5f
Lots of small corrections by Andrew Kuchling (plus all new rotor docs)
Guido van Rossum <guido@python.org>
parents:
1753
diff
changeset
|
77 \newcommand{\indexii}[2]{\index{#1!#2}\index{#2!#1}} |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
78 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
79 % And three entries (using only one level of subentries) |
|
1767
907605320a5f
Lots of small corrections by Andrew Kuchling (plus all new rotor docs)
Guido van Rossum <guido@python.org>
parents:
1753
diff
changeset
|
80 \newcommand{\indexiii}[3]{\index{#1!#2 #3}\index{#2!#3, #1}\index{#3!#1 #2}} |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
81 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
82 % And four (again, using only one level of subentries) |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
83 \newcommand{\indexiv}[4]{ |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
84 \index{#1!#2 #3 #4} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
85 \index{#2!#3 #4, #1} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
86 \index{#3!#4, #1 #2} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
87 \index{#4!#1 #2 #3} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
88 } |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
89 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
90 % Command to generate a reference to a function, statement, keyword, operator |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
91 \newcommand{\stindex}[1]{\indexii{statement}{#1@{\tt#1}}} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
92 \newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\tt#1}}} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
93 \newcommand{\opindex}[1]{\indexii{operator}{#1@{\tt#1}}} |
|
785
cd81e56804b0
Added \exindex and \obindex
Guido van Rossum <guido@python.org>
parents:
767
diff
changeset
|
94 \newcommand{\exindex}[1]{\indexii{exception}{#1@{\tt#1}}} |
|
cd81e56804b0
Added \exindex and \obindex
Guido van Rossum <guido@python.org>
parents:
767
diff
changeset
|
95 \newcommand{\obindex}[1]{\indexii{object}{#1}} |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
96 \newcommand{\bifuncindex}[1]{\index{#1@{\tt#1} (built-in function)}} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
97 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
98 % Add an index entry for a module |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
99 \newcommand{\modindex}[2]{\index{#1@{\tt#1} (#2module)}} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
100 \newcommand{\bimodindex}[1]{\modindex{#1}{built-in }} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
101 \newcommand{\stmodindex}[1]{\modindex{#1}{standard }} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
102 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
103 % Additional string for an index entry |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
104 \newcommand{\indexsubitem}{} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
105 \newcommand{\ttindex}[1]{\index{#1@{\tt#1} \indexsubitem}} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
106 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
107 % Define \itemjoin: some negative vspace to join two items together |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
108 \newcommand{\itemjoin}{ |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
109 \mbox{} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
110 \vspace{-\itemsep} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
111 \vspace{-\parsep} |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
112 } |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
113 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
114 % Define \funcitem{func}{args}: define a function item |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
115 \newcommand{\funcitem}[2]{% |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
116 \ttindex{#1}% |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
117 \item[\code{#1(\varvars{#2})}] |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
118 \ |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
119 } |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
120 |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
121 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
122 % from user-level, fulllineitems should be called as an environment |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
123 \def\fulllineitems{\list{}{\labelwidth \leftmargin \labelsep 0pt |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
124 \rightmargin 0pt \topsep -\parskip \partopsep \parskip |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
125 \itemsep -\parsep |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
126 \let\makelabel\itemnewline}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
127 \let\endfulllineitems\endlist |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
128 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
129 |
|
5600
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
130 % cfuncdesc should be called as |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
131 % \begin{cfuncdesc}{type}{name}{arglist} |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
132 % ... description ... |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
133 % \end{cfuncdesc} |
|
4510
11e0c2208999
(myformat.sty, extref.tex): Moved definition of cfuncdesc environment to
Fred Drake <fdrake@acm.org>
parents:
3706
diff
changeset
|
134 \newcommand{\cfuncline}[3]{\item[\code{#1 #2(\varvars{#3})}]\ttindex{#2}} |
|
11e0c2208999
(myformat.sty, extref.tex): Moved definition of cfuncdesc environment to
Fred Drake <fdrake@acm.org>
parents:
3706
diff
changeset
|
135 \newcommand{\cfuncdesc}[3]{\fulllineitems\cfuncline{#1}{#2}{#3}} |
|
11e0c2208999
(myformat.sty, extref.tex): Moved definition of cfuncdesc environment to
Fred Drake <fdrake@acm.org>
parents:
3706
diff
changeset
|
136 \let\endcfuncdesc\endfulllineitems |
|
11e0c2208999
(myformat.sty, extref.tex): Moved definition of cfuncdesc environment to
Fred Drake <fdrake@acm.org>
parents:
3706
diff
changeset
|
137 |
|
5600
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
138 \newcommand{\cvarline}[2]{\item[\code{#1 #2}]\ttindex{#2}} |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
139 \newcommand{\cvardesc}[2]{\fulllineitems\cvarline{#1}{#2}} |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
140 \let\endcvardesc\endfulllineitems |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
141 |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
142 \newcommand{\ctypeline}[1]{\item[\code{#1}]\ttindex{#1}} |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
143 \newcommand{\ctypedesc}[1]{\fulllineitems\ctypeline{#1}} |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
144 \let\endctypedesc\endfulllineitems |
|
d954dc243eb0
Added cvardesc and ctypedesc macros, for api.tex.
Guido van Rossum <guido@python.org>
parents:
5536
diff
changeset
|
145 |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
146 % funcdesc should be called as an \begin{funcdesc} ... \end{funcdesc} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
147 \newcommand{\funcline}[2]{\item[\code{#1(\varvars{#2})}]\ttindex{#1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
148 \newcommand{\funcdesc}[2]{\fulllineitems\funcline{#1}{#2}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
149 \let\endfuncdesc\endfulllineitems |
|
1767
907605320a5f
Lots of small corrections by Andrew Kuchling (plus all new rotor docs)
Guido van Rossum <guido@python.org>
parents:
1753
diff
changeset
|
150 \newcommand{\optional}[1]{{\ \Large[}{#1}\hspace{0.5mm}{\Large]}\ } |
|
907605320a5f
Lots of small corrections by Andrew Kuchling (plus all new rotor docs)
Guido van Rossum <guido@python.org>
parents:
1753
diff
changeset
|
151 |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
152 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
153 % same for excdesc |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
154 \newcommand{\excline}[1]{\item[\code{#1}]\ttindex{#1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
155 \newcommand{\excdesc}[1]{\fulllineitems\excline{#1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
156 \let\endexcdesc\endfulllineitems |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
157 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
158 % same for datadesc |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
159 \newcommand{\dataline}[1]{\item[\code{#1}]\ttindex{#1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
160 \newcommand{\datadesc}[1]{\fulllineitems\dataline{#1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
161 \let\enddatadesc\endfulllineitems |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
162 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
163 |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
164 % Define \dataitem{name}: define a data item |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
165 \newcommand{\dataitem}[1]{% |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
166 \ttindex{#1}% |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
167 \item[{\tt #1}] |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
168 \ |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
169 } |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
170 |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
171 % Define \excitem{name}: define an exception item |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
172 \newcommand{\excitem}[1]{% |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
173 \ttindex{#1}% |
|
696
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
174 \item[{\tt #1}] |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
175 \itembreak |
|
f37f8bc9190c
Moved macros here from lib.tex.
Guido van Rossum <guido@python.org>
parents:
668
diff
changeset
|
176 } |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
177 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
178 \let\nodename=\label |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
179 |
|
4726
f7a99161df92
(myformat.sty): Added a note about using \command{} v. {\command} wrt.
Fred Drake <fdrake@acm.org>
parents:
4535
diff
changeset
|
180 %% For these commands, use \command{} to get the typography right, not |
|
f7a99161df92
(myformat.sty): Added a note about using \command{} v. {\command} wrt.
Fred Drake <fdrake@acm.org>
parents:
4535
diff
changeset
|
181 %% {\command}. This works better with the texinfo translation. |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
182 \newcommand{\ABC}{{\sc abc}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
183 \newcommand{\UNIX}{{\sc Unix}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
184 \newcommand{\ASCII}{{\sc ascii}} |
|
1767
907605320a5f
Lots of small corrections by Andrew Kuchling (plus all new rotor docs)
Guido van Rossum <guido@python.org>
parents:
1753
diff
changeset
|
185 \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}} |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
186 \newcommand{\C}{C} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
187 \newcommand{\EOF}{{\sc eof}} |
|
5536
c6f04e965508
Made a start with api.tex, the Python-C API Reference Manual.
Guido van Rossum <guido@python.org>
parents:
4726
diff
changeset
|
188 \newcommand{\NULL}{\code{NULL}} |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
189 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
190 % code is the most difficult one... |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
191 \newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
192 \mbox{\tt #1}}} |
|
3706
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
193 |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
194 \newcommand{\kbd}[1]{\mbox{\tt #1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
195 \newcommand{\key}[1]{\mbox{\tt #1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
196 \newcommand{\samp}[1]{\mbox{`\code{#1}'}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
197 \newcommand{\var}[1]{\mbox{\it#1\/}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
198 \let\file=\samp |
|
2621
2f9102f57143
change \dfn to be \em not \sl
Guido van Rossum <guido@python.org>
parents:
2606
diff
changeset
|
199 \newcommand{\dfn}[1]{{\em #1\/}} |
|
3706
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
200 \renewcommand{\emph}[1]{{\em #1\/}} |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
201 \newcommand{\strong}[1]{{\bf #1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
202 |
|
4535
9421d2f63077
(myformat.sty): Simplify \varvars definition.
Fred Drake <fdrake@acm.org>
parents:
4510
diff
changeset
|
203 \newcommand{\varvars}[1]{{\def\,{\/{\char`\,}}\var{#1}}} |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
204 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
205 \newif\iftexi\texifalse |
|
3706
db577094f685
Fixed for Latex2e by Dave Ascher.
Guido van Rossum <guido@python.org>
parents:
2621
diff
changeset
|
206 \newif\iflatex\latextrue |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
207 |
|
1753
b5468d886cb5
Merge lost alpha100 revision
Guido van Rossum <guido@python.org>
parents:
1100
diff
changeset
|
208 \newenvironment{tableii}[4]{\begin{center}\def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}\begin{tabular}{#1}\hline#3\\ |
|
b5468d886cb5
Merge lost alpha100 revision
Guido van Rossum <guido@python.org>
parents:
1100
diff
changeset
|
209 \hline}{\hline\end{tabular}\end{center}} |
|
b5468d886cb5
Merge lost alpha100 revision
Guido van Rossum <guido@python.org>
parents:
1100
diff
changeset
|
210 |
|
1100
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
211 \newenvironment{tableiii}[5]{\begin{center}\def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}\begin{tabular}{#1}\hline#3\\ |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
212 \hline}{\hline\end{tabular}\end{center}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
213 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
214 \newcommand{\itemnewline}[1]{\@tempdima\linewidth |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
215 \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}} |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
216 |
|
ff1899dcda05
Incorporated Jan-Hein's changes and texinfo conversion.
Guido van Rossum <guido@python.org>
parents:
946
diff
changeset
|
217 \newcommand{\sectcode}[1]{{\tt #1}} |
