Copy link to clipboard
Copied
Hi, friends..
There are 1200 pages of design documentation. There is automatic pagination in the center at the bottom of the pages.
Also, starting from the 8th page, how can I make Arabic page numbering starting from 2, at the bottom and right of the pages automatically?
In the same way, starting from the 8th page, automatic numbering will be added to the bottom left of the pages, again starting from 2.
This system will reset and repeat after page 620.
Thank you so much in advance for your valuable help.
iMac 2020 Sonoma, InDesign 19.0.1
like this one here:
InDesign numbers pages automatically ONLY according to its own internal algorithm, which can be modified by using Sections and restarting numbering for each. The numbering is otherwise tied quite tightly to the actual physical pages of the document. There is no integral method for having multiple automatic page numbers, or numbering in reverse, or any other method that is sometimes needed for unusual books.
When unusual or duplicate page numbering is needed, there is only one method I know of.
...Hi @Rba Mrym:
I looked at your file and it is indeed complex. As a heads up, you will be able to number the sidenotes with autonumbers too, including the red color and the close parentheses. To make sure you don't lose your mind, please read up on styles: paragraph and character styles. You will need both. InDesign can handle multiple numbered lists (I know of three you need so far) as long as you name each list.
For example:
My video clips are fast because we are limited by file size, wh
...Copy link to clipboard
Copied
InDesign numbers pages automatically ONLY according to its own internal algorithm, which can be modified by using Sections and restarting numbering for each. The numbering is otherwise tied quite tightly to the actual physical pages of the document. There is no integral method for having multiple automatic page numbers, or numbering in reverse, or any other method that is sometimes needed for unusual books.
When unusual or duplicate page numbering is needed, there is only one method I know of. Add another text frame for page numbering to the relevant Parent pages, then dump in a text flow that consists of only the desired numbers, each in its own paragraph. (Tools like Excel can be used to create long sequences of numbers, if needed.) That text content should be formatted to appear as wished and to always "break to next frame" so that each frame on each document page will contain one and only one of the alternate numbers. This is reasonably automatic and will adjust to inserted or deleted pages, but has to be managed manually in all respects.
And, of course, you can have more than one such numbering feature on all or some pages. It's all up to how many such frames you want to put on Parent pages, what string of numbers or other counters you put in them, and then what exceptions you apply in layout (such as skipping section title pages, or whatever).
In your case, you could put multiple page numbers in a single file (1, A, 2, B, etc.) so that two would appear on each page with two linked text frames. But that might get a little complicated to manage. Best to keep each numbering flow separate.
Does that approach make sense?
Copy link to clipboard
Copied
Thanks for your valuable response,
It's a bit complicated, but I will try to apply your explanations by thinking about it.
Frankly, I thought maybe it could be solved with a few simple JS codes. 😉
Copy link to clipboard
Copied
Hi @Rba Mrym:
InDesign's page number marker is limited to the actual page number, so use that for the blue, centered, incrementing numbers.
You could use auto-numbered lists for the other two (or use Excel to type the actual numbers) and then auto-flow them on the body pages into a frame drawn on the parent page.
In my demo, I added a series of space/returns in Word, placed them into the first frame on page 2, and assigned a paragraph style that addes the autonumber, and fits one number per frame. (I added the space in front of the returns because auto-numbers do not show up unless there is some content on the line.)
Something like this:
Since you're new here, we don't know how much you know about InDesign (welcome!) so if you need more details, just ask.
~Barb
Copy link to clipboard
Copied
Thanks for your valuable response,
Yes, I'm new here, I'm intermediate in indesign, but I'm preparing a very complex book with more than 100 master pages, I think I'm going to sweat a little.
Obviously, your demo is a bit fast and I had a hard time following it, but I still think I can reach the conclusion by surfing YouTube based on the main words in your explanations (auto-numbered lists, auto-flow, etc.).
Unfortunately, I have no experience working with integrating office applications, especially in Indesign. Of course, if you want to prepare a tutorial with narration, you can be sure that I will watch it with admiration. 😉
Actually I need so much help because it's a very complex design with dozens of interconnected chapters and sections and different numbering. I'm attaching a small part of it as a pdf if you want to look at it.
PDF file is here: https://we.tl/t-mkOahBncfF
Copy link to clipboard
Copied
Don't get lost in over-thinking this. It's very simple: create a text frame that appears on every page you wish to number using this alternate scheme, and then drop a text file with the numbers in it, as individual paragraphs, into that text flow. Everything else is just a small detail — whether you use a list of fixed numbers, which CAN be generated in Word or Excel if that's easier than typing them, or just a paragraph style that applies an auto-number to an otherwise empty paragraph. But getting each of those numbers on the right page is up to you placing the text frames properly and then sorting the number paragraphs correctly.
Think of it as method to manually number these pages, with some slight automation applied. Regardless of which process and which details you use, that's all it is, and you will have to manually review and manage it. InDesign can only be used for the primary, linear page numbers, and everything else is up to you.
Not sure there is any useful scripting or code that can be applied to this, as it needs author/designer attention to get the numbering in the right complex/organized form. InDesign and pretty much any script would only be able to handle linear numbering of the pages in the document, which is only one of the numbering series you seem to need.
Keep it simple and get one numbering setup correct before you add any others.
Copy link to clipboard
Copied
I would like to thank you wholeheartedly for your quick response and very useful information.
I will have to watch a lot of tutorials on Youtube, examining your explanations and, I think, starting from the keywords. After all, understanding the logic of the work is one thing, but it is necessary to implement it step by step and gain experience in the path to be followed..
Copy link to clipboard
Copied
Hi @Rba Mrym:
I looked at your file and it is indeed complex. As a heads up, you will be able to number the sidenotes with autonumbers too, including the red color and the close parentheses. To make sure you don't lose your mind, please read up on styles: paragraph and character styles. You will need both. InDesign can handle multiple numbered lists (I know of three you need so far) as long as you name each list.
For example:
My video clips are fast because we are limited by file size, which ends up translating to about 30 seconds. Anything longer won't load. On the bright side, you can watch them as many times as you like until you figure it out!
Don't worry too much about the Office integration. The video started in Word, where I made a list of:
space ¶
space ¶
space ¶
You will need one for each number, so copy/paste is your friend. Then I saved the Word doc, used File > Place to import it into InDesign, and hovered over the frame visible to the left of the blue number. (I drew that frame and the one to the right of the blue number on the right parent page.) Shift+click will autoflow the list, filling one frame and then moving on the next. Finally, I selected the entire list, assigned a paragraph style with a type size that was large enough to fill the frame and the numbers populated the rest of the document. Remember, each autonumbered list needs a unique name (enter it to the right of the word List in my screen shot above).
Best of luck!
~Barb
Copy link to clipboard
Copied
Thanks for your directions and I will try to reach the result by following each step in your explanations. If I succeed, I will share it here again... 😉 Thank you
Copy link to clipboard
Copied
Hi @Rba Mrym, you've got two correct answers already, but I was thinking about it after looking at your complex document and I think you are right—that a script would be ideal because it would keep your document as simple as possible.
I've made a demo file (attached) that shows a basic set up using master page text frames for the numbering and script labels (very important because that's how the script knows which boxes to number). You can see in the screen shot below I've used the label "numbering":
The text frames have object styles linked to paragraph styles. I don't have the ME version of Indesign and I could get the Arabic numerals to set properly via ExtendScript. Let me know if it doesn't work in your version either and I'll explore further.
Here is the script I wrote. Let me know if you decide to give it a try.
- Mark
/**
* Example page numbering script, which works by entering a 'counter'
* value into any text frames with a matching label, where the counter
* is incremented when a text frame is found on an unprocessed page.
* This means that every text frame found on the same page, using the
* same counter, will have the same number, so the Arabic and English
* numbers will be the same (except for the font/language used).
* It also means that the counter does not increment when there is no
* text frames found on a page.
* This example treats the Arabic and English numbering as the same
* counter (which they appear to be), but if they need to be different,
* then we can call the `processPageItems` twice and label the text frames
* differently, eg. "Page Number Box Arabic" and "Page Number Box English".
* We can use a different numberer function, too, so the Arabic and English can
* have totally different rules. To customise the numberer further,
* edit the `myNumberer` function (or make another one for another call
* to `processPageItems`).
*
* Important Notes:
* - I don't know how to set Arabic numbers from ExtendScript and I'm
* hoping that the paragraph styles will handle that. If not, I'll have
* to convert the counter to Arabic glyphs in the myNumberer function.
* - The document must be set up with text frames having the specified
* script label (see the Script Label panel in Indesign).
* - I *highly* recommend using object styles for the page number text frames,
* so that you can specify the position, and other properties in one go.
*
* @author m1b
* @discussion https://community.adobe.com/t5/indesign-discussions/multiple-different-page-numbers-on-the-same-page/m-p/14328619
*/
function main() {
var doc = app.activeDocument,
myCounter = new Counter();
// this finds all page items of the document
// that match the label, and we pass it a
// function for handling numbering required
processPageItems(doc, 'numbering', numbererForArabicAndEnglish);
// show results
alert('Set ' + myCounter.totalCount + ' numbers.');
/**
* Replaces text contents with a count using `myCounter`.
* @param {PageItem} item - an Indesign page item.
* @param {Page} page - and Indesign Page.
*/
function numbererForArabicAndEnglish(item, page) {
if (!item.hasOwnProperty('contents'))
// can't set contents of this thing
return;
if (page.documentOffset < 8) {
// no numbering before page 8
item.contents = '';
return;
}
if (
page.documentOffset === 619
|| page.documentOffset === 620
) {
// reset counter at page 620 spread
myCounter.count = 0;
myCounter.page = undefined;
}
switch (item.texts[0].appliedParagraphStyle.name) {
case 'Page Number Arabic':
// I'm not sure how to set Arabic numerals so I'll
// just set the contents to English numerals and
// hope the paragraph style will handle the language
case 'Page Number English':
item.contents = String(myCounter.getCountByPage(page));
break;
default:
break;
}
};
};
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Do Numbering');
/**
* An incrementable counter.
* @author m1b
* @version 2024-01-02
* @constructor
*/
function Counter() {
this.count = 0;
this.totalCount = 0;
this.page;
/**
* Returns the counter's count,
* but only increments when
* going to a different page.
* @param {Page} page - an Indesign Page.
* @returns {Number}
*/
this.getCountByPage = function (page) {
if (undefined == page)
throw Error('Counter.prototype.getNextCount: bad `page` supplied.');
this.totalCount++;
if (this.page !== page) {
this.count++;
this.page = page;
}
return this.count;
};
};
/**
* Performs a function on every page item
* in `doc` that has a matching `label`.
* @author m1b
* @version 2024-01-02
* @param {document} doc - an Indesign Documwent.
* @param {String} label - the label to match.
* @param {Function} fn - the processing function fn(text, page)
*/
function processPageItems(doc, label, fn) {
var pages = doc.spreads.everyItem().pages.everyItem().getElements(),
masterItems = [];
// collect all the labelled master items
for (var i = 0; i < doc.masterSpreads.length; i++)
for (var j = 0; j < doc.masterSpreads[i].allPageItems.length; j++)
if (label == doc.masterSpreads[i].allPageItems[j].label)
masterItems.push(doc.masterSpreads[i].allPageItems[j]);
pageLoop:
for (var i = 0; i < pages.length; i++) {
// first override any master page items
for (var j = 0; j < masterItems.length; j++) {
try {
masterItems[j].override(pages[i]);
} catch (error) {
// will error when no item on page, so ignore
}
}
// process labelled page items
for (var j = 0; j < pages[i].allPageItems.length; j++)
if (label == pages[i].allPageItems[j].label)
fn(pages[i].allPageItems[j], pages[i]);
}
};
P.S. Your little pagination mockup on your first post showed page numbers on the right hand page of a spread, but your demo document didn't look like that. Anyway, hopefully you can get the idea. Note that the script includes the part where it resets counter at page 620.
Edit 2024-01-05: minor edit to script documentation.
Copy link to clipboard
Copied
First of all, thank you very much for your efforts. As an intermediate level Indesign user, I plan to achieve results by learning all the details and solutions presented to me by trying to apply them, I will definitely share the details with you. See you soon, have a nice working day..