One of the mistakes you often see in books, is that the book isn't printed "line on line". Depending on the opacity of the paper it is printed on, you can glimpse the other side of the paper through the page, and if the lines on the opposite site isn't aligned with the ones you are currently reading, it can be really frustrating and make it more difficult to read.

This is one of the reasons we use baseline grids.

By adding a baseline grid with a specific leading to your document, you can make sure that all your text is locked to that grid, and by that, assure the final result is printed "line on line".

The document

I have created a document with a specific top, bottom, inner and outer margin. My main text paragraphs are made with Meta Serif with a 10pt font size on a 13pt leading (in short terms, 10/13pt).

Since the main text paragraphs have a 13pt leading, this is the increment I will use for the baseline grid. The baseline grid is set up in Preferences » Grids.

Preferences » Grids is the place you set up your document baseline grid.

Preferences » Grids is the place you set up your document baseline grid

After setting up the baseline grid, I want to make sure that the margins and the text aligns. As you can see in the next image, there is a gap below the last line of the baseline grid, and the bottom margin. In this case the distance is 0.925mm, which i will I will add to the current Start value of the baseline grid, to move the whole grid a bit down on the page and align it to the bottom margin.

Adjusting the baseline grid's start level to align with the bottom margin.

Adjusting the baseline grid's start level to align with the bottom margin

Now in some cases it would be necessary to adjust the documents top margin, to make space for an extra line, but in this case it isn't necessary. If it was the case, the margin should of course be adjusted on the master pages, to affect all pages.

The styles

In this case I am using Meta Serif, 10/13pt, so the first thing I will define in the main paragraph style is the font, the font size and the leading.

The next thing I will define, is that the paragraph style should lock all lines to the baseline grid. This is done in the Indents and Spacing section. In reality, if my leading was set to 10pt, and all lines was set to lock to the baseline grid, the result would still be a 13pt leading. If the style's leading was set to 14pt though, the end result would be a leading of 26pt.

Locking all lines to the baseline grid.

Locking all lines to the baseline grid

Once you have the baseline grid set up, you can easily use it for many other things. E.g. small subheadings you want to control the space above and below. In the next image you will see a subheading taking up three lines of space, and adjusting the space by 2/3 above and 1/3 below. This is done by locking the lines to the baseline grid and lifting it from the baseline by 8.667pt using Baseline Shift in the Advanced Character Formats section.

I will refer to my screencast on "subheadings the right way" for more information on why I choose to do my subheadings this way.

To lift locked text a specific amount of space from the baseline, you can use Baseline Shift.

To lift locked text a specific amount of space from the baseline, you can use Baseline Shift

Grid based design

Amongst other things you can use the baseline grid for are placement of images, page numbers, running headers etc. Consistently using the same spacing makes the page design more logic - which is why you probably also want to look more into grid based designing.

I just want to add a final comment to using grids for designing. Grids are a great tool and can really help organizing things in a design. Aligning everything perfectly is a great start, but in the end it is the human eye that matters.

If you place images in the baseline grid, you really want the top of the image to optically align with the top of the text, which means you really want the top of the image to begin somewhere else than in the grid, probably in the x-height of the text.

Fine tuning a grid based design is all about optical alignment - the human eye is what matters in the end!

Fine tuning a grid based design is all about optical alignment - the human eye is what matters in the end!

It also means in bigger headings, uncials etc, you probably want to let serifs in A's, V's etc break the left text frame edge a little, to optically align the left edge of the text.

InDesign gives you tools to achieve some of this, but I will save that for upcoming posts in the better typography series.

Check out The Grid System for a lot of templates, articles, tools and inspiration on grid based design.

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.

This is the first of a new series of posts here on InDesigning.net giving you handy tools to achieve better typography in InDesign. The posts will be small guides ranging from beginner to intermediate level, teaching how to achieve specific things.

This first post is about getting your quotation marks right.

Typographer's quotes

Per default, typographer's quotes will be turned on for new documents in InDesign. As with all the settings in InDesign you can set your default preferences by launching the Preferences when all documents are closed.

When typographer's quotes are turned on, InDesign will use real quotation marks instead of primes. Luckily for english speaking people the default setting for quotes are “like this”. Bad luck for the rest of us, because that is wrong in most other languages, and it is really rare that people get it right.

Besides defining whether to use typographer's quotes in Preferences » Type, you can change which kind of quotes you wish to use in Preferences » Dictionary. When you change the quotes, remember to have the right language selected, because which quotes are typed depends on the language specified for the text you are writing. In Danish the correct quotation marks are „like this“ - for a nice list of usages in different languages, look at Wikipedia.

Danish quotation mark settings.

Danish quotation mark settings

Writing the quotes

When the typographer's quotes feature is turned on, InDesign will automatically write the right quotation mark when you type the character as you are used to. Remember that what marks are used depends on the language the text is set to.

An example of the real quotation marks in use.

An example of the real quotation marks in use

If you realize to late, that you were writing with the wrong quotes or language settings, it is never to late to change it. Select the right language and find/change is your solution: search for a primer ("), and change them to a primer ("). InDesign will find all quotation marks and change them to the right typographer's quotes, again depending on the language of text it is a part of and the Dictionary settings.

Find/change quotation marks.

Find/change quotation marks

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.

Changelog

1.2: InDesign CS5 support, and support for paragraph styles in paragraph style groups

I have been experiencing strange issues with the InDesign history after running some of my scripts (AppleScript or JavaScript).

Specifically I have created a floating palette using ScriptUI in JavaScript that contains a list of icon buttons, that when clicked runs an AppleScript, using doScript. This is an example of the code:

Running an AppleScript from JavaScript.

app.doScript(File('the_script.scpt'), ScriptLanguage.applescriptLanguage, ["argument_1","argument_2"], UndoModes.fastEntireScript);

Since the AppleScripts are performing a lot of actions, and I only want to save all these actions as one single "undo", I apply UndoModes.fastEntireScript to the doScript.

When I have run this script just once, the undo history of the InDesign document in general is changed. When working normally and undoing once, it will undo the last many steps and not just one step as usual.

What is the problem here? Does changing the UndoMode for a single script execution change the documents UndoMode as well? Is it a bug, or just an user error - what can I do to prevent it?