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