Text Formattingsetstretch and a blank line

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
vita001
Posts: 17
Joined: Sun Mar 20, 2011 1:04 am

setstretch and a blank line

Post by vita001 »

Hi, I notice that setstretch only works when there is a blank line following the paragraph. In the following example, setstretch has no effect if we delete the blank line above setstretch{1}. Why it is so?

Code: Select all

\documentclass[compress]{beamer}
\usepackage[english]{babel}
\usepackage{setspace}
\begin{document}
\begin{frame}[t]{blablabla}
\setstretch{1.667}
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 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 bla bla

\setstretch{1}
\end{frame}
\end{document}

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10397
Joined: Mon Mar 10, 2008 9:44 pm

setstretch and a blank line

Post by Stefan Kottwitz »

Hi,

the blank line is a paragraph break. You could remove the blank line and add \par instead to see that it works without the blank line. The stretch is for the paragraph. If you call \setstretch{1} before the paragraph break (by the blank line), it changes again the stretch value of the paragraph.

Stefan
LaTeX.org admin
Post Reply