Copy link to clipboard
Copied
I'm trying to change the chapter titles to have numbers instead of text designating which chapter number it is in the book (ex. Chapter Fourth to Chapter 4). What would be the Grep query for this? Everything I've tried just generates cannot find match.
You can find a pattern - but you can't replace a pattern
That is the GREP would be
Chapter\h[First|Second|Third|Fourth|Fifth|etc)
But you can't replace it with
1 2 3 etc
Your best bet is to have a Paragraph Style and set the Automatic Numbering
And in the Automatic Numbering type in
Chapter^#
(I think it's that experiment with first)
Then search for
^Chapter\h.+?$
Then replace the whole line for the numbered paragraph which will always be
Chapter followed by the number
This describes
...Here is an ever-so-slightly simpler variation on Eugene's answer (just one find/change) with a quick demo:
1. Edit your Chapter Number style to add the auto-numbers. If the entire document is in one file, use:
Chapter ^#.
but if you are pulling multiple InDesign files into a book use
Chapter ^H.
2. Find/Change > GREP
Find: .+ (to match everything on that line) and Paragraph style: Chapter Number (or whatever you named the style)
Change: \s (because autonumbers need at least one characte
...Copy link to clipboard
Copied
You can find a pattern - but you can't replace a pattern
That is the GREP would be
Chapter\h[First|Second|Third|Fourth|Fifth|etc)
But you can't replace it with
1 2 3 etc
Your best bet is to have a Paragraph Style and set the Automatic Numbering
And in the Automatic Numbering type in
Chapter^#
(I think it's that experiment with first)
Then search for
^Chapter\h.+?$
Then replace the whole line for the numbered paragraph which will always be
Chapter followed by the number
This describes my method
https://www.pubcom.com/blog/tutorials/indesign/toc-3/index.shtml
Then it's just find and replace to remove the text completely
And leave a blank character return - which inserts the autonumber - which will be Chapter 1/2/3/4 etc.
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
Here is an ever-so-slightly simpler variation on Eugene's answer (just one find/change) with a quick demo:
1. Edit your Chapter Number style to add the auto-numbers. If the entire document is in one file, use:
Chapter ^#.
but if you are pulling multiple InDesign files into a book use
Chapter ^H.
2. Find/Change > GREP
Find: .+ (to match everything on that line) and Paragraph style: Chapter Number (or whatever you named the style)
Change: \s (because autonumbers need at least one character on a line or they don't work)
Change All
Copy link to clipboard
Copied
Thanks, great you were able to put that together. I'm not always at the computer.
Copy link to clipboard
Copied
I know! It's so hard when we are on our phones/ipads. I don't know how other people do it.
~Barb
Copy link to clipboard
Copied
From my memory most of the time 😛
Copy link to clipboard
Copied
Thank you so much. I eventually did it by typing first, second, third .... into the find /change>text and putting the correct number in the change to field, wich worked but was time coming. This method should be much more efficent and faster.