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