This content has been marked as final. Show 7 replies
Make a separate Document of each Chapter, put them together in a Book.
Otherwise: can't you insert/add a page when needed? All subsequent elements will stay on right pages.
If not possible: Can you tell how the script will be able determine what text to put where on what page?
Tony, thanks for your responce.
1. We have at least 10 manuals plus they're in 2 versions. It's very difficult to store all these as seperated files especially for every Chapter. That's why we use three files in one book for each manual: content, manual part, index.
2. Manual part consists of one frame. We add the text and screenshots in all sections very often. Adding pages not at the end of the document (as we do) can totally confuse us.
3. I'm not a programmer, but I see the sollution in such way:
Every section marker has to be linked to its Chapter. Chapter always begins with the same word "Chapter#" and in the same unique style. So, it's good to create function "Generate or Update Section Marker". This function will be determine where the every "Chapter#" element (in the determined style and unique in whole document) is and will automatically create the new section marker on every of these pages. All section markers have to be deleted automaticcaly on the other pages, where word "Chapter#" is absent.
It must be the opportunity to write the section marker's name for the every chapter mannually. It looks like the index generating function in InDesign as for me.
If it's possible to make my fantasy real, it'll be great :).
Ehm. Not a scripted solution, but have you checked text variables?
It's a basic function of the variables that they are updated per use of a single unique style. And even if you don't have one, you can
one and set its text color to [None].
This was surprisingly difficult. (And I could not make it work in in JS :-() Assuming every chapter starts on a new page with a paragraph style called "Chapter" you can do something like this:
tell application "Adobe InDesign CS3"
tell document 1
delete every section
repeat with i from 1 to count pages
if name of applied paragraph style of text 1 of text frame 1 of page i = "Chapter" then
set chaptertitle to contents of paragraph 1 of text 1 of text frame 1 of page i
set newsec to make new section
if i = 1 then
set continue numbering of newsec to false
set continue numbering of newsec to true
set page start of newsec to page i
set marker of newsec to chaptertitle
I really did not understand the request, so I don't know if this is what
you mean, but...
Take a look at my comment on March 2 which has a link to a couple of
scripts. They might do what you want.
Here's a direct link to download the scripts:
I'm curious how your problem was solved after all these suggestions. Will you let us know?
Every of you got me some help and I succeeded at last. Thanks a lot ALL of YOU!
I used Harbs' scripts. When I had to update headers I used the RemoveSections script. After that I used the SectionFromParagraphs script with the required paragraph style choosing.
But in this way, my headers consisted of the chapters' names only. But also I had to add the chapter markers ("introduction:", "Chapter#:", "Appendix:", etc) before chapters' names. So, I defined the variable with the Running Header type and placed it on the master page.
Doing so, everything was perfect except one thing.
I work with book that consists of 3 parts. 1: Preface, 2: Manual, 3: Index. In the Manual part we start page numbering at 1. So, after using scripts, every section started at page number 1. To fix that, it was necessary to choose the Automatic Page Numbering for every(!) section MANUALLY!
What I did:
After using the RemoveSections script, I had just one section. I chose for it the Automatic Page Numbering. After it the Manual part numbering continued the Preface part numbering. Then after using the SectionFromParagraphs script I returned to the first section and chose (just for it) Start Page Numbering at 1. In this way my Manual part started at page number 1 and the page numbering was consequent in the whole part. As I needed.
Thanks again all of you for your help and advices. Now I'm free from doing this boring part of work manually :).