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 designing a titlepage for my report and I am a bit confused in deciding to use either \par\vspace{2cm}\noindent or \\[2cm] (for example).

Shortly speaking, what are the differences between \par\vspace{2cm}\noindent and \\[2cm]? When do we have to only use one rather than the other one?

If MWE is really needed, see the following.

\documentclass[12pt]{book}
\usepackage[a4paper,margin=25mm,showframe=true]{geometry}
\usepackage{graphicx}
\usepackage{palatino}


\begin{document}

\begin{titlepage}
\bfseries
\begin{center}
{\LARGE \sffamily Dissertation} \\[15mm]
{\large   ``The simplest proof of the last theorem of Fermat''}\\[5mm]
{\itshape A proof that elementary students can understand}

\vspace{2cm}
\includegraphics[scale=.5]{mit-logo}%http://mindenfele.nolblog.hu/files/2014/04/mit_crest_logo.jpg

\vspace{2cm}
{\LARGE \sffamily Donut E. Knot}

\vfill
\begingroup
    \large \sc
    Deparment of Mathematics \\[4mm]
    Massachusetts Institute of Technology \\[4mm]
    Boston, USA \\[4mm]
    2014
\endgroup

\end{center}
\end{titlepage}

\end{document}

enter image description here

share|improve this question
    
This question might be too basic but I have not understood it because I heavily focus on PSTricks when using LaTeX, as a result, my skill in LaTeX has not significant progress. I am sorry for this inconvenience and thank you for your cooperation. –  stalking is prohibited Aug 28 at 6:30
3  
This basically boils down to When to use \par and when \\?. But i think on a titlepage, it doesn't matter what to use. But be careful to use real \pars in text. –  Johannes_B Aug 28 at 7:38
1  
Not directly relevant here, but \sc should be replaced by \scshape. –  Joseph Wright Aug 28 at 7:55
    
Why the center environment, which has the consequence of not setting the final line at the bottom of the text block? Use \centering. –  egreg Aug 28 at 8:51

2 Answers 2

up vote 8 down vote accepted

At the TeX level using \\ doesn't start a new paragraph while using \par obviously does. As noted in comments, When to use \par and when \\ covers the difference between the two in general. To see what is going on in the current case, where we are talking about 'design', a small demo such as

\documentclass{article}
\begin{document}
\tracingoutput=2
\showboxbreadth=\maxdimen
\showboxdepth=\maxdimen
\noindent
Hello world\\[2cm]
More text
\newpage
\noindent
Hello world\par\vspace{2cm}\noindent
More text
\end{document}

is useful. Looking over the log, we see for the first case that between the two parts we have

....\penalty 10000
....\glue 0.0 plus 1.0fil
....\penalty -10000
....\glue(\rightskip) 0.0
...\glue 56.9055
...\penalty 300
...\glue(\baselineskip) 5.16669
...\hbox(6.83331+0.0)x345.0, glue set 301.63881fil

while in the second there is

....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\glue 56.9055
...\glue 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.16669
...\hbox(6.83331+0.0)x345.0, glue set 301.63881fil

With the standard settings you are not going to see any difference, but if for example \parfillskip was set to something for 'special effects' the results could be different. (In the \\ case, \hfil is inserted so will always be \glue 0.0 plus 1.0fil.) Similarly, notice that using \par adds a \parskip glue element, which again here is zero length with a small amount of stretch but could be a fixed value: this applies in addition to any \vspace. (Try \setlength\parskip{2cm} to see this.)

As in the more general case of comparing \par and \\ I'd suggest thinking about meaning. In the example in the question, the lines manually spaced out are conceptually connected (all part of an address), so \\ seems more natural than \par. The latter is often used between different 'blocks' in a title page: the parts are logically separate and often have font differences too.

share|improve this answer
    
The extras added by \par probably don't show up in most title pages, but you need to remember that they are there! –  Joseph Wright Aug 28 at 7:54
    
In the center environment (and under \centering as well), \\ does issue \par. –  egreg Aug 28 at 9:40
    
@egreg Reasonable point. I was aiming at the general case, which is what the title has: should I edit or will you post an answer about the possibility of a change down to the environment? –  Joseph Wright Aug 28 at 9:54

Beware of

{\large   ``The simplest proof of the last theorem of Fermat''}\\[5mm]

as if the title ended up being more than a line you would have large text set to a normal baseline and inconsistent spacing, size changes should almost always include the end of the paragraph so

{\large   ``The simplest proof of the last theorem of Fermat''\par\vspace{5cm}}

is better in that case. Outside of a title page (or tables) then any use of \\ or \noindent is usually a sign that something is wrong, so the differences in general don't matter.

share|improve this answer
    
Is there a difference if I remove the \vspace{5cm} from the block in your 2nd example above and append it to the following line? –  stalking is prohibited Aug 28 at 12:58
1  
@cyanide-basedfood no –  David Carlisle Aug 28 at 14:04

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.