Home Forums DITA and XMetaL Discussion TOPLEAF: Changing bookmark levels based on context Reply To: TOPLEAF: Changing bookmark levels based on context

gjn2066

Reply to: TOPLEAF: Changing bookmark levels based on context

Simple answer “yes”. Detailed answer follows:

Firstly, there will be an upgraded TopLeaf plugin for XMetaL 7. This will allow custom markers both to have context and to be part of the context of normal elements (eg. when previously scanned material is re-used).

In the meantime there are several methods for tracking context indirectly. Simplest is to have a user defined variable {Location} (or some such):

  • In $document use
     
    to set the default value.
  • In frontmatter (or preface if you use that)
      <[u]stack[/u] var="Location" string="preface">
    will temporarily change the value of {Location} to preface. We use stack rather than set so the value reverts when we leave the preface.
  • Same technique is used for appendix.

We can now use a switch statement:

 
 

     … handle preface levels …
 
  …
 

to take care of any special handling.

To say more I'd need to know more about your markup details. DITA is after all a very broad church and numerous variants are possible.

Let me know if this works for you, as there are alternatives if this doesn't suit.

Geoff

Reply

Products
Downloads
Support