Generalline spacing [baselinestretch]

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jezikk
Posts: 6
Joined: Sat Jun 28, 2008 8:31 pm

line spacing [baselinestretch]

Post by jezikk »

Hi,
I'm solving a problem with line spacing in the parts of text (article). For example the content I need to be made with line spacing 1.0 (standart) and other text with 1.5.

I tried to use command \renewcommand{\baselinestretch}{1.5} in front of assigned parts, but that was without efect.

I've attached part of my work. The parts that I want change line spacing in are marked.

Thank you
Attachments
LaTeX1.tex
(4.66 KiB) Downloaded 750 times

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

line spacing [baselinestretch]

Post by Stefan Kottwitz »

Hi jezikk,

I recommend the setspace package. That package provides commands (\singlespacing, \onehalfspacing and \doublespacing) and environments (singlespace, onehalfspace and doublespace) that allow to change the spacing within the document. You will find the documentation inside the setspace.sty file.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

line spacing [baselinestretch]

Post by localghost »

The setspace package offers commands to change line spacing wherever you want. Looking at your preamble, I suggest some changes, supplements and replacements.

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[czech]{babel}
\usepackage[bindingoffset=1cm,centering,includeheadfoot,margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{txfonts}
\usepackage{blindtext}

\begin{document}
  \onehalfspacing
  \blindtext

  \medskip
  \singlespacing
  \blindtext

  \medskip
  \doublespacing
  \blindtext
\end{document}
The package also offers environments with the same name as the switches. The reason why you shouldn't use the a4wide package can be found in l2tabu. Information about the used packages is available on the servers of the CTAN (Comprehensive TeX Archive Network) or in the CTAN Catalogue.


Best regards
Thorsten¹
jezikk
Posts: 6
Joined: Sat Jun 28, 2008 8:31 pm

Re: line spacing [baselinestretch]

Post by jezikk »

Ok,
pls where I have to insert the file setspace.sty?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: line spacing [baselinestretch]

Post by Stefan Kottwitz »

Hi jezikk,

do you use MiKTeX on Windows? Then you could install it with the MiKTeX Package Manager (Browse packages). But first check if it is already installed, try to compile your document after you included the line \usepackage{setspace} like Thorsten showed above.

Stefan
LaTeX.org admin
kuzmenko
Posts: 1
Joined: Fri Mar 20, 2009 5:01 pm

Re: line spacing [baselinestretch]

Post by kuzmenko »

Hi,
I use such structure

{\renewcommand{\baselinestretch}{1.5}
Your text1.
After this text you need insert blank line that make "Latex group".

}

{\renewcommand{\baselinestretch}{1}
Your text2.
After this text you need insert blank line.

}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

line spacing [baselinestretch]

Post by localghost »

The most common way is to use setspace because of better adjustment. Increasing interleaf this way is not recommendable.
Post Reply