is now part of CreativePro.com!

The Great Paragraph Composer Paradox

11

One of my favorite sessions at the InDesign Conference in Seattle was the one on text composition by Anne-Marie and Eric Menninga of Adobe. I could’ve sat there for hours. Eric was casually dropping great nuggets of composition knowledge; one of which was mentioned by Anne-Marie in podcast 91 (how the paragraph composer can actually hide the line that’s causing a composition problem by averaging the error across several “good” lines).

I furiously filled several pages of my conference book with notes about the super secret details of composition. Only problem was, I scribbled so fast that now I can’t read some of my own writing. Apparently, I was very excited to learn about things like “switch blade pilcrow fries.” D’oh!

One thing I do remember very clearly was Eric saying that when you place an object with text wrap inline, the paragraph silently switches from the Adobe paragraph composer to the single-line composer. I say “silently” because there is no alert, and the Control panel still says the paragraph is using the paragraph composer. But sure enough, if you edit the text, the only lines that recompose are those after your cursor, which is the hallmark of the single-line composer. If you remove the inline graphic, or the text wrap, the paragraph goes back to normal paragraph composer behavior (all lines may recompose as you edit text).

Eric’s explanation of this phenomenon was interesting too. He compared trying to use the paragraph composer with a text-wrapped inline object to the time travel paradox, where you build a time machine, go back in time, and accidentally kill your grandfather. But if your grandfather died, then you wouldn’t be born, and thus couldn’t go back in time and kill him. But then if you didn’t kill him, you would be born, and could go back in time…and accidentally kill him. Mmm, that’s paradoxilicious.

The explanation of the composition phenomenon is only slightly more mind-bending. In order to use the paragraph composer, InDesign must consider the positions of all the words in the paragraph and decide when to adjust their spacing, when to hyphenate them, and when to wrap them. When you add an inline object with text wrap, you create a grandfather paradox. To compose the paragraph, InDesign wants to compare all the inline object’s possible positions in order to pick the best one. Those positions would be affected by text, but that text is affected by the text wrap. Compositionally-speaking, the inline graphic would be killing its own grandfather (with text wrap). In other words, the object’s position would be determined by text that won’t be there because it’s been moved by the text wrap. Therein lies the paradox. Whew, I think I’d have an easier time explaining General Relativity. Maybe Einstein could tell us where the inline graphic should go. Or maybe I just need to watch Back to the Future to figure this out. Anybody have a DeLorean I can borrow?

Simply put, with the paragraph composer turned on, InDesign can’t calculate all the possible locations of an inline object, so it gives up and uses the single-line composer (without telling you).

Here’s an illustration. Identical text frames, with a graphic placed in the same relative position. On the left, the graphic is placed inline. On the right, the graphic is free-floating. The Control panel says that both sides are using the paragraph composer. But only the one on the right will re-break lines before your cursor.

To prove it, in both frames I inserted a discretionary hyphen before the word “repeat” to prevent it from hyphenating.

The one on the right (with the free-floating graphic) re-wrapped all the lines to try and make a nicer rag. The one on the left with the inline graphic, did not. Good thing, too. Who knows what would happen to the fabric of space-time if InDesign had managed to re-wrap those lines?

I’m still amazed that such a simple and familiar act has such an interesting backstory. Indeed, who knew mixing an inline graphic with the paragraph composer was a recipe that could undo the cosmos itself? These are the things you learn on a trip to InDesign’s homeland. There’s more to come from that session. I still have pages of notes to decipher. Can’t wait until my next post, on those amazing switch blade pilcrow fries!

