43 votes
Accepted

Understanding line height / line spacing / baselineskip in LaTeX

Your first assumption and picture of \baselineskip were correct, but Consequently I assumed setting \baselineskip equal to font size should result in lines "touching" each other Is wrong for two ...
33 votes
Accepted

How to style blockquote?

(2021/06/22: I updated this answer in response to @moewe's very helpful comment, that some settings in the lipsum package changed since I posted this answer back in 2016. The update below consists of ...
  • 448k
30 votes

Minted, setstretch and font size

\setminted{fontsize=\small,baselinestretch=1} Enjoy
  • 863
29 votes

Confusion: \onehalfspacing vs. \spacing vs. Word vs. the world?

Not exactly an answer but a caveat: Some of these seem sensitive to placement. [TL;DR: all 3 affect the whole document if placed in preamble.] I found experimentally (in a \documentclass[a4paper,11pt]{...
27 votes

Change line spacing inside the document

Alternatively, the following solution is a bit cleaner: \documentclass[12pt,a4paper]{book} \usepackage{lipsum} \usepackage{setspace} \begin{document} \onehalfspacing % Set line spacing to 1.5 \...
26 votes
Accepted

How can I reduce the line spacing in a listing?

To reduce the space between lines, you can invoke \linespread{<x>} in the value passed to the basicstyle key, where <x> is a number smaller than 1, as in this answer by egreg. Don't abuse ...
  • 56.9k
22 votes

Change line spacing inside the document

Other values Other line spacing values that lie in between onehalf, single and double can also be achieved with: \usepackage{setspace} \begin{spacing}{1.125} … \end{spacing}
18 votes

Confusion: \onehalfspacing vs. \spacing vs. Word vs. the world?

Microsoft Word doesn't do line spacing correctly (unless you multiply the pt value of the text yourself and use the "Exactly" line-spacing option). If you actually measure line height in a ...
  • 313
18 votes

Change linespacing in bibliography

Are you searching for this? In the preamble: \usepackage{setspace} Where the bibliography should appear: \begingroup \setstretch{1.0} \printbibliography \endgroup
16 votes

How to change spaces between items in Table of Contents

Using tocloft, you can also add the following in your preamble to add spacing before a section entry: \usepackage{tocloft} \setlength{\cftbeforesecskip}{6pt} This complements Gonzalo's Answer in ...
16 votes

How to style blockquote?

Since this is the first result I got when I Googled "latex block quote", I thought I'd mention the csquotes package I found via this Overleaf article. Seems to do about the same thing, just not the ...
  • 273
15 votes
Accepted

How to increase line spacing in TikZ node?

You can define the \baselineskip in the inner of your node: % arara: pdflatex \documentclass{book} \usepackage{lipsum} \usepackage{tikz} \begin{document} \begin{tikzpicture}[overlay,remember ...
  • 42.5k
14 votes

How to format an inline source code

You can create your \inlinecode command which adapts to various languages. Here is some piece of code I've been using and which was very helpful to me: \usepackage{listings} \usepackage{color} \...
  • 453
14 votes
Accepted

Spurious Vertical Space Introduced by multicols (Additional Case)

If a list such as itemize is placed at the start of a minipage its usual vertical spacing before the list is omitted. Adding multicols the way you did it is producing a box around the itemize list ...
14 votes

How do I change my LaTex document to follow some Word requirements?

With Times New Roman With xelatex or lualatex you can use any .ttf or .otf font available in your system, and of course times. For pdflatex or any other compiler there are also an obsolete times ...
  • 74.5k
13 votes
Accepted

Custom linespacing in a parbox

Any of the normal commands to set line spacing will work in a parbox, for example \parbox{\linewidth}{\linespread{2}\selectfont....}
12 votes
Accepted

How much space is a line, vertically?

This would typically be measured from the baseline of one line to the baseline of another, or given by \baselineskip, and depends on the font size loaded/specified as well as the font size current ...
  • 572k
11 votes

Double or one-half spacing

How do I double space an entire document? What package should I use? As commented, one option is to use the package setspace: \documentclass{article} \usepackage{setspace} \doublespacing \begin{...
  • 74.5k
11 votes

How can I reduce the line spacing in a listing?

To reduce the line spacing for all lstlistings, just set basicstyle=\linespread{0.8} in your \lstset{} configuration. No need to use fontspec.
11 votes
Accepted

Preventing line break in figure caption

Several comments: Since you're (i) using the agsm bibliography style, which is distributed with the harvard citation management package and (ii) loading the natbib package rather than the harvard ...
  • 448k
11 votes

Undefined Control Sequence on \onehalfspacing

For those of you using the memoir document class, the fix involves disemulating the setspace package first, as outlined here: \DisemulatePackage{setspace} \usepackage{setspace} % \onehalfspacing, etc....
  • 904
11 votes
Accepted

Uneven Line Spacing for Arabic Text using xelatex + memoir + plyglossia

What you are trying to do can be achieved but it will be difficult and frustrating. Questions tagged grid-typesetting contain many details on the matter. Long story short, (Xe)LaTeX is the wrong tool ...
11 votes

Understanding line height / line spacing / baselineskip in LaTeX

The second test includes 1 pt \lineskip between lines and the third test has the lines not exactly 30 pt height because \usepackage{fix-cm} was not used.
  • 55.7k
11 votes
Accepted

Tikzpicture with remember picture and overlay inserting vertical space

The problem The problem is, like in the questions you link to, that using TikZ switches TeX from vertical to horizontal mode. So if your document starts with a TikZ picture, this picture will be part ...
  • 10.5k
11 votes
Accepted

Starting a new line below a certain word

\documentclass{article} \usepackage{tabto} \newcommand\rememberthisspot{% \tabto*{0pt}\let\thisspot\TabPrevPos\tabto{\TabPrevPos}} \begin{document} Let \rememberthisspot A denote... \tabto{\thisspot}...
10 votes
Accepted

Decrease spacing between lines of paragraph in longtable.

You can also set line spacing locally in a clean way as this: \documentclass{article} \usepackage{longtable} \usepackage{setspace} \begin{document} \begin{spacing}{.7} \begin{longtable}{ l | l | p{5 ...
  • 45.1k
10 votes
Accepted

Automatically calculate height of tallest line in list

The formulas can be put in locally defined macros. Then, \vphantom just uses all of them without the need to know, which formula has the largest height and depth. \documentclass{article} \usepackage{...
10 votes

How to temporarily increase line spacing for several lines in a paragraph?

It is not clear how you want to choose and identify the lines with the additional space and how automatic the solution should be. You can always add manually some \vspace: \documentclass{article} \...

Only top scored, non community-wiki answers of a minimum length are eligible