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.

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?

share|improve this question
7  
It's recommended not to use line breaks in normal text at all. Some line-oriented environments like tabular define \\ in a special way, so that's what should be used in there. –  Stephan Lehmke Feb 5 '13 at 9:28
3  
Also, \n is not a line break at all for (La)TeX: the nearest equivalent would be \linebreak, but as @StephanLehmke comments you normally should not be using it. –  Joseph Wright Feb 5 '13 at 9:39
2  
It looks like you are wanting 'blank lines' (whitespace) between paragraphs: see Is there an easy way to have my whole document with a space between paragraphs rather than indentation?. –  Joseph Wright Feb 5 '13 at 11:06
2  
\usepackage{parskip}, as in the question Joseph linked to? –  Torbjørn T. Feb 5 '13 at 12:10
2  
@ATOzTOA by default \n is not defined at all in LaTeX it isn't applicable to tabular or anything else. If you do not get an error message you must be defining it locally. –  David Carlisle Feb 5 '13 at 12:22

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Paragraph will work, but I don't want the title or the indent. –  ATOzTOA Feb 5 '13 at 11:53
    
@Andrew I'd be tempted to use \section rather than \paragraph, partly as people misunderstand it and partly as you'd normally start with \section divisions in the article class. –  Joseph Wright Feb 5 '13 at 11:57
    
@JosephWright I have added second example without the headings. –  Andrew Swann Feb 5 '13 at 13:09
    
I have an issue, when i use parskip, the tabular environment gets a let of vertical space before and after. Anyway I can disable parskip for tabular alone? –  ATOzTOA Feb 6 '13 at 10:37
    
You should ask this as a separate question. –  Andrew Swann Feb 6 '13 at 10:42

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.