[Tex/LaTex] What does double backslash in LaTeX mean

math-mode

What does double backslash in LaTeX mean ? (please see example below)

label 2-1 & label 2-2 & label 3-3 & label 4-4 & label 5-5 \\

\verb= http:\\www.chinatex.org=\\

some line have \\ while other line don't, which makes me confused.

Best Answer

The \\ is context-dependent macro in LaTeX. It means that it is internally redefined in various situations and various LaTeX environments. By default it is \hfil\break and this can be used inside the paragraphs in order to "destroy" the normal paragraph formatting. Many LaTeX users use these destroyed paragraphs because they don't know that normal end of paragraph does the similar result.

The typical mistake of novice users is the usage of \\ at the end of the paragraph. Then we have \hfil\break\unskip\nobreak\hskip\parfillskip at the end of the paragraph and the \break consumes all followed removable items including \hskip\parfillskip. The bad paragraph is produced with the warning message "Underfull hbox (badness 10000)". But novice users don't read the log nor terminal messages, unfortunately.

The \\ is redefined as \cr primitive in tables. The \cr primitive isn't mentioned in common LaTeX manuals and LaTeX users are confused when TeX error message "Extra alignment tab has been changed to \cr" occurs.

The \\ is redefined by \par in centering environments etc.

The \\ macro is source of many confusions for LaTeX novice users.

Plain TeX does not define \\. This control sequence is reserved for user definitions.

Note curious example in our question: http:\\www.chinatex.org. I never seen such URL. Maybe you have meant http://www.chinatex.org.