4

How do I break lines manually?

Methods I use:

\linebreak
\\
\n

Which is the recommended one?

Example:

If I just put like this in my tex file,

This is for people who love VIM and for people who hate VIM.

Some of you may be wondering what VIM is...

Here you go...

the output is

This is for people who love VIM and for people who hate VIM.
Some of you may be wondering what VIM is...
Here you go...

But I want it to show

This is for people who love VIM and for people who hate VIM.

Some of you may be wondering what VIM is...

Here you go...

Update 2

Can I use \\[2cm] for vertical spacing?

David Carlisle
  • 757,742
ATOzTOA
  • 627

1 Answers1

6

If you want to this for the whole document, then the parskip package is probably the best option. As Joseph Wright says, the question Is there an easy way to have my whole document with a space between paragraphs rather than indentation? deals with this well.

If it is just for some individual lines where you want the extra space then there are other options. You can use one of \smallskip, \medskip or \bigskip or their break equivalents \smallbreak etc. Or you can load the setspace package that provides a double space environment.

Sample output

\documentclass{article}

\usepackage{setspace}

\begin{document}
\paragraph*{Normal}

This is for people who love VIM and for people who hate VIM.  

Some of you may be wondering what VIM is\dots  

Here you go\dots  

\paragraph*{medskips}

This is for people who love VIM and for people who hate VIM.  

\medskip
Some of you may be wondering what VIM is\dots  

\medskip
Here you go\dots

\begin{doublespace}
\paragraph*{Double space}

This is for people who love VIM and for people who hate VIM.  

Some of you may be wondering what VIM is\dots  

Here you go\dots  
\end{doublespace}

\end{document}

I you wish to remove the indentation at the beginning of a paragraphs, then you can issue \noindent on each occaision, or \setlength{\parindent}{0pt} globally or e.g. inside the doublespace environment.

Should wish to specify the vertical gaps in sizes other than those provided by the skip commands, then latex has the \vspace command used as \vspace{2cm}.

Here is an illustration of both points:

Sample output

\documentclass{article}

\usepackage{setspace}

\begin{document}

\noindent
This is for people who love VIM and for people who hate VIM.  

\medskip\noindent
Some of you may be wondering what VIM is\dots  

\vspace{2cm}\noindent
Here you go\dots

\vspace{2cm}

\begin{doublespace}
\setlength{\parindent}{0pt}

This is for people who love VIM and for people who hate VIM.  

Some of you may be wondering what VIM is\dots  

Here you go\dots  
\end{doublespace}

\end{document}

If you are using the one of the koma classes or memoir, then they include other commands for this type of situation.

Andrew Swann
  • 95,762