DITA > CHM default topic

Post here questions and problems related to editing and publishing DITA content.
rpraleigh
Posts: 6
Joined: Mon Aug 08, 2016 5:56 pm

DITA > CHM default topic

Post by rpraleigh »

I tried setting the args.htmlhelp.default.topic parameter for CHM output, but apparently I'm doing something wrong, because I can't get the default topic to change. The topic I want to appear when the .CHM file is opened is intro.html. The parameter description says to specify the topic name relative to the output directory. As output, intro.html appears in the same directory as the .CHM output, so I would assume that I don't have to specify a relative path. I'm a little confused by the example provided in the description, however: "topics\\intro.html". Why the two backslashes? I also tried "topics\\intro.html" (since the filename in the example happens to be the same as the one I want to use as the default topic), but that didn't make any difference. Any ideas about what I might be doing wrong?
adrian
Posts: 2853
Joined: Tue May 17, 2005 4:01 pm

Re: DITA > CHM default topic

Post by adrian »

Hi,

This may depend on the version of DITA-OT being used. What version of Oxygen (Help > About) and/or DITA-OT (Options > Preferences, DITA or in the scenario settings, Parameters > dita.dir) are you using?

Note that the folder may not necessarily be "topics". This depends on where your "intro.dita" file is located in the file system relative to the published .ditamap (or intro.html relative to the .chm in the output folder).

e.g.
If you have it structured like this in the file system:
- mymap.ditamap
- myfolder \ mytopic.dita
where mymap.ditamap is the map being published to CHM and "mytopic.dita" is the topic you want to set as default (placed in the "myfolder" folder).
You need to set args.htmlhelp.default.topic to "myfolder\mytopic.html" (without the quotes).
As output, intro.html appears in the same directory as the .CHM output, so I would assume that I don't have to specify a relative path.
If you want to rely on what's in the output folder, clean the output folder first and run a new transformation. If it is on the same level (same folder) as the .ditamap (or .chm if you consider the output), no relative path is needed, you can simply use the name of the .html file (intro.html) as the value of the argument (args.htmlhelp.default.topic=intro.html).

The double backslash (backslash escaping in path) was necessary at one time (older versions of DITA-OT). You can check the DITA-OT output log, they should be automatically escaped now. It is not necessary to manually escape the path, at least since DITA-OT 1.8.5/Oxygen v17.0 (probably 1.8.x, but I have not tested with older versions).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply