Hi Adepters,
My first mail lost some of it's content on the way, so I give it another try...
I have a little FOSI-problem that I would be happy if anyone could help me with.
I have a document type which consists of a manual with chapters and sections in it. I want to produce a TOC with the following look:
Chapter 1 title...................1:1 - 1:12
section title................................1:1
section title................................1:2
section title................................1:3
Chapter 2 title....................2:1 - 2:23
section title.................................2:1
section title.................................2:2
The numbers after the chapter title are "chapter nbr":"chapter start page nbr" - "chapter nbr":"chapter end page nbr".
My fosi constructions works fine except the for the counting of the total page number in each chapter, which I need for producing the "chapter end page nbr". The TOC keeps producing the last chapter's last page number in all chapter title rows. That is, if the last chapter of the manual has 4 pages the TOC indicates that all chapter consists of 4 pages.
I have tried a lot of different things but I just can't get it right.
In my chapter eic I have a savetext that uses the "pagestr" string declared in my page model. pagestr uses a counter, page.ct, which is enumerated in the page model.
<e-i-c gi="chapter">
<charlist>
<textbrk startpg="next" pageid="body.pg" startln="1" endln="1">
<savetext textid="totalpgct" conrule="pagestr[BO]" placemnt="after" append="0">
<reset resetlist="page.ct">
</e-i-c>
In the eic for title in chapter I save the output for the chapter line in the TOC.
<e-i-c gi="title" context="chapter">
<charlist>
<textbrk startpg="next" startln="1" endln="1">
<savetext textid="titlestr" conrule="<chaptertitlefmt">,#CONTENT,</chaptertitlefmt>">
<savetext textid="tocnr" conrule="<tocnrfmt">,pagestr[BO],</tocnrfmt>">
<savetext textid="tocstr" conrule="<chaptertocstrfmt">,titlestr,+2mm,dot.fill,+2mm,level1.ct,\:\,tocnr,\ - \,level1.ct,\:\,totalpgct,</chaptertocstrfmt>"
placemnt="after" append="1">
<textbrk startln="1" endln="1"></subchars>
</usetext>
</charlist>
</e-i-c>
many thanks in advance
Jonas Karlsson
Sorona Innovation AB
Ideon Research Park
SE-223 70 Lund, Sweden Phone: +46 (0)46 286 88 30
Fax: +46 (0)46 286 88 39
Mobile: +46 (0)733 519 209