3

I am laying out a book that has line numbers on every fifth line. I want it to look like this:

line #    text line text line text line text line text 
          text line text line text line text line text
          text line text line text line text line text 
          text line text line text line text line text 
          text line text line text line text line text 
line #    text line text line text line text line text 
          text line text line text line text line text 
          ...

In my opinion the line number does not belong to the same line with the poem. So it is a paragraph. Then what I have is this:

line #
text line text line text line text line text 
text line text line text line text line text
text line text line text line text line text 
text line text line text line text line text
text line text line text line text line text 
line #
text line text line text line text line text 
text line text line text line text line text
...

What I did is:

  • I gave some left indent to all the text
  • I gave some space before to the paragraph style of text lines
  • I gave no space before, no left indent and a negative baseline shift to the line numbers

so i ended up with this:

line #    text line text line text line text line text 
          text line text line text line text line text
          text line text line text line text line text 
          text line text line text line text line text 
          text line text line text line text line text 

line #    text line text line text line text line text 
          text line text line text line text line text 
          ...

Although this seems to work, there remains a space between every fifth line. and I feel there should be a better / more elegant way to do this.

Any ideas?

3
  • The term you are looking for is an anchored or in-line object. I don't know the specifics, because in the documents of this sort which I have worked with, I have chosen to place such items manually in separate boxes. I think what you are trying to do is most likely the correct way: the line # do not really belong nested within the content of the poetry, so you want to anchor a separate text box, but you also want the line numbers to follow the text when or if it reflows due to changes in typesize etc.
    – horatio
    Commented Oct 13, 2011 at 15:32
  • Thank you @horation, I searched for the anchored objects and found adobe's documentation about it. Still, I am talking about 400 pages and 1600 line numbers here. I have already marked the text and the line numbers with the appropriate styles and prefer not to go through all of it to cut all the line numbers and paste them back in text boxes.
    – turzifer
    Commented Oct 14, 2011 at 4:36
  • One thing that is important: is it true that each line has a hard return (i.e. the enter key has been pressed)?
    – horatio
    Commented Oct 14, 2011 at 14:26

3 Answers 3

4

You've hit the reverse situation to the one I ran into when I added web desgin to my arsenal a few years ago. CSS and InDesign layout aren't the same thing, and need different thought processes. Semantic considerations, as in HTML, don't really apply here, but I suspect that's how you got the idea to make line numbers their own paragraphs.

Your line numbers need to change from a Paragraph Style to Nested Styles (Character Styles), without any baseline shift, and you need to use first line indents as Lauren suggests.

  • Replace the paragraph mark at the end of your first line number with a Tab. It'll look ugly, but ignore that for now. Clear overrides so it's all just your standard paragraph style (Alt/Option-click on the style name in the Paragraph Styles panel).

  • Edit the paragraph style so it uses nested character styles for your line numbers, ending at the first tab. (I used only one style, but you may have one for the word and another for the number. In that case, the first style applies to 1 Word, and the second applies through the Tab.) Set the tab stop the same as your left indent.

Nested Styles dialog

  • From your description, it looks like the text is set in paragraphs of five lines each, with either natural or forced line breaks and a hard return on line five, so you would set your indents something like this:

Indents

  • Now run a grep find/change to replace all hard returns in your line number paragraphs with tab characters:

grep Find/Change

  • Select all the applicable text (Ctl/Cmd-A will select all text in an entirely story).

  • In the Paragraph Styles panel, Alt/Option-click the modified paragraph style to apply it throughout and remove any leftover overrides.

6
  • 1
    +1 for all the awesome screencaps. I'd give you another +1 if I could for picking ye olde tyme spelt Chaucer. :) Commented Oct 15, 2011 at 1:35
  • 2
    How about that sneaky grep, eh? <examines fingernails, polishes them on lapel> Commented Oct 15, 2011 at 3:44
  • I really have to spend some quality time with GREP. I haven't used it enough to understand its awesome power. That and Object Styles. Commented Oct 15, 2011 at 12:17
  • grep search (my habit is to spell it lowercase because it's what I'm used to from Unix), and especially grep Styles are insanely useful. I could not imagine a book, brochure or multi-page anything without using them. And object styles -- oh, my. For sidebars, pull quotes, repetitive elements of any kind, they're indispensable time-savers. Cruise over to InDesignSecrets.com and you'll find much useful stuff on both. Commented Oct 16, 2011 at 19:32
  • Thank you Alan. Could you also translate your grep search phrase in english?
    – turzifer
    Commented Oct 17, 2011 at 4:30
3

If you want to keep with your original approach you must remove the leading of the line numbers ("0" leading for line numbers) and also remove the space before from the text lines (0 space before in text lines). I tested the complete procedure and I can confirm that the final result output will look as you specified.

1

Quick and Dirty Way: use tables.

  • Paste your text.
  • I don't know what your source text is like, but you'll have to dicker with it so that every line begins with either a line number and a tab or just a tab. Every line ends with a hard return.
  • Table→Covert Text To Table.
  • Column Separator: Tab; Row Separator: Paragraph.
  • Style as preferred.

Lengthy But Automated Way: use indents.

  • Paste your text.
  • Dicker with source text so that you have Line Number, Tab, text to end of line, soft return, then continue with text with a soft return at each break until you come to the end of the fifth line. There you use a hard return. This means each five-line set is a single paragraph.
  • Set your tab at (for sake of argument) 6p.
  • Set your Left Indent at 6p.
  • Set your First Line Left Indent at -6p. (Your First Line is the one with the line number. You want that to be farther left than where the actual text starts.)

Now your text lines will wrap nicely. Whether you use Space Before is entirely up to you, but from your example, you shouldn't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.