|
1 | 1 | :doctitle: HTML Help Output |
| 2 | +:sectnums: |
| 3 | +:toc: left |
| 4 | +:toclevels: 4 |
| 5 | + |
| 6 | +## Introduction |
2 | 7 |
|
3 | 8 | _HTML Help_ is a file format for documentation. The final documentation can be a single file with an extension `.chm` (for "_compiled html_"). It was designed by Microsoft, along with some proprietary tools to create and view it, but a number of cross-platform open-source viewers also exist now. |
4 | 9 |
|
5 | 10 | As the name suggests, the format is based on HTML. Internally, a `.chm` file is just a collection of HTML files, with some extra information. See https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help[Wikipedia] and http://msdn.microsoft.com/en-us/library/windows/desktop/ms524413(v=vs.85).aspx[Microsoft documentation] for more information. |
6 | 11 |
|
7 | 12 | link:index[PasDoc] can generate all the files necessary to create the _HTML Help_ documentation. We do not produce a ready `.chm` file -- but we generate all the prerequisites necessary, so that you can create the final file using the _Microsoft HTML Workshop_ (free download). |
8 | 13 |
|
9 | | -How to use _HTML Help_ output: |
| 14 | +## Prerequisite: HTML Help Workshop |
10 | 15 |
|
11 | | -1. Generate htmlhelp documentation with pasdoc with `--format=htmlhelp`. In addition to normal html files, pasdoc |
12 | | -will also output files `docs.hhc`, `docs.hhk` and `docs.hhp`. You can change the names of these files to something else with link:NameOption[--name option]. |
| 16 | +You need to get https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx[HTML Help Workshop]. Unfortunately, the download links (on this Microsoft page) are broken, which has been https://learn.microsoft.com/en-us/answers/questions/265752/htmlhelp-workshop-download-for-chm-compiler-instalp[reported] but seems unlikely to be fixed. |
13 | 17 |
|
14 | | -2. https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx[Download HTML Help Workshop] |
15 | | -+ |
16 | | -[NOTE] |
17 | | -==== |
18 | | -The download links on that page are broken, unfortunately. See https://learn.microsoft.com/en-us/answers/questions/265752/htmlhelp-workshop-download-for-chm-compiler-instalp[HTMLHelp Workshop - download for CHM compiler installation failed] question and answers. You can download the resources using the _Internet Archive_: |
| 18 | +Best options to get _HTML Help Workshop_ now: |
19 | 19 |
|
| 20 | +1. Get it from the _Internet Archive_: |
| 21 | ++ |
| 22 | +-- |
20 | 23 | - http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe[htmlhelp.exe] |
21 | 24 | - http://web.archive.org/web/20160314043751/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/helpdocs.zip[helpdocs.zip] |
22 | | -==== |
| 25 | +-- |
| 26 | +
|
| 27 | +2. Or install it using a https://chocolatey.org/[Chocolatey], a package manager for Windows. Install https://chocolatey.org/install[Chocolatey itself] first, using _PowerShell_, and then follow https://community.chocolatey.org/packages/html-help-workshop[installation instructions for `html-help-workshop` package]. |
| 28 | +
|
| 29 | +In both cases, after the installation the tools are in `C:\Program Files (x86)\HTML Help Workshop` directory. You can add it to your `$PATH` to easily execute `hhc` from the command line. |
| 30 | + |
| 31 | +## Usage of HTML Help output from PasDoc |
| 32 | + |
| 33 | +1. Generate documentation with pasdoc with `--format=htmlhelp`. In addition to normal HTML files, we |
| 34 | +will also output files `docs.hhc`, `docs.hhk` and `docs.hhp`. You can change the names of these files to something else with link:NameOption[--name option]. |
23 | 35 |
|
24 | | -3. Make `docs.chm` file: |
25 | | -** Interactively: run the `hhw` program from the _HTML Help Workshop_, (by default in `C:\Program Files (x86)\HTML Help Workshop`), open generated `docs.hhp` file, and run _"Compile HTML file"_ from toolbar. |
26 | | -** Or in batch mode: run `hhc docs.hhp` (make sure that the program `hhc` is on your $PATH first). |
| 36 | +2. Make `docs.chm` file: |
| 37 | +** Interactively: run the `hhw` program from the _HTML Help Workshop_, open generated `docs.hhp` file, and run _"Compile HTML file"_ from toolbar. |
| 38 | +** Or in batch mode (command line): run `hhc docs.hhp`. |
27 | 39 |
|
28 | 40 | That's it! You have `docs.chm` file, that can be viewed with _HTML Help_ viewer. |
29 | 41 |
|
|
0 commit comments