[Tex/LaTex] Vertical spacing in multi-line title

formattinglyxspacingtitles

Using LyX I have set the document to 1.5 spacing and it is applying to my title causing a weird space since my title goes into a second line. Other places in the document changing the paragraph setting to single line spacing manually (paragraph setting -> line spacing) works fine, but it isn't working in the title. Any ideas how to make the spacing between the lines of my title single instead of 1.5?

Here is the code for the title:

\begin{singlespace}

\title{Long title Long title Long title Long title Long title Long title Long title Long title Long title}
\end{singlespace}

\maketitle

Best Answer

The problem here is that the paragraph spacing is set around the \title macro, which does sets nothing. The title is only set with a call to \maketitle, which still has the original OneHalf spacing. You would have to update \maketitle to surround itself by the appropriate spacing.

Add the following to your Document > Settings... > LaTeX Preamble:

\let\oldmaketitle\maketitle% Store old \maketitle
\renewcommand{\maketitle}{% Update \maketitle
\begin{singlespace}
  \oldmaketitle% Use singlespace
\end{singlespace}}

enter image description here

Related Question