cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to highlight text around indexterm tag?

Participant

How to highlight text around indexterm tag?

Hi,

 

We have been trying to highlight contents around indexterm tag in DITA document. We are having trouble navigating the indexterm tag. The text doesn't highlight properly when we execute ACL function goto_oid with oid of <p> tag and start offset of flowers word. Instead it highlights the text [index: which appears in the indexterm tag before the flowers word (please see attached image).

 

Sample from our tag:

 <p>Some of the flowers blooming in autumn<indexterm>flowers<indexterm>, autumn</indexterm></indexterm> are: Acashia, Allium, Alstromeria</p>

 

The ACL's we used:

execute("StartOfLine;")

eval scroll_to_oid(oid_of_p_tag)

eval goto_oid(oid_of_p_tag, start_offset)

execute("CharRightExtend;")

 

What values should be replaced for start_offset parameter in the above code to highlight word flowers in indexterm tag and word Acashia next to the indexterm tag?

 

Regards

Suneel

1 REPLY 1
Highlighted

Re: How to highlight text around indexterm tag?

We are facing similar issue while highlighting the text between <fig>, <note> and <step> tags. We are looking for the ACL which tells us the offset adjustment to highlight the text between these tags.

 

For <indexterm> tag, currently we are using workaround to increment the offset position by 21 characters if there is single <indexterm> tag, else increment the position by 31 characters for more that one <indexterm> tags. Also increment the offset positon by four characters per <indexterm> tag.

 

We want to get rid of above calculation and expert Arbortext command to provide us some information on offset adjustment.

 

Announcements