Editor in Chief of CreativePro. Instructor at LinkedIn Learning with courses on InDesign, Illustrator, Photoshop, GIMP, Inkscape, and Affinity Publisher. Co-author of The Photoshop Visual Quickstart Guide with Nigel French.
  • Lee says:

    Great Scott! :)

    I must admit, I still don?t actually understand why InDesign can?t just consider every possibility. Is this really paradoxical to program, or just very difficult?

  • Klaus Nordby says:

    Who would have thought relativity applied to InDesign?!

    The Paragraph Composer rocks, of course — but not enough. What I — and anyone who desires good typesetting — want is this new feature: an ability to force short words away from the right edge. The reason is that, say, the English words “I” or “a” — and even two-letter words like “to,” “at,” etc. — often look damnably clumsy on the right edge, so I must manually force them down to the next line. (Ditto for many other languages.) But that’s really too stupid, boring work for a human being to do across a whole book or other long document — even though Olden Days typographers did this. So we need an Option in the Paragraph Composer to “Force (X) long words away from edge”.

    So please listen, Eric Menninga: you can’t retire on us yet!

  • Here’s another fun tidbit Eric dropped on us in that session: You know that Hyphenation Zone setting in the Hyphenation dialog box? Don’t even bother with it; it doesn’t really work. It was a feature that was relevant on really slow computers a decade ago, but just isn’t helpful today. If I recall, he couldn’t really even get it to do anything during the talk. It’s the appendix of InDesign, I guess.

  • Fritz says:

    What happens if you make the inline graphic a condition. If you turn the condition on/off does it switch back and forth between the single-line and paragraph composer?

    Be careful, we don’t want to disrupt the space-time continuum.

  • Mike Rankin says:

    David-

    You mean the “Nigel” slider, right? (aka the better spacing vs. fewer hyphens thingy). I can force text to wrap instead of hyphenating by upping the HZ number, but nothing ever happens when I use the slider.

    Fritz-
    Great question: I just tried it and it stays stuck on pseudo-single-line composer behavior, even with the graphic hidden. Guess the engineers didn’t want to risk opening up a black hole on our desktops, so they played it safe.

  • Erica Gamet says:

    I just recently found out that the hyphenation zone only applies when working in Single-line composer mode, anyway. Since I never am in that mode, that would explain why I could never get it to work either. But it sounds like maybe it NEVER works? I won’t feel bad skipping over that option when explaining the Hyphenation dialog.

    Thanks for this tidbit on inline graphic text wrap…great stuff!

  • @Mike: No, I meant HZ. Nigel works fine for me. HZ works, but he seemed pretty clear that it wasn’t worth the effort and I got the feeling it was just code that no one had looked at in this century.

  • Suddha Satta Ray says:

    Hi,

    I have a question on composition.

    I have left-aligned text on which I have applied slight (-)ve tracking (in fact -3 on 12 pt) running into 15 pages or so.

    My question is does Indesign automatically “adjusts” the inter-word spacing for me? I am asking this because my text is slightly (-)ve tracked, which I understand would increase the inter-word spacing.

    Thanks in Advance,
    Suddha Satta Ray

  • @Suddha: I don’t know what you mean by “adjusts the inter-word spacing,” but I do know that applying local formatting like this over such a large space is not a good idea. If you want to adjust the letter spacing (or word spacing) for an entire paragraph, it is much better to use the features in the Justification pane of the paragraph style dialog box.

  • Rudi says:

    @ Klaus Nordby:
    Very simple solution: Add a GREP style in order to prevent the “I”s and “a”s from being the last word at the right edge of a text frame. Just assign eg a character style “no break” to the following space character.

    The “no break” attribute is the only one that really prevents the line break under all circumstances.

    We do this all the time for customers who publish in English (I, a) or in Russian. (( I tried to insert some Russian one-character-words here, but unfortunately got a bunch of error messages from the WordPress system because of their UTF-8 coding.))

    Rudi

  • Jongware says:

    Rudi, Klaus,

    That seems to work with this GREP style:

    \<\w\w? [one space here!]

    A drawback could be that it also keeps all one and two letter words in a row together … ("He is at a U in Utah"). Also, since \w also does pick up digits but doesn’t pick up hyphens, for “UTF-8” it’ll always keep “-8” with the next word.
    But I guess replacing the \w with a slightly more complicated expression might work.

    (Apart from the No Break, I also put in a thick coloured underline for a background, so I could see where it was applied whilst experimenting.)

  • >