is now part of CreativePro.com!

Add Custom Text at the Beginning of Each Line

6

M.F. wrote to ask:

I am looking to add some predefined text before a paragraph of a given style. For example, any paragraph set to the style should start with “Sponsored by:”

I love this kind of automation, because it turns out that it’s quite easy to do, and it can save a huge amount of time. No, it doesn’t require grep or scripting. It’s far easier, but it requires thinking outside the box. The solution uses automatic paragraph numbering.

Here’s the thing: Just because it’s called paragraph numbering doesn’t mean you have to use it for numbering! For example, here’s a paragraph style that should work for you (I cropped it so that you could see the important info well):

numbering with text

See how I have changed the Number field to “Sponsored by “? There is no numbering in there, but whenever you apply this paragraph style, all the text will get the text you want at the front. Here’s an example in which the first three paragraphs have been styled with the paragraph style:

naming with numbers

Of course, the great thing about this is that it’s easy to edit later… just change the paragraph style!

I wrote an article in InDesign Magazine (issue 38, I think) about how you can use a similar trick to add visual icons to the beginning of each line.

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • Alan Gilbertson says:

    By such happy tricks, hours and hours of production time are saved! :)

  • Etienne says:

    Thank you for this “astuce”.
    But now, I want the same easy trick but at end of line…
    12,45 _?_
    13,01 _?_
    x _?_
    Or something like that.

  • @Etienne: I don’t think there is a way to do this automatically, though you can do it with a GREP find/change:
    Search for (.)$ which means any one character at the end of a paragraph
    and replace with $1 ? which means replace it with the character you found (the one inside the parenthesis) followed by a space and a euro symbol.

  • nnes says:

    might come in handy, thanks :-)

  • Sandee Cohen says:

    I use this trick for the TIP paragraphs in my book. The word “TIP” is created using the Number text. A tab character is also inserted in the Number text.Then when I apply the paragraph style for tips, the word automatically appears.

    There are two benefits for this. This first is the obvious one that I don’t have to type the word “TIP.”

    But the second one means I have the flexibility to switch a paragraph from tip to body copy, which has no numbering, without having to delete the word “TIP” or the tab character.

  • >