Copy link to clipboard
Copied
I have used the section/prefix trick in order to accomplish this - I change the prefix to the number and make the style as a, b, c, d... The problem is I have a nearly 400 page document that I need numbered in this fashion. Every 2 pages will need a new prefix, and that is just exhausting editing the page numbers one by one. Is there a more streamlined way to accomplish this?
This kind of query has already been solution. You might want to check it.
Sunil
Try this one will perfectly do the work:
var myDoc = app.documents[0];
var c = 0;
var index = 1;
while(c < myDoc.pages.length){
try{
var sec = myDoc.sections.add(myDoc.pages[c]);
}
catch(e){
var sec = myDoc.pages[c].appliedSection;
}
sec.continueNumbering = false;
sec.pageNumberStart = 1;
sec.sectionPrefix = (index).toString();
sec.pageNumberStyle = PageNumberStyle.LOWER_LETTERS;
c = c+2;
index++;
}
Sunil
Copy link to clipboard
Copied
This kind of query has already been solution. You might want to check it.
Sunil
Copy link to clipboard
Copied
Yes, I am currently using this solution. But as I explained in my original post this solution is more of a workaround, and I'm looking for a solution that is more automated. I have 12 400+ page documents in which every two pages requires a new prefix (1a 1b 2a 2b 3a 3b etc.). Manually changing the page number ever two pages is not only exhausting, but leaving room for far too much error.
Copy link to clipboard
Copied
The section prefix trick can be scripted. If you ask Sunil he'll do it for you 🙂
Copy link to clipboard
Copied
With this snippet, this can be done:
var myDoc = app.documents[0];
var c = 0;
while(c < myDoc.spreads.length){
c++;
try{
var sec = app.activeDocument.sections.add(myDoc.spreads[c-1].pages[0]);
sec.continueNumbering = true;
}
catch(e){
var sec = myDoc.spreads[c-1].pages[0].appliedSection;
}
sec.sectionPrefix = c.toString();
sec.pageNumberStyle = PageNumberStyle.LOWER_LETTERS;
}
Sunil
Copy link to clipboard
Copied
Try this one will perfectly do the work:
var myDoc = app.documents[0];
var c = 0;
var index = 1;
while(c < myDoc.pages.length){
try{
var sec = myDoc.sections.add(myDoc.pages[c]);
}
catch(e){
var sec = myDoc.pages[c].appliedSection;
}
sec.continueNumbering = false;
sec.pageNumberStart = 1;
sec.sectionPrefix = (index).toString();
sec.pageNumberStyle = PageNumberStyle.LOWER_LETTERS;
c = c+2;
index++;
}
Sunil
Copy link to clipboard
Copied
Sunil,
I need the same thing but for 1A, 1B, 1C, 1D, 2A, 2B, 2C, 2D, etc.
I also need the page numbering to show just like that on the pages themselves. 
For example:
Master:
On the Page:
Copy link to clipboard
Copied
You posted this same question on another discussion.
See the answer there: https://community.adobe.com/t5/indesign-discussions/how-to-have-page-numbers-progress-1a-1b-1c-2a-2b...
Copy link to clipboard
Copied
Hi @mvanhorn_336,
To do this, this script will be useful for you:
var myDoc = app.documents[0];
var c = 0;
var index = 1;
while(c < myDoc.pages.length){
try{
var sec = myDoc.sections.add(myDoc.pages[c]);
}
catch(e){
var sec = myDoc.pages[c].appliedSection;
}
sec.continueNumbering = false;
sec.pageNumberStart = 1;
sec.sectionPrefix = (index).toString();
//sec.pageNumberStyle = PageNumberStyle.LOWER_LETTERS;
sec.pageNumberStyle = PageNumberStyle.UPPER_LETTERS;
// You can increase +4 to any other number for increasing abcd, if needed upto "F" then count from a-f is 6 digit,
// it becomes "c = c+6;"
c = c+4;
index++;
}
Sunil
Copy link to clipboard
Copied
Good answer.. is there a way that the section marker can have the same number as the section prefix so that it can be applied on the master page. I need the pages to read 1a, 1b, 2a, 2b.. where 1 and 2 are the section marker and 'a' and 'b' are page numbers.
Thanks,
Justin
Copy link to clipboard
Copied
Hi @justinn58611098,
Currently with this above script same thing is happening as you asked.
1,2,3 are section markers & a, b are page numbers.
Sunil