🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8660

Re: InDesign CS2 (JS) - Numbering and Section Options

#8660
From: Dan_Zollner
Date: Thu, 28 Sep 2006 16:37
11 lines
1397 bytes
Not sure if it is exactly what you are looking for, but this is how I handle sections and page numbering. I am not getting the page number from the user, I am just starting at 1, but once you capture that input, the logic should be the same. My page prefix is an instance var called sectionNumber, so the page number would be something like 1-1, 1-2 etc.

			var newDocSection = myDocument.sections.add(myDocument.pages[0]);
			newDocSection.continueNumbering = false;	
			newDocSection.pageStart = myDocument.pages[0];
			newDocSection.pageNumberStyle = PageNumberStyle.arabic;
			newDocSection.sectionPrefix = this.sectionNumber+"-";
			newDocSection.pageNumberStart = 1;
			newDocSection.includeSectionPrefix = true;	

Hope that helps.
Technical Details
Message-ID: <3bc1cc27.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.isoc.lu!webcrossing
References: <3bc1cc27.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,8c86d8a4da52ff38
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dan_Zollner@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: InDesign CS2 (JS) - Numbering and Section Options
Message-ID: <3bc1cc27.0@webcrossing.la2eafNXanI>
Date: Thu, 28 Sep 2006 09:37:27 -0700
References: <3bc1cc27.-1@webcrossing.la2eafNXanI>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit