2

It's fairly easy to control the length between lines separated by an empty line using \setlength{\parskip}. I'm wondering if there's a similar command that dictates the default/global length of the manual line break provided by \\.

3
  • \\[length] will do. However, \\ should not be used in general text, except in unusual circumstances. – Steven B. Segletes Mar 4 '15 at 4:50
  • I'm familiar with that option. My question is regarding whether there's a way to globally alter the default length. I've edited the original question to reflect this. – TheMac Mar 4 '15 at 4:52
  • One of the issues is that \\ is modified often by various environments, etc. So, even if you globally redefine it with a new break distance, it won't apply in all cases. – Steven B. Segletes Mar 4 '15 at 4:53
1

\\ is an in-paragraph line break so the spacing is \baselineskip You can change \baselineskip but it will change all linespacing in the paragraph for automatic and for forced breaks.

It would of course be possible to change the definition of \\ to do anything else

\def\\{hello}

for example, but it is best not to. If the markup is intended to show something other than a normal break within a paragraph (but just chosen by the author rather than by the system) then \\ is the wrong markup.

1

You can add an optional line break gap using \\[<len>]:

enter image description here

\documentclass{article}

\begin{document}

This is \\
a line that is \\[5pt]
farther apart than \\
others.

\end{document}

For a more general spread of lines, consider looking into the setspace package.


Perhaps the following might also be of interest:

enter image description here

\documentclass{article}

\makeatletter
\newcommand{\pargap}[1][0pt]{%
  \par
  \ifdim#1>\z@
    \vspace{\dimexpr-\baselineskip-\parskip+#1}
    \noindent
  \fi}
\makeatother

\begin{document}

This is a line that is

\pargap[5pt]

farther apart than others.

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.