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.