Home › Forums › DITA and XMetaL Discussion › TopLeaf: map.dtd does not generate Index with DITAmap-Template › Reply To: TopLeaf: map.dtd does not generate Index with DITAmap-Template
Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-TemplateJanuary 11, 2012 at 12:16 am
Basically whatever you scan goes into the ToC. So if you scan the whole index, then that's what you get.
What you need to do is to just scan the word Index. This is where Custom Markers come in. As you know a CM is simply an XML “element” defined on the fly during the typesetting, and which can be used in the Pre/Post-content of normal elements.
So in your tl:ndx Pre-content just add the following:
then define your %IndexHead mapping to scan and assign to ToC.
Note that while a CM can have its own Pre/Post-content, in this case you can't simply say
Note that if you already have a CM for creating ToC entries, you can use this instead of IndexHead.