If you often create books with text in the margin, you probably know the importance of being able to use anchored objects. The only downside to anchored objects are creating them - especially if it is a large book with a lot of text needed to be moved.

I have written a script to help in this process. In short, it does all the hard work for you.

You can easily just download the script, run it, and you will probably quickly figure it out, but I still want to explain how I found the workflow easiest.

The workflow

First of all, you have to ensure that the text you need moved to anchored text frames are marked up using either a character style or a paragraph style.

Text with paragraphs marked up as margin text.

Text with paragraphs marked up as margin text

The second thing you should prepare, is an object style for the anchored text frames. By creating an object style you can easily change all locations of the frames at a later point, the look etc.

The Anchored Object Options.

The Anchored Object Options

It is also a good idea to specify a paragraph style in the object style, if you would like it to be another than the referring text.

You can specify a paragraph style for your text frame.

You can specify a paragraph style for your text frame

The third thing you have to find out, is what the height and width of the anchored frame should be. You have to type in these values when the script is executed. The values can be typed in as any unit, InDesign will automatically convert it to millimeters.

The scripts main window where the options is set.

The scripts main window where the options is set

When the script is executed, you will have the option to either find and move character styles or paragraph styles to anchored text frames. The option to delete matches gives you the choice of leaving the "moved" text in the main text flow.

For character styles, the anchor will be placed after the text, in the beginning of the following word. For paragraphs, the anchor will be placed as the first thing in the next paragraph.

The final result in this case.

The final result in this case

The script

The AppleScriptJavaScript can be downloaded here: create_anchored_frames.jsx.

You can add it to your Scripts palette and run it from there. To do that, place the file inside the "~/Library/Preferences/Adobe InDesign/Version 6.0/Scripts/Scripts Panel" folder.

You probably know the issue, which I have also mentioned in a previous blog post - you can't search on paragraph style combinations using GREP search.

The obvious case where this could be handy, is if your story contains a lot of subheadings and indented paragraphs, and you want to make all indented paragraphs, not indented if they are appearing below a subheading. As I mentioned in the GREP wishlist article my current way to do this is by exporting the story as tagged text, and do a regular expression search in a text editor.

Subheadings followed by an indented paragraph.

Subheadings followed by an indented paragraph

But not anymore!

Today I wrote a small AppleScriptJavaScript to take care of the issue - it is actually quite simple and doesn't require much introduction. Once you have launched the script, you are asked what pair of styles you are looking for, and what you want them changed to:

Fix paragraph style pairs.

Fix paragraph style pairs

The script will search the current story and fix all occurrences of the pair.

The AppleScriptJavaScript can be downloaded here: fix_pstyle_pairs.jsx.

You can add it to your Scripts palette and run it from there. To do that, place the file inside the "~/Library/Preferences/Adobe InDesign/Version 6.0/Scripts/Scripts Panel" folder. It should work in CS3 and CS4 in Windows and Mac.

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!