Applying Master pages to 'all even' or 'all odd' pages
Applying Master pages to 'all even' or 'all odd' pages - would be handy when working with large documents, rather than manually typing or cmd+shift the pages to include.
Hi All, thanks for this feature suggestion.
If I understand this correctly the idea here is that you need a faster way to be able to apply Master Pages to the various pages in the document. One use case is that you want to apply a particular master page to Even and Odd pages.
Are there other such scenarios too, where you need more support. It would be helpful if you can mention other such scenarios.
Thanks
-
Luis Felipe Corullón commented
For those who are requesting this feature...
There is a script solution to this: https://corullon.com.br/scripts/product/apply-masterpages/ -
Bob Woodruff commented
I do it by generating even numbers, separated by commas, copying and pasting them into the "apply master to" box. I use this site to generate as many even numbers as I need for my document. I let the odds be Master A, and the evens Master B.
-
Carlo Beccarini commented
Not sure wether it works or not since i don't use InDesign, i'm just a developer. Btw you can use this script to apply a master page on all even pages:
var document = app.documents[0];
var masterSpreads = document.masterSpreads;
var pages = document.pages;
var masterName = "A-Master";for (var n = 0; n < pages.length; n++) {
if (n % 2 === 0) {
pages[n].appliedMaster = masterSpreads.itemByName(masterName);
}
};If you need to apply the master on odd pages, you can use this one:
var document = app.documents[0];
var masterSpreads = document.masterSpreads;
var pages = document.pages;
var masterName = "A-Master";for (var n = 0; n < pages.length; n++) {
if (n % 2 != 0) {
pages[n].appliedMaster = masterSpreads.itemByName(masterName);
}
};Of course you need to change masterName variable to match the one you're using.
-
Anonymous commented
I would love for this to be an option and am a little surprised it isn't already. I would love to be able to apply a master page to all even or odd page numbers.
-
Laura commented
I whole heartedly support the request for this. I have a 900 page document that is a merged 2 page letter. The letterhead master needs to apply to the odd pages and the footer master to the even pages. It is a royal pain to have to manually click on the individual pages so having the option to designate odd and even in addition to a page range would be VERY helpful! Thanks :)
-
Anonymous commented
HMMMM
With your NCR forms; i'm assuming that the content of the black and white is the same as the colour.
Why not just have a single master page with three layers
The base layer is
Black & White layer - A black and white version of the documentMiddle layer is
Colour layer - A colour version of the documentThe top layer is
Number Layer - A common layer. Always switched on.
It has only 2 Frames containing your numbers. The trick here is the make the numbers variable. This is done byMenu: Type -> Insert Special Character -> Markers -> Current Page Number.
You can alter the way the page number is shown by going on the numbering and section options and choosing the styling there. Or adding other common text to the text box on the master page.
When going to print or make PDFs just either turn off the black and white or Colour layer.
If you need these side by side then take a look at this
https://indesignsecrets.com/previousnext-page-number-on-same-page.phpcheers . bill
-
Anonymous commented
This is a script I mustered from this thread
https://forums.adobe.com/thread/2153387// AlternateMasterPage A-LHS B-RHS
var d=app.documents[0];
var masterSpreadsD = d.masterSpreads;
var pagesD = d.pages;
var totalNumber = 2;
var master1Name = "A-Master";
var master2Name = "B-Master";
for(var n=0;n<pagesD.length;n=n+totalNumber){
pagesD[n].appliedMaster = masterSpreadsD.itemByName(master1Name);
};
for(var n=1;n<pagesD.length;n=n+totalNumber){
pagesD[n].appliedMaster = masterSpreadsD.itemByName(master2Name);
};This is the reverse script with other options
var d=app.documents[0];
var masterSpreadsD = d.masterSpreads;
var pagesD = d.pages;
//Total number of changing master spreads:
var totalNumber = 4;
//IMPORTANT!
//Edit the names of your master spreads here:
var master1Name = "A-Master";
var master2Name = "B-Master";
//var master1Name = "A-Master";
//var master2Name = "B-Master";
//4 loops for 4 master spreads (could be improved, but this is an adhoc script, so hey!):
//Loop 1:
for(var n=0;n<pagesD.length;n=n+totalNumber){
pagesD[n].appliedMaster = masterSpreadsD.itemByName(master1Name);
};
//Loop 2:
for(var n=1;n<pagesD.length;n=n+totalNumber){
pagesD[n].appliedMaster = masterSpreadsD.itemByName(master1Name);
};
//Loop 3:
for(var n=2;n<pagesD.length;n=n+totalNumber){
pagesD[n].appliedMaster = masterSpreadsD.itemByName(master2Name);
};
//Loop 4:
for(var n=3;n<pagesD.length;n=n+totalNumber){
pagesD[n].appliedMaster = masterSpreadsD.itemByName(master2Name);
};
//If you want a total number of 5 altering master spreads,
//just add a new loop, increase the number to 4 for n, add a new variable for master5Name and add it to the loop
//Also increase totalNumber to 5 -
Harry Stern commented
I'm all for this option. I'm creating a 1000 page document whereby all the even pages are in color and all the odd pages are in black and white. I have created 2 master pages for this, but sitting there typing in a set of 500 page numbers to accomplish this is very time consuming. I have also set up boxes on each master where I need to insert numbers from 1-500 on each page where page 1 and page 2 create a set and the numbers need to match. (This is for 2 part NCR forms.) Is there an easy way to do this? I have 2 places on each page where I need to insert the numbers.
-
Kelly commented
Regarding applying Master Pages to "all even" or "all odd" pages: I request the ability to define a range of pages also (e.g. apply Master X to all even pages between pages 20–40).
-
Georg Stadler commented
Hi Javed,
I didn’t consider conflicting styles... in my line of work one style would be enough, but I can see the possibilities (and the complexity) of a hierarchy.
-
********, please go ahead and file a different request for this.
Others:
1. Does the master page application be automatic or would you rather want to trigger this yourself. What are the advantages/disadvantages that you see of manual vs automatic.
2. Odd and Even pages, and application based on usage of paragraph styles. Are there more such cases.
3. ******, I am assuming "Heading 1" is used just once, what should happen if there are conflicting situations where 2 different styles are used on the same page and each wants a different master page to be applied. Should there be a priority also, or typically do you need this feature for only a single styles application. -
René Andritsch commented
Dear Javed, yes there would also be some need to have page specific object styles. For instance with the relative to spine placement of anchored objects. I would like to have the possibility that a certain object style is only used on even or odd pages. Should I log a separate request for this?
Thanks, René
-
Georg Stadler commented
While typesetting a book I apply Master Pages based on used paragraph styles: Every time "heading 1" is used apply "Master Page A". Sometimes the positions of the headings inside the text flow will change due to additions or deletions. It would help me, if I could just click a button and the Master Pages would adjust according to the new positions of the headings.
-
Liviu commented
Yes, we definitely need a better way to apply master pages, not only for odd/even