## LaTeX forum ⇒ Text Formatting ⇒ Spacings and paragraphs in bibliography (and other places) Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Cham
Posts: 820
Joined: Sat Apr 02, 2011 4:06 pm

### Spacings and paragraphs in bibliography (and other places)

I need to clear up a few things I see everywhere on the internet, about proper spacings and paragraphs commands. Many people are still using some very old and obsolete commands in LaTeX, so I don't want to learn wrong habits.

I'll take the specific example of a bibliography. Here's a MWE to work with (the class is arbitrary here. I took it from some real papers on arXiv, and modified it to show the main things I want to concentrate on) :
\RequirePackage[l2tabu,orthodox]{nag}\documentclass[11pt]{revtex4-1} \begin{document} \begin{thebibliography}{999}\bibitem{bibitem1}\uppercase{Some one}, \par \textit{Title 1}, \par Found.\ Phys.\  \textbf{47}, no. 6, 797 (1980). \medskip \bibitem{bibitem2}\uppercase{Some guy}, \par \textit{Title 2}, \par Phys.\ Rev.\ D \textbf{65}, 103522 (1990).\end{thebibliography} \end{document}

So, should I use \ (for a space) as shown in this example ? Or use ~ instead ? Or somehing else ?

For a change of paragraph in text mode, Should I use \\ (I believe this is obsolete), or \par, or \newline (or even something else) in the bibliography?

Johannes_B
Site Moderator
Posts: 3585
Joined: Thu Nov 01, 2012 4:08 pm
\ is a space, which can be broken upon lines, while ~ is unbreakable.
\\ is never to be used outside tabulars end equations. If you want to start a new paragraph, leave an empty line in the source code.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Cham
Posts: 820
Joined: Sat Apr 02, 2011 4:06 pm
If \ is a simple breakable space, why people are using it in their code ? I'm wondering about this since I see \ very often in arXiv codes (or from other places). I suspect that \ is totally useless.

For a journal name made of several words, should we "link" the words with a unbreakable space (i.e. ~) ? What about people names, ex: "Albert Einstein", or "A., Einstein" ? Should we write "Albert~Einstein", or "A.~Einstein" ? I'm expecting some typographical conventions here.

Johannes_B
Site Moderator
Posts: 3585
Joined: Thu Nov 01, 2012 4:08 pm
Albert Eistein
A.~Einstein
I am a \LaTeX\ fan.

It really depends on what you want to get.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 8537
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
\ is a white space. It's not a space between commands or commands and stuff. A simple space ends a command name. So,

• \TeX ing prints TeXing
• \TeX\ user prints TeX user (with the space)
• \TeX~user prints TeX user (with nonbreaking space)

One normally uses spaces in text, they are commonly printed. But a space that ends a command is not printed. So one can enforce a printed whitespace with the backslash. The non-breaking space is just for when you really don't want an annoying break, such as with "S.~Kottwitz" when I don't want to have just S. at the end of a line.

Stefan

Johannes_B
Site Moderator
Posts: 3585
Joined: Thu Nov 01, 2012 4:08 pm
\~ is the control sequence to print a tilde as a diacritical.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 8537
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Thanks, corrected. I normally don't use such a thing.

Stefan