Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to adhere to the traditional '80 character' line length limit in my .tex source file.

How do I do a new line in the source but not in the document output?

share|improve this question
    
A new line in the input counts as a space in the output. –  egreg Jan 10 '13 at 17:41
    
Accept that answer if you like! Thanks :) –  Todd Davies Jan 10 '13 at 17:42

2 Answers 2

up vote 13 down vote accepted

From the TeXbook, p. 25

And now comes the good news, if you haven't used computer typesetting before: You don't have to worry about where to break lines in a paragraph (i.e., where to stop at the right margin and to begin a new line), because TeX will do that for you. Your manuscript file can contain long lines or short lines, or both; it doesn't matter. This is especially helpful when you make changes, since you don't have to retype anything except the words that changed. Every time you begin a new line in your manuscript file it is essentially the same as typing a space. When TeX has read an entire paragraph—in this case lines 7 to 11—it will try to break up the text so that each line of output, except the last, contains about the same amount of copy; and it will hyphenate words if necessary to keep the spacing consistent, but only as a last resort.

Remember also that spaces are ignored at the start of a line and that a sequence of spaces is equivalent to one. However, a blank line will count as an end of paragraph command.

share|improve this answer

It helps to use linebreaks wisely: Indent your LaTeX source for readability, split lines at punctuation or into phrases. That way most changes involve shuffling lines around, which is easier than snipping and pasting between lines.

share|improve this answer

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.