5

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
2
  • @HarishKumar This gives me an error saying that the paragraph has not ended
    – Chris J
    Jan 2, 2014 at 23:20
  • @HarishKumar Works when /par is not included. If anyone has a non-ERT way of doing it that would be helpful
    – Chris J
    Jan 2, 2014 at 23:22

1 Answer 1

5

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .