Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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 elegsant way to do this.

Any ideas?

share|improve this question
    
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 Oct 13 '11 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 Oct 14 '11 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 Oct 14 '11 at 14:26
add comment

3 Answers 3

up vote 2 down vote accepted

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.

share|improve this answer
1  
+1 for all the awesome screencaps. I'd give you another +1 if I could for picking ye olde tyme spelt Chaucer. :) –  Lauren Ipsum Oct 15 '11 at 1:35
1  
How about that sneaky grep, eh? <examines fingernails, polishes them on lapel> –  Alan Gilbertson Oct 15 '11 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. –  Lauren Ipsum Oct 15 '11 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. –  Alan Gilbertson Oct 16 '11 at 19:32
    
Thank you Alan. Could you also translate your grep search phrase in english? –  turzifer Oct 17 '11 at 4:30
show 1 more comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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