Format page numbers using grep styles
I was working on a project recently and decided to use old style figures in the folios. While there were a number of things I could have done to accomplish this, I figured that I’d just use a grep style since the folios also used the date of the event and adding a grep style for old style figures for any digit would do the trick.
First step was to create a character style for old style figures and a paragraph style for the folios.
As part of the paragraph style I used a grep style to apply the old style character style to any digit.
But there’s a problem…the numbers in the date are perfect, but the page numbers aren’t formatted.
I was a bit surprised but it didn’t take too long to realize that this was clearly a case of operator error. InDesign doesn’t consider automatically generated page numbers as numbers; it considers them markers. So back to my paragraph style to do bit of extra work…an additional grep style to apply the old style character style to page number markers. The preset grep expressions built into the application make this a breeze.
Now, that’ more like it.
With all of the automatically generated text that InDesign is capable of, it’s important to keep in mind that formatting it properly may require a bit of extra thought.
This article was last modified on December 19, 2021
This article was first published on November 22, 2008
Commenting is easier and faster when you're logged in!
Recommended for you
This Week in InDesign Articles, Number 58
A large selection of articles, videos, and goodies to keep you busy while we're...
Happy 25th Anniversary Adobe Illustrator!
Illustrator is 25 years old. Let's celebrate with some music!
Free InDesign Script to Export JPEGs or PNGs at a Precise Size
InDesign has had the ability since at least CS2 to export pages to JPEG. But the...




