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}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
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...