General ⇒ line spacing [baselinestretch]
line spacing [baselinestretch]
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
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 751 times
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]
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
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
line spacing [baselinestretch]
The setspace package offers commands to change line spacing wherever you want. Looking at your preamble, I suggest some changes, supplements and replacements.
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¹
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}
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: line spacing [baselinestretch]
Ok,
pls where I have to insert the file setspace.sty?
pls where I have to insert the file setspace.sty?
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: line spacing [baselinestretch]
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
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
Re: line spacing [baselinestretch]
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.
}
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.
}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
line spacing [baselinestretch]
The most common way is to use setspace because of better adjustment. Increasing interleaf this way is not recommendable.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10