56
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 ...
39
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 ...
35
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
\...
32
votes
30
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}
21
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 ...
20
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 ...
19
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
17
votes
Inline math messes up vertical spacing
I suggest you familiarize yourself with the smallmatrix environment that's provided by the amsmath package.
It is straightforward to create a dedicated macro -- called \smallchoose in the following ...
17
votes
How to get MS Word style single line spacing in LaTeX?
I think the setspace package is intended to increase spacing; I don't think it has options for reducing it. The simplest option here is probably a manual setting to \baselinestretch, as per page 172 ...
16
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}
\...
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 ...
13
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.
13
votes
Inline math messes up vertical spacing
Just for historical context, I note that my copy of The Printing of Mathematics, (O.U.P, 1954) has this paragraph about binomial coefficients:
If I render that into LaTeX, you can see that the layout ...
12
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.
12
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 ...
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}...
11
votes
Inline math messes up vertical spacing
You have got many nice LaTeX answers, and hopefully resolved your problem. Let me give you one possible (partly new, tuning in progress) way to handle this in ConTeXt. (It will not help you in this ...
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}
\...
10
votes
Accepted
set font size and line spacing
Useless and counterproductive messing with \fontsize. This simpler MWE work as expected:
\documentclass[12pt]{article}
\usepackage{lipsum}
\linespread{1.5}
\begin{document}
\lipsum[1]
\end{...
10
votes
Accepted
Prevent unnecessary increase of line spacing after in-line equation
You have two possibilities. In the picture, I show the three results: the first is what you get, the second is the preferred way, the third can be used, but this adjustment has to be made only when ...
10
votes
Accepted
How can I draw angled lines in LaTeX to create ruled template for calligraphy?
You can use polar coordinates such as (55:100cm). In the code below, I compute the precise number of oblique lines to draw in function of the chosen angle \myAngle and the distance \myDist between two ...
9
votes
How can I draw angled lines in LaTeX to create ruled template for calligraphy?
This does not answer you specfic question, but can be adapted for you use with many other options built in. I have tried to set the defaults to your requirements (left in the vertical lines, but you ...
9
votes
Linespacing varies from line to line
The problem here is a misunderstanding of the meaning of \leading.
In the package leading, the command \leading is defined so that it "sets the leading immediately to the specified."
[Edit: It is ...
9
votes
Accepted
Are \onehalfspacing and {spacing}{1.5} Supposed to Yield Different Results?
The environment name is onehalfspace, not onehalfspacing AND, it is (for a 10pt document) equivalent to \begin{spacing}{1.25}.
\documentclass{book}
\usepackage{setspace}
\usepackage{lipsum}
\begin{...
9
votes
Inline math messes up vertical spacing
It does not really fit:
If the p on the line above had been slightly to the left it would overlap the 2. Tex makes a decision based on the whole line. You can allow overlaps in individual cases with \...
8
votes
How to style blockquote?
You can do that with the etoolbox package:
\documentclass[12pt]{book}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{etoolbox}
\AtBeginEnvironment{quote}{\singlespace\vspace{-\topsep}\small}
\...
8
votes
Accepted
Vertical space after minipage (EDIT : in an environment)
minipage are centred by default which means that (typically) they have both height and depth larger than \baselineskip this means that when lines containing such large boxes are stacked baseline ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
line-spacing × 1195spacing × 247
setspace × 98
tables × 87
fontsize × 70
line-breaking × 51
footnotes × 47
math-mode × 43
paragraphs × 42
sectioning × 40
table-of-contents × 37
formatting × 37
beamer × 35
fonts × 35
memoir × 34
tikz-pgf × 32
lists × 29
titles × 28
koma-script × 27
vertical-alignment × 26
amsmath × 26
itemize × 25
equations × 23
vertical-spacing × 22
xetex × 21