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

Add custom links in a table of contents

nlg_admin
3-Visitor

Add custom links in a table of contents

Hi all,

I'm pretty lost here and would appreciate any help/hint that comes my way. First of all, I'm working with Arbortext 7 with Styler.

I have a TOC element in my XML and also a "list of shortcuts" (holds definitions) and an "index". All 3 of them are auto generated and by rules in the DTD no title elements are allowed. Actually, no child elements are allowed in any of them.

I would like to create 2 entries/links in the TOC (published to PDF). 1 for the index and the second for the list of shortcuts. I need only the titles and page numbers in the same format as the rest of the TOC entries.

The TOC of the document is configured to read only "title" elements/context so I'm not able to add anything else.

Thanks in advance for any ideas thrown this way.

Tasos

4 REPLIES 4

If your TOC is being auto-generated, and it needs to have extra stuff in it, then you need to change the auto-generation procedure for the TOC. Seeing as you have Arbortext Styler, you will be able to edit the stylesheet, find the TOC context and look at how it is generating. You then need to either change the generation procedure to add the LoS and Index items, or, change how the LoS and Index items are generating their titles so they are picked up by the TOC.

Dear Gareth,

thank you for the reply. The TOC is generated in the generated-after text and that is controlled by me. The index and LOS do not contain any titles and they are not allowed to by the DTD.

I tried to insert links in the generated-before text of the TOC, but cannot make it. Maybe you could share some help with that?

Thank you!

I know the Index and LoS will not have titles according to your DTD, but the way that Arbortext works is that it will generate temporary elements during publishing. These temporary elements will include the Index and LoS (including the titling that appears on the page - presumably that is the same text you need in the TOC).

Another way to look at it is that you start with the actual document then, during publishing, Arbortext creates an enriched version of your document which it will then PDF. My suggestion was to grab that enriched content for your TOC, after the Index and LoS have been expanded and generated, but before PDF. It is likely the Index and LoS are generated as UFEs, in case that helps you.

It is hard to provide precise advice without seeing the gentext code you have, but I don't really have time to spend on the code anyway. If you need more help or training then our company GPSL (www.gpsl.co) would be happy to assist.

I see. Well thank you Gareth. I will give it a shot with what you suggest. Hopefully I'll make it.

Thank a mil for your help!

Announcements