]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/htmlhlpf.tex
Misc small changes, some for VC++ 1.5
[wxWidgets.git] / docs / latex / wx / htmlhlpf.tex
1 \section{Help Files Format}\label{helpformat}
2
3 wxHTML library uses a reduced version of MS HTML Workshop format.
4 Tex2RTF can produce these files when generating HTML, if you set {\bf htmlWorkshopFiles} to {\bf true} in
5 your tex2rtf.ini file.
6
7 (See \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} for help controller description.)
8
9 A {\bf book} consists of three files : header file, contents file and index file.
10
11 \wxheading{Header file (.hhp)}
12
13 Header file must contain these lines (and may contain additional lines which are ignored) :
14
15 \begin{verbatim}
16 Contents file=@filename.hhc@
17 Index file=@filename.hhk@
18 Title=@title of your book@
19 Default topic=@default page to be displayed.htm@
20 \end{verbatim}
21
22 All filenames (including the Default topic) are relative to the
23 location of .hhp file.
24
25 {\bf Localization note:} In addition, .hhp file may contain line
26
27 \begin{verbatim}
28 Charset=@rfc_charset@
29 \end{verbatim}
30
31 which specifies what charset (e.g. "iso8859\_1") was used in contents
32 and index files. Please note that this line is incompatible with
33 MS HTML Help Workshop and it would either silently remove it or complain
34 with some error. See also
35 \helpref{Writing non-English applications}{nonenglishoverview}.
36
37 \wxheading{Contents file (.hhc)}
38
39 Contents file has HTML syntax and it can be parsed by regular HTML parser. It contains exactly one list
40 (\verb$<ul>$....\verb$</ul>$ statement):
41
42 \begin{verbatim}
43 <ul>
44
45 <li> <object>
46 <param name="Name" value="@topic name@">
47 <param name="ID" value=@numeric_id@>
48 <param name="Local" value="@filename.htm@">
49 </object>
50 <li> <object>
51 <param name="Name" value="@topic name@">
52 <param name="ID" value=@numeric_id@>
53 <param name="Local" value="@filename.htm@">
54 </object>
55 ...
56
57 </ul>
58 \end{verbatim}
59
60 You can modify value attributes of param tags. {\it topic name} is name of chapter/topic as is displayed in
61 contents, {\it filename.htm} is HTML page name (relative to .hhp file) and {\it numeric\_id} is optional
62 - it is used only when you use \helpref{wxHtmlHelpController::Display(int)}{wxhtmlhelpcontrollerdisplay}
63
64 Items in the list may be nested - one \verb$<li>$ statement may contain a \verb$<ul>$ sub-statement:
65
66 \begin{verbatim}
67 <ul>
68
69 <li> <object>
70 <param name="Name" value="Top node">
71 <param name="Local" value="top.htm">
72 </object>
73 <ul>
74 <li> <object>
75 <param name="Name" value="subnode in topnode">
76 <param name="Local" value="subnode1.htm">
77 </object>
78 ...
79 </ul>
80
81 <li> <object>
82 <param name="Name" value="Another Top">
83 <param name="Local" value="top2.htm">
84 </object>
85 ...
86
87 </ul>
88 \end{verbatim}
89
90 \wxheading{Index file (.hhk)}
91
92 Index files have same format as contents file except that ID params are ignored and sublists are {\bf not}
93 allowed.
94