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 = ?
line-breakingspacing
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 = ?
Best Answer
There is no such relationship between
\vspace
and\newline
!\vspace
semantics\vspace
adds an additional vertical space as defined by the argument\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.\vspace*
in contrast keeps the space always).\newline
semantics\newline
simply generates and error: "! LaTeX Error: There's no line here to end."\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\vspace
has to come first, otherwise it would apply not after the line with the linebreak but one line later!