Document Classesdoublespacing in Beamer

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
vita001
Posts: 17
Joined: Sun Mar 20, 2011 1:04 am

doublespacing in Beamer

Post by vita001 »

I tried several ways for doublespacing in Beamer but none of them are working.
In the following code, I use \linespread{2} in the first frame, instead of doubling the line space , it increases the space between math equation and the text. In the third frame, I use \begin{doublespace}\end{doublespace} from the package of setspace. It doesn't even compile.
Thanks.

Code: Select all

 
\documentclass[compress]{beamer}
\mode<presentation> {
 \usetheme{Warsaw}
  \usefonttheme[onlymath]{serif}
  \setbeamercovered{transparent}
  \setbeamertemplate{headline}[default]
  \setbeamertemplate{footline}[default]
}

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage{courier}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{subfigure}
\usepackage{fancybox}
\usepackage{setspace}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}
\frametitle{A {\it Preconditioned} Smoothing Scheme}
%\doublespacing
\linespread{2}
\textcolor{blue}{\it smoothing steps:} for $j=1,2,\ldots,m$, 
    $$\hat{z}_j\leftarrow \hat{z}_{j-1}+\lambda_k(\psi_k-A_k\hat{z}_{j-1}),$$
    need doublespacing for this line; need doublespacing for this line; need doublespacing for this line
    \vspace{\baselineskip}
\end{frame}
\begin{frame}
\frametitle{A {\it Preconditioned} Smoothing Scheme}
\textcolor{blue}{\it smoothing steps:} for $j=1,2,\ldots,m$, 
    $$\hat{z}_j\leftarrow \hat{z}_{j-1}+\lambda_k(\psi_k-A_k\hat{z}_{j-1}),$$
    need doublespacing for this line; need doublespacing for this line; need doublespacing for this line; 
    \vspace{\baselineskip}
\end{frame}

\begin{frame}
\frametitle{A {\it Preconditioned} Smoothing Scheme}

\textcolor{blue}{\it smoothing steps:} for $j=1,2,\ldots,m$, 
    $$\hat{z}_j\leftarrow \hat{z}_{j-1}+\lambda_k(\psi_k-A_k\hat{z}_{j-1}),$$
    \begin{doublespace}
    need doublespacing for this line; need doublespacing for this line; need doublespacing for this line; 
    \end{doublespace}
    \vspace{\baselineskip}
\end{frame}
\end{document}
Last edited by vita001 on Tue Mar 29, 2011 6:46 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

vita001
Posts: 17
Joined: Sun Mar 20, 2011 1:04 am

doublespacing in Beamer

Post by vita001 »

I solved the problem but I don't know why.

Code: Select all

\begin{frame}
\frametitle{title}
\setstretch{1.667}
We have
$$A+B+C=D$$
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla blabla bla bla bla bla bla bla bla bla bla\\   
\end{frame}
notice the double slash at the end. Without it, \setstretch{} doesn't work.
If someone knows why, please explain to me.
Post Reply