Math & Science ⇒ Line spacing within theorems
Line spacing within theorems
My theorems have single line spacing while the main body has 1.5 line spacing.
How do I change the codes below to get 1.5 line spacing for my theorems? Thanks.
\def\mystretch{1.5} % One-and-a-half spacing hack
\def\ds@doublespace{\typeout{Double spaced}} % This is default
% So we do not read this style twice
\def\ds@singlespace{ % If he explicitly wants single spacing
\typeout{Single spaced}
\def\mystretch{1}}
\def\baselinestretch{\mystretch} % Double spacing hack
% new option: doublethm for double-spaced theorems
\def\ds@doublethm{\def\thesisthm
{\advance\@topsep \baselineskip % adjust back again (see \@trivlist)
\def\baselinestretch{\mystretch}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi
\advance\@topsep -\baselineskip}}
\def\thesisthm{} % single-spaced theorems by default
% modify LaTeX theorem environments to allow double-spaced option
\def\@begintheorem#1#2{\trivlist \thesisthm
\item[\hskip \labelsep{\bf #1\ #2}]\it}
\def\@opargbegintheorem#1#2#3{\trivlist \thesisthm
\item[\hskip \labelsep{\bf #1\ #2\ (#3)}]\it}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Line spacing within theorems
\begin{theorem} \label{theorem:Continuity}\thesisthm \it
Suppose that Assumptions 5 hold, and that Algorithm \ref{AlgoSD} terminates after $n$ iterations with ...
...
\end{theorem}
Adding \thesisthm makes my theorems 1.5 line spacing, but somehow the fonts change from italics to regular font, so need \it to make it italics again. There must be a better way to do this, but what the heck...