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

Auto Generated Bookmark Nesting Issue

SarahPrice
5-Regular Member

Auto Generated Bookmark Nesting Issue

I'm using the atidmd:DocumentMetaData tag to produce automatic bookmarks however I cannot get it to nest correctly. I have a chapter level title that I'm capturing then a subpara title within the chapter.


My string declaration is as follows:


Chapter Level: <stringdecl textid="chapbmtitle.txt" hotlink="1">


Subpara Level: <stringdecl textid="para0bmtitle.txt" hotlink="1">


My savetext for the chapter and subpara tagsare as follows:


Chapter Level: <savetext textid="chapbmtitle.txt" conrule="!&lt;atidmd:Bookmark state="closed"&gt;&lt;atidmd:Title&gt;!,\CHAPTER \,chapnbrtxt,\. \,chptitle,!&lt;/atidmd:Title&gt;!,para0bmtitle.txt,!&lt;/atidmd:Bookmark&gt;!" placemnt="after" append="1">


Subpara Level: <savetext textid="para0bmtitle.txt" conrule="!&lt;atidmd:Bookmark"><atidmd:title>!,para0bmNum.txt,\ \,p0title,!</atidmd:title></atidmd:bookmark>!" placemnt="before" append="1">


My usetext on the root tag is as follows:


<usetext<br/>source='!<atidmd:documentmetadata>
<atidmd:outline>
!,chapbmtitle.txt,!
</atidmd:outline>
</atidmd:documentmetadata>!' placemnt="after"></usetext>


My result is the Subpara Titles under Chapter 1 is showing up under Chapter 2. If I change the status of my string declaration for the para0bmtitle.txt to 1 then I get all the subpara titlesfrom each chapter listed under each chapter bookmark.


I'm using Arbortext 6.0 M020 - Direct to PDF. Any help would be greatly appreciated.


6 REPLIES 6

What happens if you change the status to 1 and the append to 0?

SarahPrice
5-Regular Member
(To:SarahPrice)

I changed the append to 0 on the para0bmtitle.txt and the status to 1 on the para0bmtitle.txt string declaration, I get the LAST subpara level title nested under Chapter 1 and Chapter 2 bookmarks.


When you say the Chapter 1 subpara titles are showing up under Chapter
2, do you mean they're only under Chapter 2, or under both Chapter 1
and 2?

I'd guess you just need to reset para0bmtitle.txt between chapters by
adding something like this to your chapter e-i-c:

<savetext textid="para0bmtitle.txt" conrule="\\" placemnt="before">

You might also set placemnt="after" on the Subpara bookmark savetext,
just for consistency. I'd expect you'd need that for it to get the
title, anyway, unless you're using XPath or a status="1" string
variable.

-Brandon 🙂


SarahPrice
5-Regular Member
(To:SarahPrice)

Thanks for your response.

When I add in the savetext to reset the para0bmtitle.txt I get all the subpara titles that are under chapter 2 nested under both chapter 1 and chapter 2. :-(!

And yes I do have my string declaration set to at status of 1.

Sarah

Setting a string declaration's status to 1 makes it a
"time-independent" variable, which means that any references to its
value will be deferred and resolved "in the future" (on another
formatting pass), after the formatter has finished with the variable's
scope, which is the whole document, by default, but can be set to some
element, like a chapter.

You don't want this behavior. You're building each chapter's
bookmarks at the end of that chapter and all of the information you
need is present when you reach that point, so there's no need for the
time-independent variable. Remove the status="1" and I think you
should get what you want.

-Brandon 🙂


SarahPrice
5-Regular Member
(To:SarahPrice)

As always your explanation and suggestion worked like a charm!!! :-)!!! Thanks so much!!!

Sarah
Announcements