]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/book/texhelp.sty
made wxCondition::Signal() queue the signals generated while there were no waiters...
[wxWidgets.git] / docs / latex / book / texhelp.sty
1 % LaTeX style file
2 % Name: texhelp.sty
3 % Author: Julian Smart
4 %
5 % Purpose
6 % -------
7 % Style file to enable the simultaneous preparation of printed LaTeX and on-line
8 % hypertext manuals.
9 % Use in conjunction with Tex2RTF (see Tex2RTF documentation).
10 %
11 % Note that if a non-ASCII character starts a newline and there should be a space
12 % between the last word on the previous line and the first word on this line,
13 % you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
14 % in all other formats.
15 %
16 % Julian Smart
17 % Artificial Intelligence Applications Institute
18 %
19 %
20 % ============== C++/CLIPS Documentation Facilities ==============
21 %
22 % Each class definition should be typeset with e.g.
23 %
24 % \section{\class{Name}: Parent}
25 %
26 % followed by a description of the class.
27 % Each member should follow:
28 %
29 % \membersection{wxName::Member}
30 %
31 % with a description of what this member does.
32 % Then, one (or more if overloaded) member (function) in detail:
33 %
34 % \func{return type}{name}{args}
35 % or
36 % \member{type}{name}
37 %
38 % where args is a list of \param{type}{name}, ...
39
40 % Function, e.g.
41 % e.g. to typeset
42 %
43 % void DoIt(char *string);
44 %
45 % write:
46 %
47 % \func{void}{DoIt}{\param{char *}{string}}
48 %
49
50 \newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
51 {{\it #1} {\bf #2}\index{#2}}(#3)}
52
53 % For function/type definition where the name is a pointer,
54 % e.g. to typeset
55 %
56 % typedef void (*wxFunction)(wxObject&)
57 %
58 % write:
59 %
60 % \pfunc{typedef void}{wxFunction}{param{wxObject&}}
61
62 \newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
63 {{\it #1} ({\bf *#2})\index{#2}}(#3)}
64
65 % Use an ordinary \section command for class name definitions.
66
67 % This is used for a member, such as wxBitmap: GetDepth
68 \newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
69
70 % CLIPS function
71 \newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
72 {{\bf #1} ({\bf #2}\index{#2}}#3)}
73
74 \newcommand{\clipssection}[1]{\chapter{#1}}
75
76 % This is used for a CLIPS function name
77 \newcommand{\functionsection}[1]{\subsection*{#1}}
78
79 % Member: a type and a name
80 \newcommand{\member}[2]{{\bf #1 \it #2}}
81
82 % C++ Parameter: a type and a name (no intervening space)
83 \newcommand{\param}[2]{{\it #1}{\bf #2}}
84
85 % CLIPS Parameter: a type and a name (one intervening space)
86 \newcommand{\cparam}[2]{{\bf #1} {\it #2}}
87
88 % Class: puts in index
89 \newcommand{\class}[1]{#1\index{#1}}
90
91 %\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
92
93 % Void type
94 \newcommand{\void}{{\it void}}
95
96 % Typeset destructor
97 \newcommand{\destruct}[1]{{$\sim$}#1}
98
99 % Typeset insert/extract operators
100 \newcommand{\cinsert}{$<<$}
101 \newcommand{\cextract}{$>>$}
102
103 % pythonnote: A note about the wxpython interface.
104 %\newcommand{\pythonnote}[1]{{\bf wxPython note: }#1}
105 \newcommand{\pythonnote}[1]{{}}
106
107 % =================== Hypertext facilities ===================
108 %
109 % To insert hyperlinks (or references, in Latex), \label the sections
110 % or membersections \label{ref-label} immediately after the section, on the same line,
111 % and use \helpref{text-to-show}{ref-label} to make a reference.
112 %
113
114 % Type text with section reference
115 \newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
116
117 % Type text with URL in verbatim mode
118 \newcommand{\urlref}[2]{#1 (\verb$#2$)}
119
120 % Don't typeset section number in LaTeX
121 \newcommand{\helprefn}[2]{{\it #1}}
122
123 % Like helpref, but popup text in WinHelp instead of hyperlinked
124 \newcommand{\popref}[2]{{\it #1}}
125
126 % Like footnote, but popup text.
127 \newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
128
129 % =================== On-line help specific macros ===================
130 %
131
132 % Global document font size/family, help only.
133 \newcommand{\helpfontsize}[1]{}
134 \newcommand{\helpfontfamily}[1]{}
135
136 % Ignore in all on-line help
137 \newcommand{\helpignore}[1]{#1}
138 % Only print in all on-line help
139 \newcommand{\helponly}[1]{}
140
141 % Ignore in LaTeX
142 \newcommand{\latexignore}[1]{}
143 % Only print in LaTeX
144 \newcommand{\latexonly}[1]{#1}
145
146 % Ignore in linear RTF
147 \newcommand{\rtfignore}[1]{#1}
148 % Only print in linear RTF
149 \newcommand{\rtfonly}[1]{}
150
151 % Ignore in WinHelp RTF
152 \newcommand{\winhelpignore}[1]{#1}
153 % Only print in WinHelp RTF
154 \newcommand{\winhelponly}[1]{}
155
156 % Ignore in wxHelp
157 \newcommand{\xlpignore}[1]{#1}
158 % Only print in wxHelp
159 \newcommand{\xlponly}[1]{}
160
161 % Ignore in HTML
162 \newcommand{\htmlignore}[1]{#1}
163 % Only print in HTML
164 \newcommand{\htmlonly}[1]{}
165
166 % Input a file only for help system (binder thickness is not a limitation
167 % in help systems!)
168 \newcommand{\helpinput}[1]{}
169
170 \newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
171
172 % =================== Miscellaneous macros ===================
173 %
174 % Headings consistent with generated ones
175 \newcommand{\myheading}[1]{\vspace*{25pt}
176 \begin{flushleft}
177 {\LARGE \bf #1}
178 \end{flushleft}
179 \vskip 20pt
180 }
181
182 % Heading with entry in contents page.
183 \newcommand{\chapterheading}[1]{\myheading{#1}
184 \addcontentsline{toc}{chapter}{#1}}
185
186 \newcommand{\sectionheading}[1]{\myheading{#1}
187 \addcontentsline{toc}{section}{#1}}
188
189 % Glossary environment
190 \newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
191
192 % Glossary entry
193 \newcommand{\gloss}[1]{\item[#1]\index{#1}}
194
195 % Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
196 \newcommand{\image}[2]{\psboxto(#1){#2}}
197
198 % Image, left aligned (HTML)
199 \newcommand{\imager}[2]{\psboxto(#1){#2}}
200
201 % Image, right aligned (HTML)
202 \newcommand{\imagel}[2]{\psboxto(#1){#2}}
203
204 % Imagemap: principally for HTML only. In Latex,
205 % acts like \image.
206 \newcommand{\imagemap}[3]{\psboxto(#1){#2}}
207
208 % Headers and footers
209 % \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
210 % {OddPageLeft}{OddPageCentre}{OddPageRight}
211 \newcommand{\setheader}[6]{
212 \lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
213 \chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
214 \rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
215 }
216
217 % \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
218 % {OddPageLeft}{OddPageCentre}{OddPageRight}
219 \newcommand{\setfooter}[6]{
220 \lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
221 \cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
222 \rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
223 }
224
225 % Needed for telling RTF where margin paragraph should go
226 % in mirrored margins mode.
227 \newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
228 \newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
229
230 % Environment for two-column table popular in WinHelp and manuals.
231 \newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
232 \newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
233 \newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
234
235 \twocolwidtha{3cm}
236 \twocolwidthb{8.5cm}
237 \twocolspacing{2}
238
239 \newcommand{\twocolitem}[2]{#1 & #2\\}
240 \newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
241
242 \newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
243 {\end{tabular}\renewcommand{\arraystretch}{1}}
244
245 % Specifying table rows for RTF compatibility
246 \newcommand{\row}[1]{#1\\}
247
248 % Use for the last ruled row for correct RTF generation.
249 \newcommand{\ruledrow}[1]{#1\\\hline}
250
251 % Indentation environment. Arg1 is left margin size
252 \newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
253 {\end{list}}
254
255 % Framed box of text, normal formatting.
256 \newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
257 % Double-framed box of text.
258 \newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
259
260 % WITHDRAWN -- can't do in RTF, easily.
261 % Framed box of text, horizontally centred. Ragged right within box.
262 % \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
263 % Double-framed box of text, horizontally centred. Ragged right within box.
264 % \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
265
266 % toocomplex environment: simply prints the argument in LaTeX,
267 % comes out verbatim in all generated formats.
268 \newenvironment{toocomplex}{}{}
269
270 % Colour: dummy commands since LaTeX doesn't support colour.
271 % \definecolour{name}{red}{blue}{green}
272 % \fcol{name}{text} ; Foreground
273 % \bcol{name}{text} ; Background
274 \newcommand{\definecolour}[4]{}
275 \newcommand{\definecolor}[4]{}
276 \newcommand{\fcol}[2]{#2}
277 \newcommand{\bcol}[2]{#2}
278 \newcommand{\sethotspotcolour}[1]{}
279 \newcommand{\sethotspotunderline}[1]{}
280 \newcommand{\settransparency}[1]{}
281 \newcommand{\backslashraw}[0]{}
282 \newcommand{\lbraceraw}[0]{}
283 \newcommand{\rbraceraw}[0]{}
284 \newcommand{\registered}[0]{(r)}
285 \newcommand{\background}[1]{}
286 \newcommand{\textcolour}[1]{}
287 \newcommand{\overview}[2]{See \helpref{#1}{#2}.}
288 \newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
289 #2%
290 \end{list}}
291 \newcommand{\wxheading}[1]{{\bf #1}}
292 \newcommand{\const}[0]{{\bf const}}
293 \newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
294 \newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
295
296 \addtolength{\textwidth}{1in}
297 \addtolength{\oddsidemargin}{-0.5in}
298 \addtolength{\topmargin}{-0.5in}
299 \addtolength{\textheight}{1in}
300 \sloppy
301