multiple table of contents

I wish to insert multiple table of contents in a Pages '09 document (table of contents, table of figures etc). Each table of contents is separated by a section break. I am unable to specify different paragraph styles for each table of contents. Either paragraph styles I specify for a particular table of contents change when I specify paragraph style for a different table of contents or I am unable to specify paragraph styles at all for any table of contents.
Can anyone help?

MacBook Pro and PowerBook G4, Mac OS X (10.5.6)

Posted on May 5, 2009 9:34 PM

Reply
10 replies

May 6, 2009 2:38 AM in response to PeterBreis0807

You are wrong Peter.

Page 61 of the English User Guide we may read:


Creating and Updating a Table of Contents
Each table of contents (TOC) you create using a Word Processing template lists only
the content that follows it, up until the next table of contents. If you want a master
table of contents for the entire document, it must be the only table of contents, and it
must be at the beginning of the document.


Yvan KOENIG (from FRANCE mercredi 6 mai 2009 11:38:01)

May 6, 2009 2:32 PM in response to PeterBreis0807

I'm not eager ! You just wrote a wrong "info".

The OP wrote:

I wish to insert multiple table of contents in a Pages '09 document (table of contents, table of figures etc). Each table of contents is separated by a section break.


It seems clear that he was aware of the fact that we may have several TOC.

Table of figures are an other kind of objects and these ones are unavailable so there is no problem of having several ones. We just have none of them.

So, I repeat that we may have several TOC.

I reread the OP's message.
He didn't asked for a global TOC available as well as sections's TOC.

Yvan KOENIG (from FRANCE mercredi 6 mai 2009 23:32:32)

May 6, 2009 8:34 PM in response to KOENIG Yvan

Have read all the replies but I think Yvan has answered it.

I wanted 3 TOCs (table of contents, list of figures, list of tables) separated by sections at the start of my document, no text in between. I use different styles for the headers which will make my table of contents, a different style for figures for the list of figures and a different style for tables for the list of tables.

Will have to wait for Pages '10 or do it manually.

Thanks everyone.

May 7, 2009 8:28 AM in response to nataraja108

Hello

This short script may be useful. It build a list of pictures and tables.
It's easy to adjust it to fit your needs.

Run it once
paste the clipboard where you want to insert section1's list of tables and list of images.
Delete what is related to other sections.
Edit the two lists to fit your taste.

Run the script again.
Repeat the described process to insert lists related to section2



on run
tell application "Pages" to tell document 1

set ns to count of sections

set mesTables to {}
set imgCnt to 0
set tblCnt to 0
repeat with s from 1 to ns
tell section s
--set imgCnt to 0
--set tblCnt to 0
copy "Section #" & s & return to end of mesTables
set np to count of pages
repeat with p from 1 to np
tell page p
set nbt to count of tables
set nbi to count of images
end tell -- pages
if (nbt + nbi) > 0 then
copy tab & "Page #" & p & return to end of mesTables
if nbt > 0 then
repeat with i from 1 to nbt
set tblCnt to tblCnt + 1
copy tab & tab & "Table #" & tblCnt to end of mesTables
end repeat
end if -- nbt > 0
if nbi > 0 then
repeat with i from 1 to nbi
set imgCnt to imgCnt + 1
copy tab & tab & "Image #" & imgCnt to end of mesTables
end repeat
copy "" to end of mesTables
end if -- nbi > 0
set nbt to 0
set nbi to 0
copy "" to end of mesTables
end if
end repeat
end tell -- sections
end repeat
end tell

set mesTables to my recolle(mesTables, return)

set the clipboard to mesTables

end run
on recolle(l, d)
local t
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to ""
return t
end recolle


Yvan KOENIG (from FRANCE jeudi 7 mai 2009 17:27:48)

Jun 2, 2009 11:51 AM in response to Gregor Schinke

Gregor Schinke wrote:
sorry for asking such silly questions but this is my second day on a mac and I try to run your script. I got that far that I have a text like

Section #1

Page #1

Image #1

but no page numbers. Do you know what I am doing wrong.


From my point of view, Page # resemble to a page number, isn't it ?

Yvan KOENIG (from FRANCE mardi 2 juin 2009 20:51:28)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

multiple table of contents

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.