7 % Style file to enable the simultaneous preparation of printed LaTeX and on-line
9 % Use in conjunction with Tex2RTF (see Tex2RTF documentation).
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.
17 % Artificial Intelligence Applications Institute
20 % ============== C++/CLIPS Documentation Facilities ==============
22 % Each class definition should be typeset with e.g.
24 % \section{\class{Name}: Parent}
26 % followed by a description of the class.
27 % Each member should follow:
29 % \membersection{wxName::Member}
31 % with a description of what this member does.
32 % Then, one (or more if overloaded) member (function) in detail:
34 % \func{return type}{name}{args}
38 % where args is a list of \param{type}{name}, ...
43 % void DoIt(char *string);
47 % \func{void}{DoIt}{\param{char *}{string}}
50 \newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
51 {{\it #1} {\bf #2}\index{#2}}(#3)}
53 % For function/type definition where the name is a pointer,
56 % typedef void (*wxFunction)(wxObject&)
60 % \pfunc{typedef void}{wxFunction}{param{wxObject&}}
62 \newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
63 {{\it #1} ({\bf *#2})\index{#2}}(#3)}
65 % Use an ordinary \section command for class name definitions.
67 % This is used for a member, such as wxBitmap: GetDepth
68 \newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
71 \newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
72 {{\bf #1} ({\bf #2}\index{#2}}#3)}
74 \newcommand{\clipssection}[1]{\chapter{#1}}
76 % This is used for a CLIPS function name
77 \newcommand{\functionsection}[1]{\subsection*{#1}}
79 % Member: a type and a name
80 \newcommand{\member}[2]{{\bf #1 \it #2}}
82 % C++ Parameter: a type and a name (no intervening space)
83 \newcommand{\param}[2]{{\it #1}{\bf #2}}
85 % CLIPS Parameter: a type and a name (one intervening space)
86 \newcommand{\cparam}[2]{{\bf #1} {\it #2}}
88 % Class: puts in index
89 \newcommand{\class}[1]{#1\index{#1}}
92 \newcommand{\void}{{\it void}}
95 \newcommand{\destruct}[1]{{$\sim$}#1}
97 % Typeset insert/extract operators
98 \newcommand{\cinsert}{$<<$}
99 \newcommand{\cextract}{$>>$}
102 % =================== Hypertext facilities ===================
104 % To insert hyperlinks (or references, in Latex), \label the sections
105 % or membersections \label{ref-label} immediately after the section, on the same line,
106 % and use \helpref{text-to-show}{ref-label} to make a reference.
109 % Type text with section reference
110 \newcommand{\helpref}[2]{{\it #1} (section \ref{#2}) }
112 % Type text with URL in verbatim mode
113 \newcommand{\urlref}[2]{#1 (\verb$#2$)}
115 % Don't typeset section number in LaTeX
116 \newcommand{\helprefn}[2]{{\it #1}}
118 % Like helpref, but popup text in WinHelp instead of hyperlinked
119 \newcommand{\popref}[2]{{\it #1}}
121 % Like footnote, but popup text.
122 \newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
124 % =================== On-line help specific macros ===================
127 % Global document font size/family, help only.
128 \newcommand{\helpfontsize}[1]{}
129 \newcommand{\helpfontfamily}[1]{}
131 % Ignore in all on-line help
132 \newcommand{\helpignore}[1]{#1}
133 % Only print in all on-line help
134 \newcommand{\helponly}[1]{}
137 \newcommand{\latexignore}[1]{}
138 % Only print in LaTeX
139 \newcommand{\latexonly}[1]{#1}
141 % Ignore in linear RTF
142 \newcommand{\rtfignore}[1]{#1}
143 % Only print in linear RTF
144 \newcommand{\rtfonly}[1]{}
146 % Ignore in WinHelp RTF
147 \newcommand{\winhelpignore}[1]{#1}
148 % Only print in WinHelp RTF
149 \newcommand{\winhelponly}[1]{}
152 \newcommand{\xlpignore}[1]{#1}
153 % Only print in wxHelp
154 \newcommand{\xlponly}[1]{}
157 \newcommand{\htmlignore}[1]{#1}
159 \newcommand{\htmlonly}[1]{}
161 % Input a file only for help system (binder thickness is not a limitation
163 \newcommand{\helpinput}[1]{}
165 \newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
167 % =================== Miscellaneous macros ===================
169 % Headings consistent with generated ones
170 \newcommand{\myheading}[1]{\vspace*{25pt}
177 % Heading with entry in contents page.
178 \newcommand{\chapterheading}[1]{\myheading{#1}
179 \addcontentsline{toc}{chapter}{#1}}
181 \newcommand{\sectionheading}[1]{\myheading{#1}
182 \addcontentsline{toc}{section}{#1}}
184 % Glossary environment
185 \newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
188 \newcommand{\gloss}[1]{\item[#1]\index{#1}}
190 % Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
191 \newcommand{\image}[2]{\psboxto(#1){#2}}
193 % Image, left aligned (HTML)
194 \newcommand{\imager}[2]{\psboxto(#1){#2}}
196 % Image, right aligned (HTML)
197 \newcommand{\imagel}[2]{\psboxto(#1){#2}}
199 % Imagemap: principally for HTML only. In Latex,
201 \newcommand{\imagemap}[3]{\psboxto(#1){#2}}
203 % Headers and footers
204 % \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
205 % {OddPageLeft}{OddPageCentre}{OddPageRight}
206 \newcommand{\setheader}[6]{
207 \lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
208 \chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
209 \rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
212 % \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
213 % {OddPageLeft}{OddPageCentre}{OddPageRight}
214 \newcommand{\setfooter}[6]{
215 \lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
216 \cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
217 \rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
220 % Needed for telling RTF where margin paragraph should go
221 % in mirrored margins mode.
222 \newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
223 \newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
225 % Environment for two-column table popular in WinHelp and manuals.
226 \newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
227 \newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
228 \newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
234 \newcommand{\twocolitem}[2]{#1 & #2\\}
235 \newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
237 \newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
238 {\end{tabular}\renewcommand{\arraystretch}{1}}
240 % Specifying table rows for RTF compatibility
241 \newcommand{\row}[1]{#1\\}
243 % Use for the last ruled row for correct RTF generation.
244 \newcommand{\ruledrow}[1]{#1\\\hline}
246 % Indentation environment. Arg1 is left margin size
247 \newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
250 % Framed box of text, normal formatting.
251 \newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
252 % Double-framed box of text.
253 \newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
255 % WITHDRAWN -- can't do in RTF, easily.
256 % Framed box of text, horizontally centred. Ragged right within box.
257 % \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
258 % Double-framed box of text, horizontally centred. Ragged right within box.
259 % \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
261 % toocomplex environment: simply prints the argument in LaTeX,
262 % comes out verbatim in all generated formats.
263 \newenvironment{toocomplex}{}{}
265 % Colour: dummy commands since LaTeX doesn't support colour.
266 % \definecolour{name}{red}{blue}{green}
267 % \fcol{name}{text} ; Foreground
268 % \bcol{name}{text} ; Background
269 \newcommand{\definecolour}[4]{}
270 \newcommand{\definecolor}[4]{}
271 \newcommand{\fcol}[2]{#2}
272 \newcommand{\bcol}[2]{#2}
273 \newcommand{\sethotspotcolour}[1]{}
274 \newcommand{\sethotspotunderline}[1]{}
275 \newcommand{\settransparency}[1]{}
276 \newcommand{\backslashraw}[0]{}
277 \newcommand{\lbraceraw}[0]{}
278 \newcommand{\rbraceraw}[0]{}
279 \newcommand{\registered}[0]{(r)}
280 \newcommand{\background}[1]{}
281 \newcommand{\textcolour}[1]{}
282 \newcommand{\overview}[2]{See \helpref{#1}{#2}.}