Text FormattingSetting line spacing in mm or pt

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
engtex
Posts: 2
Joined: Mon Aug 26, 2013 1:00 pm

Setting line spacing in mm or pt

Post by engtex »

Hi,

Thoroughly enjoying moving over from Word to Latex/Lyx for my thesis. I've been a long-time user of Word and never know of decent alternatives; I don't think I'll be using Word again!

My institution stipulates 8mm/22.7pt line spacing, however I haven't been able to find an option for entering these units, I've only seen the option of specifying double, single, etc.

Is it possible to set arbitrary line spacing?

Thanks :)

Recommended reading 2024:

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

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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Setting line spacing in mm or pt

Post by cgnieder »

Hi engtex,

Welcome to the LaTeX community! Sounds like LaTeX has a new fan :)

LaTeX doesn't actively encourage changing the line spacing but of course it can be done LaTeX's way is to set \linespread or \baselinestretch which is a very unintuitive:

\linespread{<ratio to original>}, or
\renewcommand\baselinestretch{<ratio to original>}.

For both you'd need to calculate the needed ratio depending on the chosen font size and its default leading. For a 11pt font this is 13.6pt:

Code: Select all

\documentclass[11pt]{article}
\linespread{1.6691}% 22.7/13.6
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
A maybe cleaner approach and definitely the easier one is using the leading package. There you don't need to know the default leading but can simply specify the new value:

Code: Select all

\documentclass[11pt]{article}
\usepackage{leading}
\leading{22.7pt}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
Regards
site moderator & package author
engtex
Posts: 2
Joined: Mon Aug 26, 2013 1:00 pm

Re: Setting line spacing in mm or pt

Post by engtex »

Thanks for the detailed reply :)

I found that Lyx wasn't able to format the text as well/intelligently with my custom line spacing, so I've reverted back to standard double spacing.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Setting line spacing in mm or pt

Post by cgnieder »

Oh, I missed the fact that you're using LyX. In that case you could try not to set line-spacing with LyX' options and add

Code: Select all

\usepackage{leading}
\leading{22.7pt}
to the preamble.

Regards
site moderator & package author
Post Reply