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