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 am writing one report using LaTeX and R. I just found \vspace can be used for \newline. May I know how much \vspace == \newline?

 \vspace{x cm} = \newline
  x = ?
share|improve this question
1  
For what do you need \newline anyway? You should use an empty input line or \par to denote a new paragraph. If you want to use paragraph spacing instead of indention, you may look at the parskip package (→ How should I do manual line breaks?) or the appropriate ways to do this with KOMA-Script or memoir. Anyways, you are probably looking for \vspace{\baselineskip} –  Qrrbrbirlbel Mar 18 '13 at 3:57
    
This is a better question/answer on that matter: Is there an easy way to have my whole document with a space between paragraphs rather than indentation? If these answers do not apply to your use-case, you will need to provide more information: Class? MWE? What has R to do with it? –  Qrrbrbirlbel Mar 18 '13 at 4:09

1 Answer 1

up vote 7 down vote accepted

There is no such relationship between \vspace and \newline!

\vspace semantics

  • in vertical mode (between paragraphs) \vspace adds an additional vertical space as defined by the argument
  • in horizontal mode (within a paragraph) \vspace adds an additional vertical space between lines after the end of the current line, i.e., it doesn't act on the current point in the paragraph unless that happens to be a natural line break by chance.
  • in either case the extra space with be dropped if it falls into a page break (\vspace* in contrast keeps the space always).

\newline semantics

  • in vertical mode \newline simply generates and error: "! LaTeX Error: There's no line here to end."
  • in horizontal mode it ends the current line at the current point and starts a new one.
  • if two \newline commands come directly after each other they result in an empty line but with an additional warning message: "Underfull \hbox (badness 10000) in paragraph at..." so this is not necessarily the best way to generate empty lines.

The command \\ works (in most environments) similar to \newline but allows to specify an optional argument that defines the extra space that should be added after the current line. Thus in a normal paragraph \\[\baselineskip] would generate an empty line and so would \vspace{\baselineskip}\linebreak. Notice that the \vspacehas to come first, otherwise it would apply not after the line with the linebreak but one line later!

share|improve this answer
    
I wish the OP would uncheck my answer and check yours :( –  Jubobs Mar 19 '13 at 12:24
1  
@Jubobs don't worry. seems good enough to link in your answer to mine for details –  Frank Mittelbach Mar 19 '13 at 16:02

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.