• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

How to automatically number pages 1a, 1b, 2a, 2b, etc?

Community Beginner ,
Jan 25, 2021 Jan 25, 2021

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?

TOPICS
How to , Scripting

Views

688

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Advocate , Feb 08, 2021 Feb 08, 2021

This kind of query has already been solution. You might want to check it.

https://community.adobe.com/t5/indesign/how-to-have-page-numbers-progress-1a-1b-1c-2a-2b-2c/td-p/10812739

 

Sunil

Likes

Translate

Translate
Advocate , Feb 10, 2021 Feb 10, 2021

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++;
    }

 

PageNumberingScreenshot.png

 

Sunil

Likes

Translate

Translate
Advocate ,
Feb 08, 2021 Feb 08, 2021

Copy link to clipboard

Copied

This kind of query has already been solution. You might want to check it.

https://community.adobe.com/t5/indesign/how-to-have-page-numbers-progress-1a-1b-1c-2a-2b-2c/td-p/108...

 

Sunil

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 09, 2021 Feb 09, 2021

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2021 Feb 09, 2021

Copy link to clipboard

Copied

The section prefix trick can be scripted. If you ask Sunil he'll do it for you 🙂

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 09, 2021 Feb 09, 2021

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;
    }

 

PageNumbering.png

 

Sunil

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 10, 2021 Feb 10, 2021

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++;
    }

 

PageNumberingScreenshot.png

 

Sunil

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 12, 2021 Nov 12, 2021

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:

Screen Shot 2021-11-12 at 2.48.45 PM.png

On the Page:

Screen Shot 2021-11-12 at 2.49.20 PM.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 12, 2021 Nov 12, 2021

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...

 

David Creamer: Community Expert, Adobe Certified Instructor, and Adobe Certified Expert (since 1995)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 04, 2022 Dec 04, 2022

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2022 Nov 14, 2022

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 04, 2022 Dec 04, 2022

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines