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

TOC problems, again

jonas.karlsson
1-Newbie

TOC problems, again

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="&lt;chaptertitlefmt">,#CONTENT,</chaptertitlefmt>">
<savetext textid="tocnr" conrule="&lt;tocnrfmt">,pagestr[BO],</tocnrfmt>">
<savetext textid="tocstr" conrule="&lt;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

4 REPLIES 4


What does your IV declaration look like? Does it include scope="chapter"?

Jonas Karlsson wrote:
>
> 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"&lt;br"/>> 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"&lt;br"/>> conrule="<chaptertitlefmt>,#CONTENT,</chaptertitlefmt>">
> <savetext textid="tocnr" conrule="&lt;tocnrfmt">,pagestr[BO],</tocnrfmt>">
> <savetext textid="tocstr"&lt;br"/>> conrule="<chaptertocstrfmt>,titlestr,+2mm,dot.fill,+2mm,level1.ct,\:\,to
> cnr,\ - \,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
>

--
/* Andy Esslinger - Lockheed Martin Aeronautics Company
(817) 777 1590 LM Aero F-22 TOD (Technical Order Data)
This is a proprietary business e-mail address. Do NOT release
to any other party. #INCLUDE STANDARD DISCLAIMER */


Jonas,

Have you set the <stringdecl> 'status' to "1" for the end of chapter page
counter? The <stringdecl> (located in the <rsrcdesc> after the counters)
'status' of "1" makes that counter time independent, rather than time
dependent. What you may need to do if setting the status doesn't work is
have an end of chapter string for each chapter and the counter for each
chapter become time independent (status=1). If you have to go the latter
route, don't forget to reset your chapter page count each time a chapter
tag is encountered.

I had to make a TOC for a multi-volume document. I got the master TOC for
the document and the TOC for each volume to work with a single variable
each (master and volume). The chapter TOCs for inside each volume were
giving me the either the same number all the time (I forgot to set the
status to 1), or gave me the TOC for the previous chapter. Thus the need
for multivariables on some occasions.

Hope this helps a bit.

Lynn E. Hales
Information Technology Consultant
lhales@csc.com
(757)262-3495

"Jonas Karlsson" <jonas.karlsson@sorona.se>@arbortext.com on 01/15/2001

When I set scope="chapter" nothing at all prints in total page nbr area of
the TOC;
Chapter title..................................1:1 - 1:

thanks

Jonas

Lynn,

Setting 'status' to '1' did unfortunately not help. I will try the other way
you described.

thanks a lot for your help,

Jonas
Announcements