]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/texhelp2e.sty
no changes, just come cleanup and more comments
[wxWidgets.git] / docs / latex / wx / texhelp2e.sty
... / ...
CommitLineData
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\newcommand{\perlnote}[1]{{}}
107
108% =================== Hypertext facilities ===================
109%
110% To insert hyperlinks (or references, in Latex), \label the sections
111% or membersections \label{ref-label} immediately after the section, on the same line,
112% and use \helpref{text-to-show}{ref-label} to make a reference.
113%
114
115% Type text with section reference
116\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
117
118% Type text with URL in verbatim mode
119% \newcommand{\urlref}[2]{#1 (\verb$#2$)}
120\newcommand{\urlref}[2]{\href{#1}{#2}}
121
122% Don't typeset section number in LaTeX
123\newcommand{\helprefn}[2]{{\it #1}}
124
125% Like helpref, but popup text in WinHelp instead of hyperlinked
126\newcommand{\popref}[2]{{\it #1}}
127
128% Like footnote, but popup text.
129\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
130
131% =================== On-line help specific macros ===================
132%
133
134% Global document font size/family, help only.
135\newcommand{\helpfontsize}[1]{}
136\newcommand{\helpfontfamily}[1]{}
137
138% Ignore in all on-line help
139\newcommand{\helpignore}[1]{#1}
140% Only print in all on-line help
141\newcommand{\helponly}[1]{}
142
143% Ignore in LaTeX
144\newcommand{\latexignore}[1]{}
145% Only print in LaTeX
146\newcommand{\latexonly}[1]{#1}
147
148% Ignore in linear RTF
149\newcommand{\rtfignore}[1]{#1}
150% Only print in linear RTF
151\newcommand{\rtfonly}[1]{}
152
153% Ignore in WinHelp RTF
154\newcommand{\winhelpignore}[1]{#1}
155% Only print in WinHelp RTF
156\newcommand{\winhelponly}[1]{}
157
158% Ignore in wxHelp
159\newcommand{\xlpignore}[1]{#1}
160% Only print in wxHelp
161\newcommand{\xlponly}[1]{}
162
163% Ignore in HTML
164\newcommand{\htmlignore}[1]{#1}
165% Only print in HTML
166\newcommand{\htmlonly}[1]{}
167
168% Input a file only for help system (binder thickness is not a limitation
169% in help systems!)
170\newcommand{\helpinput}[1]{}
171
172\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
173
174% =================== Miscellaneous macros ===================
175%
176% Headings consistent with generated ones
177\newcommand{\myheading}[1]{\vspace*{25pt}
178\begin{flushleft}
179{\LARGE \bf #1}
180\end{flushleft}
181\vskip 20pt
182}
183
184% Heading with entry in contents page.
185\newcommand{\chapterheading}[1]{\myheading{#1}
186\addcontentsline{toc}{chapter}{#1}}
187
188\newcommand{\sectionheading}[1]{\myheading{#1}
189\addcontentsline{toc}{section}{#1}}
190
191% Glossary environment
192\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
193
194% Glossary entry
195\newcommand{\gloss}[1]{\item[#1]\index{#1}}
196
197% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
198\newcommand{\image}[2]{\psboxto(#1){#2}}
199
200% Image, left aligned (HTML)
201\newcommand{\imager}[2]{\psboxto(#1){#2}}
202
203% Image, right aligned (HTML)
204\newcommand{\imagel}[2]{\psboxto(#1){#2}}
205
206% Imagemap: principally for HTML only. In Latex,
207% acts like \image.
208\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
209
210% Headers and footers
211% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
212% {OddPageLeft}{OddPageCentre}{OddPageRight}
213\newcommand{\setheader}[6]{
214\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
215\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
216\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
217}
218
219% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
220% {OddPageLeft}{OddPageCentre}{OddPageRight}
221\newcommand{\setfooter}[6]{
222\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
223\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
224\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
225}
226
227% Needed for telling RTF where margin paragraph should go
228% in mirrored margins mode.
229\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
230\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
231
232% Environment for two-column table popular in WinHelp and manuals.
233\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
234\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
235\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
236
237\twocolwidtha{3cm}
238\twocolwidthb{8.5cm}
239\twocolspacing{2}
240
241\newcommand{\twocolitem}[2]{#1 & #2\\}
242\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
243
244\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
245{\end{tabular}\renewcommand{\arraystretch}{1}}
246
247% Specifying table rows for RTF compatibility
248\newcommand{\row}[1]{#1\\}
249
250% Use for the last ruled row for correct RTF generation.
251\newcommand{\ruledrow}[1]{#1\\\hline}
252
253% Indentation environment. Arg1 is left margin size
254\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
255{\end{list}}
256
257% Framed box of text, normal formatting.
258\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
259% Double-framed box of text.
260\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
261
262% WITHDRAWN -- can't do in RTF, easily.
263% Framed box of text, horizontally centred. Ragged right within box.
264% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
265% Double-framed box of text, horizontally centred. Ragged right within box.
266% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
267
268% toocomplex environment: simply prints the argument in LaTeX,
269% comes out verbatim in all generated formats.
270\newenvironment{toocomplex}{}{}
271
272% Colour: dummy commands since LaTeX doesn't support colour.
273% \definecolour{name}{red}{blue}{green}
274% \fcol{name}{text} ; Foreground
275% \bcol{name}{text} ; Background
276% \newcommand{\definecolour}[4]{}
277% \newcommand{\definecolor}[4]{}
278% Trickery needed to change from 0--255 to 0--1 ...
279
280\def\scalecolornum#1{%
281 \ifcase#1 0\or
282 0.004\or 0.008\or 0.012\or 0.016\or 0.020\or
283 0.024\or 0.028\or 0.032\or 0.036\or 0.040\or
284 0.044\or 0.048\or 0.052\or 0.056\or 0.060\or
285 0.064\or 0.068\or 0.072\or 0.076\or 0.080\or
286 0.084\or 0.088\or 0.092\or 0.096\or 0.100\or
287 0.104\or 0.108\or 0.112\or 0.116\or 0.120\or
288 0.124\or 0.128\or 0.132\or 0.136\or 0.140\or
289 0.144\or 0.148\or 0.152\or 0.156\or 0.160\or
290 0.164\or 0.168\or 0.172\or 0.176\or 0.180\or
291 0.184\or 0.188\or 0.192\or 0.196\or 0.200\or
292 0.204\or 0.208\or 0.212\or 0.216\or 0.220\or
293 0.224\or 0.228\or 0.232\or 0.236\or 0.240\or
294 0.244\or 0.248\or 0.252\or 0.256\or 0.260\or
295 0.264\or 0.268\or 0.272\or 0.276\or 0.280\or
296 0.284\or 0.288\or 0.292\or 0.296\or 0.300\or
297 0.304\or 0.308\or 0.312\or 0.316\or 0.320\or
298 0.324\or 0.328\or 0.332\or 0.336\or 0.340\or
299 0.344\or 0.348\or 0.352\or 0.356\or 0.360\or
300 0.364\or 0.368\or 0.372\or 0.376\or 0.380\or
301 0.384\or 0.388\or 0.392\or 0.396\or 0.400\or
302 0.404\or 0.408\or 0.412\or 0.416\or 0.420\or
303 0.424\or 0.428\or 0.432\or 0.436\or 0.440\or
304 0.444\or 0.448\or 0.452\or 0.456\or 0.460\or
305 0.464\or 0.468\or 0.472\or 0.476\or 0.480\or
306 0.484\or 0.488\or 0.492\or 0.496\or 0.500\or
307 0.504\or 0.508\or 0.512\or 0.516\or 0.520\or
308 0.524\or 0.528\or 0.532\or 0.536\or 0.540\or
309 0.544\or 0.548\or 0.552\or 0.556\or 0.560\or
310 0.564\or 0.568\or 0.572\or 0.576\or 0.580\or
311 0.584\or 0.588\or 0.592\or 0.596\or 0.600\or
312 0.604\or 0.608\or 0.612\or 0.616\or 0.620\or
313 0.624\or 0.628\or 0.632\or 0.636\or 0.640\or
314 0.644\or 0.648\or 0.652\or 0.656\or 0.660\or
315 0.664\or 0.668\or 0.672\or 0.676\or 0.680\or
316 0.684\or 0.688\or 0.692\or 0.696\or 0.700\or
317 0.704\or 0.708\or 0.712\or 0.716\or 0.720\or
318 0.724\or 0.728\or 0.732\or 0.736\or 0.740\or
319 0.744\or 0.748\or 0.752\or 0.756\or 0.760\or
320 0.764\or 0.768\or 0.772\or 0.776\or 0.780\or
321 0.784\or 0.788\or 0.792\or 0.796\or 0.800\or
322 0.804\or 0.808\or 0.812\or 0.816\or 0.820\or
323 0.824\or 0.828\or 0.832\or 0.836\or 0.840\or
324 0.844\or 0.848\or 0.852\or 0.856\or 0.860\or
325 0.864\or 0.868\or 0.872\or 0.876\or 0.880\or
326 0.884\or 0.888\or 0.892\or 0.896\or 0.900\or
327 0.904\or 0.908\or 0.912\or 0.916\or 0.920\or
328 0.924\or 0.928\or 0.932\or 0.936\or 0.940\or
329 0.944\or 0.948\or 0.952\or 0.956\or 0.960\or
330 0.964\or 0.968\or 0.972\or 0.976\or 0.980\or
331 0.984\or 0.988\or 0.992\or 0.996\or 1\else\fi
332}
333
334\let\originaldefinecolor\definecolor
335\def\definecolor#1#2#3#4{%
336 \originaldefinecolor{#1}{rgb}{%
337 \scalecolornum{#2},%
338 \scalecolornum{#3},%
339 \scalecolornum{#4}}}
340\let\definecolour\definecolor
341
342% \newcommand{\fcol}[2]{#2}
343\let\fcol\textcolor
344
345% \newcommand{\bcol}[2]{#2}
346\let\bcol\colorbox
347
348\newcommand{\sethotspotcolour}[1]{}
349\newcommand{\sethotspotunderline}[1]{}
350\newcommand{\settransparency}[1]{}
351\newcommand{\backslashraw}[0]{}
352\newcommand{\lbraceraw}[0]{}
353\newcommand{\rbraceraw}[0]{}
354\newcommand{\registered}[0]{(r)}
355\newcommand{\background}[1]{}
356% \newcommand{\textcolour}[1]{}
357\let\textcolour\color
358
359\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
360\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
361#2%
362\end{list}}
363\newcommand{\wxheading}[1]{{\bf #1}}
364\newcommand{\const}[0]{{\bf const}}
365\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
366\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
367
368\addtolength{\textwidth}{1in}
369\addtolength{\oddsidemargin}{-0.5in}
370\addtolength{\topmargin}{-0.5in}
371\addtolength{\textheight}{1in}
372\sloppy
373