]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/texhelp.sty
define _HPUX_SOURCE under HP-UX, otherwise many things are not defined in standard...
[wxWidgets.git] / docs / latex / wx / texhelp.sty
CommitLineData
a660d684
KB
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
f9364785
VZ
85% C++ argument in the documentation text
86\newcommand{\arg}[1]{{\it #1}}
87
5147a986
VS
88% true and false keywords:
89\newcommand{\true}{{\tt true}}
90\newcommand{\false}{{\tt false}}
91
a660d684
KB
92% CLIPS Parameter: a type and a name (one intervening space)
93\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
94
95% Class: puts in index
96\newcommand{\class}[1]{#1\index{#1}}
97
98%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
99
100% Void type
101\newcommand{\void}{{\it void}}
102
103% Typeset destructor
104\newcommand{\destruct}[1]{{$\sim$}#1}
105
106% Typeset insert/extract operators
107\newcommand{\cinsert}{$<<$}
108\newcommand{\cextract}{$>>$}
109
5d81432a
HH
110% pythonnote: A note about the wxpython interface.
111%\newcommand{\pythonnote}[1]{{\bf wxPython note: }#1}
112\newcommand{\pythonnote}[1]{{}}
5873607e 113\newcommand{\perlnote}[1]{{}}
a660d684
KB
114
115% =================== Hypertext facilities ===================
116%
117% To insert hyperlinks (or references, in Latex), \label the sections
118% or membersections \label{ref-label} immediately after the section, on the same line,
119% and use \helpref{text-to-show}{ref-label} to make a reference.
120%
121
122% Type text with section reference
123\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
124
125% Type text with URL in verbatim mode
126\newcommand{\urlref}[2]{#1 (\verb$#2$)}
127
128% Don't typeset section number in LaTeX
129\newcommand{\helprefn}[2]{{\it #1}}
130
131% Like helpref, but popup text in WinHelp instead of hyperlinked
132\newcommand{\popref}[2]{{\it #1}}
133
134% Like footnote, but popup text.
135\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
136
137% =================== On-line help specific macros ===================
138%
139
140% Global document font size/family, help only.
141\newcommand{\helpfontsize}[1]{}
142\newcommand{\helpfontfamily}[1]{}
143
144% Ignore in all on-line help
145\newcommand{\helpignore}[1]{#1}
146% Only print in all on-line help
147\newcommand{\helponly}[1]{}
148
149% Ignore in LaTeX
150\newcommand{\latexignore}[1]{}
151% Only print in LaTeX
152\newcommand{\latexonly}[1]{#1}
153
154% Ignore in linear RTF
155\newcommand{\rtfignore}[1]{#1}
156% Only print in linear RTF
157\newcommand{\rtfonly}[1]{}
158
159% Ignore in WinHelp RTF
160\newcommand{\winhelpignore}[1]{#1}
161% Only print in WinHelp RTF
162\newcommand{\winhelponly}[1]{}
163
164% Ignore in wxHelp
165\newcommand{\xlpignore}[1]{#1}
166% Only print in wxHelp
167\newcommand{\xlponly}[1]{}
168
169% Ignore in HTML
170\newcommand{\htmlignore}[1]{#1}
171% Only print in HTML
172\newcommand{\htmlonly}[1]{}
173
174% Input a file only for help system (binder thickness is not a limitation
175% in help systems!)
176\newcommand{\helpinput}[1]{}
177
178\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
179
180% =================== Miscellaneous macros ===================
181%
182% Headings consistent with generated ones
183\newcommand{\myheading}[1]{\vspace*{25pt}
184\begin{flushleft}
185{\LARGE \bf #1}
186\end{flushleft}
187\vskip 20pt
188}
189
190% Heading with entry in contents page.
191\newcommand{\chapterheading}[1]{\myheading{#1}
192\addcontentsline{toc}{chapter}{#1}}
193
194\newcommand{\sectionheading}[1]{\myheading{#1}
195\addcontentsline{toc}{section}{#1}}
196
197% Glossary environment
198\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
199
200% Glossary entry
201\newcommand{\gloss}[1]{\item[#1]\index{#1}}
202
203% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
204\newcommand{\image}[2]{\psboxto(#1){#2}}
205
206% Image, left aligned (HTML)
207\newcommand{\imager}[2]{\psboxto(#1){#2}}
208
209% Image, right aligned (HTML)
210\newcommand{\imagel}[2]{\psboxto(#1){#2}}
211
212% Imagemap: principally for HTML only. In Latex,
213% acts like \image.
214\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
215
216% Headers and footers
217% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
218% {OddPageLeft}{OddPageCentre}{OddPageRight}
219\newcommand{\setheader}[6]{
220\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
221\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
222\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
223}
224
225% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
226% {OddPageLeft}{OddPageCentre}{OddPageRight}
227\newcommand{\setfooter}[6]{
228\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
229\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
230\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
231}
232
233% Needed for telling RTF where margin paragraph should go
234% in mirrored margins mode.
235\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
236\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
237
238% Environment for two-column table popular in WinHelp and manuals.
239\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
240\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
241\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
242
243\twocolwidtha{3cm}
244\twocolwidthb{8.5cm}
245\twocolspacing{2}
246
247\newcommand{\twocolitem}[2]{#1 & #2\\}
248\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
249
250\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
251{\end{tabular}\renewcommand{\arraystretch}{1}}
252
253% Specifying table rows for RTF compatibility
254\newcommand{\row}[1]{#1\\}
255
256% Use for the last ruled row for correct RTF generation.
257\newcommand{\ruledrow}[1]{#1\\\hline}
258
259% Indentation environment. Arg1 is left margin size
260\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
261{\end{list}}
262
263% Framed box of text, normal formatting.
264\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
265% Double-framed box of text.
266\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
267
268% WITHDRAWN -- can't do in RTF, easily.
269% Framed box of text, horizontally centred. Ragged right within box.
270% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
271% Double-framed box of text, horizontally centred. Ragged right within box.
272% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
273
274% toocomplex environment: simply prints the argument in LaTeX,
275% comes out verbatim in all generated formats.
276\newenvironment{toocomplex}{}{}
277
278% Colour: dummy commands since LaTeX doesn't support colour.
279% \definecolour{name}{red}{blue}{green}
280% \fcol{name}{text} ; Foreground
281% \bcol{name}{text} ; Background
282\newcommand{\definecolour}[4]{}
283\newcommand{\definecolor}[4]{}
284\newcommand{\fcol}[2]{#2}
285\newcommand{\bcol}[2]{#2}
286\newcommand{\sethotspotcolour}[1]{}
287\newcommand{\sethotspotunderline}[1]{}
288\newcommand{\settransparency}[1]{}
289\newcommand{\backslashraw}[0]{}
290\newcommand{\lbraceraw}[0]{}
291\newcommand{\rbraceraw}[0]{}
292\newcommand{\registered}[0]{(r)}
293\newcommand{\background}[1]{}
294\newcommand{\textcolour}[1]{}
295\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
296\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
297#2%
298\end{list}}
299\newcommand{\wxheading}[1]{{\bf #1}}
300\newcommand{\const}[0]{{\bf const}}
301\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
302\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
303
81d66cf3
JS
304\addtolength{\textwidth}{1in}
305\addtolength{\oddsidemargin}{-0.5in}
306\addtolength{\topmargin}{-0.5in}
307\addtolength{\textheight}{1in}
308\sloppy
309