Skip to main content
Inspiring
February 17, 2016
Question

Use <h1 id=xyz> as bookmark anchors for auto-create TOC

  • February 17, 2016
  • 1 reply
  • 633 views

I am converting 11 HTM files into a Responsive HTML5 help file. These HTML files were generated during a translation from English to Italian using a Word source.

Rather than traditional anchor tags (<a name="">, this document identifies named headers using the id tag, such as <H1 id=my_target>My targets</h1>

Robohelp does not appear to recognize these as bookmarks for the auto-create TOC. As the files are in Italian (and I don't speak Italian), and there are thousands of topics, I need to use the auto-create feature.

Does anyone know how to get configure Robohelp to recognize these ids as bookmarks for the purposes of auto-creating the TOC?

Note that the internal hyperlinks to these locations do work properly.

I'm using Robohelp 2015 on Windows 7.

Thanks in advance!

  --Amy

This topic has been closed for replies.

1 reply

Willam van Weelden
Inspiring
February 20, 2016

Do you want RoboHelp to create the bookmarks also for the H1 tags? Or just one for every topic?

I would personally create a small script that would move the id's into bookmarks so that it would work. If you're interested, I can try to whip something basic up that can do that for your entire project.

AMCGracerAuthor
Inspiring
May 3, 2016

Hi William,

I'd like bookmarks for all H1, H2, and H3 tags, and I'd like to autocreate the TOC from that. Are you saying that this is possible with the script?

Not possible for Robohelp to process the ID tags though?

Thanks so much for your help.

--Amy

Willam van Weelden
Inspiring
May 5, 2016

Hi Amy,

Try the following script: moveAnchorIdToName.jsx - Google Drive Make sure to create a backup of the projcect!

This script will do the following: It goes through every topic. Whenever it encounters a hyperling (a) with an id, it will copy the id to the name attribute. Whenever another element has an id attribute, it will move it over to the name.

Please note that this script simply copies the text of the hyperlink. Getting it to pick up the text in the heading is possible as well. But that is considerable more work to do right. If you would like a more advanced solution, please contact met at contact (at) wvanweelden (dot) eu.