Skip to main content
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 ...
David Carlisle's user avatar
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 ...
Mico's user avatar
  • 519k
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 \...
ATH's user avatar
  • 451
32 votes

Minted, setstretch and font size

\setminted{fontsize=\small,baselinestretch=1} Enjoy
Himura's user avatar
  • 913
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}
Serge Stroobandt's user avatar
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 ...
ahogen's user avatar
  • 323
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 ...
bEPIK's user avatar
  • 333
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
Roland Deschain's user avatar
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 ...
Mico's user avatar
  • 519k
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 ...
Ian Thompson's user avatar
  • 44.2k
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} \...
Salvioner's user avatar
  • 493
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 ...
Fran's user avatar
  • 83.4k
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.
wipet's user avatar
  • 76k
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 ...
Thruston's user avatar
  • 43.3k
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.
Andrew Watson's user avatar
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 ...
Circumscribe's user avatar
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}...
Steven B. Segletes's user avatar
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 ...
mickep's user avatar
  • 9,420
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{...
Heiko Oberdiek's user avatar
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} \...
Ulrike Fischer's user avatar
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{...
Fran's user avatar
  • 83.4k
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 ...
egreg's user avatar
  • 1.2m
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 ...
frougon's user avatar
  • 24.5k
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 ...
Peter Grill's user avatar
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 ...
barbara beeton's user avatar
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{...
Steven B. Segletes's user avatar
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 \...
David Carlisle's user avatar
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} \...
Bernard's user avatar
  • 273k
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 ...
David Carlisle's user avatar

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