GREP searching was a highly needed and really convenient addition to InDesign, when it was added in CS3. Earlier, doing complicated search/replace, and cleaning up documents for extra spaces, tabs etc. was a longer procedure.

Still GREP's greatest force (in my opinion) inside InDesign was added in CS4, when GREP styles was introduced. Being able to change text appearance based on regexp is amazing.

As always, a little something for the wishlist:

Using groups in GREP styles

Being able to search for a longer string, but only applying the character style to the matched part of the results. If you want to highlight the word "bar", but only when "foo" is in front of it: "foo bar" >< "this bar". I would suggest being able to search for something like "foo (bar)" and only apply the character style to the group, "(bar)".

Character and paragraph style aware GREP searching

Prior to CS3, where GREP was introduced in InDesign, I normally would export the text story as InDesign Tagged Text and apply all my advanced searching on that document in any text editor. And I still do this, because what InDesigns GREP search lacks, are character and paragraph awareness.

In GREP search you are able to find/change formatting as well, which lets you target specific paragraph styles, but you are unable to search for "paragraph_style_1 followed by paragraph_style_2"-combinations, which can be really handy if you want to remove e.g. indentation from all paragraphs located after blank lines, subheadings etc.

Searching on pairs of paragraph styles isn't possible inside InDesign - to do the more advanced searches you still have to export the document as InDesign Tagged Text, and do the searches in your preffered text editor.

Searching in InDesign Tagged Text in TextMate

Also, you can use the regular regexp anchors, ^ and $, but these only applies to paragraphs. So if you search for a specific character style, you can't tell InDesign to look in the beginning/end of the found text, it only applies to the current paragraph. A set of extra anchors in InDesign please?

Searching from the beginning of a character style doesn't work. The ^ anchor still applies to the beginning of the paragraph.

GREP anchors and character styles

I usually keep all styling that differs from the paragraph styles I have created in character styles, making one for bold, italic, superscript ... text. But sometimes I wish I could apply more than one character style to the same text.

This wish probably originates from my background with HTML and CSS - being used to nest things within each others. When I look at a InDesign document, I see the same structure, character styles are inline objects inside the paragraph styles which are block objects.

Case 1: Superscript and italic text

In this case, I have a document with some text, some of the text are italic, and some of the text are superscript. I have created a character style for both, but suddenly I need to style a letter both italic and superscript. My only option: creating a new character style for this place alone.

Case 2: Coloured text

In this case my text is black, but different sentences are highlighted with a red text colour. Some of the text in one of the sentences are already italic - my only option: creating a new character style for this place alone.

Italicised text that is also marked red.

Italicised text that is also marked red

Some might call my crazy, but I never locally apply any formatting. I don't, because I don't want to risk anything loosing its formatting later in the process, if accidently overrides are cleared.

I thought of some different workarounds, like applying my red character style to the sentence, and then using Nested Style, Nested Line Styles, Drop Caps or GREP Style to apply the italic style to some text, and it actually worked in the different arrangements I tried.

Applying GREP style to text already marked with a character style.

Applying GREP style to text already marked with a character style

After testing a bit it turns out that you can do this as much as you like, applying unlimited amounts (only tested up to 10) of different character styles to the same text, using the 4 different types of nested styles available in InDesign. There is a hierarchy though, Nested Line Styles > Nested Styles > Drop Caps > GREP Style. Applying multiple GREP styles, they are prioritised after position in the GREP Style section, lowest with highest priority.

This is the only workaround I have been able to figure out, and honestly, it doesn't really solve anything, does it? It is a fun feature, and probably can be useful in some cases, but not specifically in the two I mentioned.

So please Adobe, make it possible to apply multiple character styles?

Often, in the books we do, we have to separate some text from the main flow, but still keeping it in the flow. This could be facts, side stories – what I usually would call box texts.

In a design, there are many ways to separate special text from the main text. If the book is set with a serif typeface, you could do the special text with a sans, or you could change the color of the text etc. But many times you want to put the text in a box, so you can change the background color behind the text, or you can make a border around it.

The way I currently do it, is I am placing the text in a table with one row and one column. This way I can control the background color, border, padding and distance to the text before and after the table. But the weak point of this solution, is that you cannot "break a table" across a page or column. If the table is to high to fit, it will just be placed in the next column. This leaves you to split the table manually in two rows, where the table should break.

Another way to "fake a box look" by adding a background color, is to use the paragraphs underline, strikethrough, or rule above and below functions. The way you do it, is by defining a rule or line that is about as thick as the leading and adjust its offset to match the wished effect.

An example of the three mentioned ways of adding "inline boxes" in a text flow.

Inline box != table or text frame

Using tables you can make the box have a border. Using underlines or strikethroughs, you can make the box break automatically after columns, but the background color will be only as wide as the single lines. Using paragraph rules, your box may not be more than two text lines, since the rules only applies to the first and last line of the paragraph, but it also gives you the ability to adjust a horizontal offset for the background that extends the text frame they are in.

Some might suggest you use inline text frames, but as with images they only wrap text below them. So if you wish to use text frames, to e.g. round the corners, add a shadow etc. you will be best off by putting that frame inside a table, because tables always wrap text both above and below.

So Adobe, my wish: Let us have a background color and border option for paragraphs, or add a new form of inline box.

When working with books in multiple columns, you often have to span a heading across two columns – most of the time, this is only done in the beginning of each chapter, but can also occur for subheadings.

In other cases it could also be nice to be able to span a paragraph style across columns, or just a specific offset on the right and left side. For instance if you have a layout with a bigger outer margin, for e.g. column text, where you in the design allow illustrations, tables or photos to fill that extra margin out.

An example of how a layout could look, where spanning an edge of a text frame would be useful.

Paragraph styles spanning columns

Currently you can do some workarounds to accomplish these things, since we know that both inline text frames and tables are allowed span the right edge of its parent text frame. So if I want a heading to span two columns, I could choose just to place the heading inside a text frame, which I place inline the text, where the heading should occur, and apply a text wrap to it.

It gets worse though, if you want to span out the left edge. We know it is easy to span simple text a little out the left edge of a text frame by adding some kind of white space before the first character and adjust its negative tracking until it is moved enough to the left. But there is a limit to negative tracking, so it cannot be used in the cases where you wish to span a heading or table out.

Instead these can be placed in an anchored object with a text wrap, that is placed "Inline or Above Line", with the full text column + outer margin width, placed "Towards Spine".

But to ease all of these workarounds, why doesn't Adobe just add a paragraph spanning option? It would be a lot easier!