Page 1 of 1

Link index to specific point in topic in chm output

Posted: Thu May 20, 2021 2:39 pm
by Ronser
Hi

I am migrating from Robohelp chm output to Oxygenxml out-of-the-box chm output. In Robohelp, the index links to specific points in long topics. In OxygenXML, I tried adding the <indexterm> element within a <p> tag in a topic. However, in the chm output, when I double-click an entry in the Index tab, it always links only to the start of the topic, not to the specific <p> tag where the <indexterm> element exists.

Is there are way to get the index to link to specific points in the topic in chm output?

Thanks for your help

Re: Link index to specific point in topic in chm output

Posted: Mon May 24, 2021 9:34 am
by Radu
Hi,

I will assume you are publishing DITA XML content to CHM using Oxygen XML Editor.
Oxygen uses the DITA Open Toolkit engine for publishing DITA to various output formats.
I'm afraid there is no parameter to control this behavior, the index page is generated by creating links for each index term to its original topic. Probably the idea is that with DITA topics are quite small so it does not matter if you refer to a specific paragraph or to an entire topic containing that paragraph. For example in the Oxygen user guide we define all index terms directly in the topic prolog, so we do not define index terms inside other block level elements.
I'm not sure how an improvement to link directly to the element containing the index term could be done. The index is created with Java code and also those <p> elements which have <indexterm> elements inside them may not have ID attributes set on them, making it somehow necessary to auto generate ID values for them in order for the links to work.

Regards,
Radu

Re: Link index to specific point in topic in chm output

Posted: Mon May 24, 2021 12:52 pm
by Ronser
Hi Radu,

Thanks for your response. The legacy content is does not follow best practices of modular content, so hence the awkward very long topics. I guess I will just need to rework the content at a later revision. I was just a bit confused as the instructions here (https://www.oxygenxml.com/dita/1.3/spec ... xterm.html) seemed to say it was possible to insert an indexterm elements outside of the topic prolog, for example:

Code: Select all

<p><indexterm>databases</indexterm>Databases are used to ...</p>
Thanks anyway

Re: Link index to specific point in topic in chm output

Posted: Mon May 24, 2021 1:05 pm
by Radu
Hi,

You can insert index terms indeed in various DITA elements, for the PDF based output this is taken into account, as the index page will list the number of the page on which the indexterm was defined. I think indexterms were mostly considered as useful for PDF, in the plain HTML output they are not taken into account at all, in the CHM they are interpreted as you saw, and in our own WebHelp output we generate an index page which again just references topics and not elements inside topics.

Regards,
Radu