How can I fine tune and reduce the vertical spacing of lines so characters from lines above and below are almost pixel-touching each other?


Example of lines barely touching each other

3 Answers 3


While \offinterlineskip\lineskip1pt might seem to give the desired result, lines will be irregularly spaced, because the distance between base lines will depend on the presence of ascenders (letters like "d") or descenders (letters like "y"). Moreover not all descenders and ascenders are equal.

Tight typesetting can be obtained by calling, say, \fontsize{10}{10} for ten point size. One can get cheaply such a setting by modifying the internal function \set@fontsize:



Only etoolbox is required, of course. The patch will substitute the call of the third argument to \set@fontsize with the second; the third parameter is indeed the baselineskip and the second is the font size.

Note that this will affect all text at all sizes.

enter image description here

If only some paragraphs are to be "tightly typeset", then the environment tight defined as follows will do the job. The \addvspace commands have been used on the assumption that the code is used for examples. Variations on the theme are possible.


If tight typesetting is needed for captions, it's simpler. With the caption package define the font used by saying something like

  • Indeed, the other answers have the result of irregular spacing when rendered. I thought this cannot be fixed but your answer renders beautifully. Is it possible to use \set@fontsize to control and design vertical spacing for lists like my question here? Or is the current selected answer the best way to control vertical height for lists? Commented Jul 24, 2011 at 16:12

\offinterlineskip is what you want.


{% Use it LOCALLY

You can add \lineskip=1pt after \offinterlineskip, if the lines are too close.

There're mainly three parameters about line spacing: \baselineskip, \lineskip and \lineskiplimit.

A good explanation of parameters about line spacing, is Chapter 12 (Glue) in TeXbook. Or you can see Chapter 15 (Baseline Distances) in TeX by Topic, it said:

  • \baselineskip: The ‘ideal’ baseline distance between neighbouring boxes on a vertical list. Plain TeX default: 12pt.
  • \lineskiplimit: Distance to be maintained between the bottom and top of neighbouring boxes on a vertical list. Plain TeX default: 0pt.
  • \lineskip: Glue added if the distance between bottom and top of neighbouring boxes is less than \lineskiplimit. Plain TeX default: 1pt.

In LaTeX, we usually only change \baselineskip through \fontsize and \linespread, \lineskiplimit and \lineskip are not often used.

If you want to pry, in LaTeX kernel, \offinterlineskip is defined as:

  \lineskip\z@ \lineskiplimit\maxdimen}
  • How do I expand the vertical space a bit if I think it's too squished? What parameter value should I tweak? Commented Jul 24, 2011 at 5:06
  • @Level1Coder: In that case, Werner's solution is OK. I suggest \linespread{0} instead of \linespread{0.5}. I'll add some more information minutes later.
    – Leo Liu
    Commented Jul 24, 2011 at 5:14
  • @Level1Coder: See my update.
    – Leo Liu
    Commented Jul 24, 2011 at 5:31
  • I'm new to LaTeX and I really would like to understand every part of example code given here. What does the code within {% Use it LOCALLY do? Why is it necessary to have those specific commands in curly brackets? Commented Jul 24, 2011 at 5:48
  • Both answers work, in general cases Werner's answer works fine. But in my usage, I really like how there is finer grain control in your method. Modifying your line \lineskip=0.2pt in 0.1 increments I can see changes in the final PDF render. Whereas with Werner's \linespread{0.5}\selectfont, I only see changes in 0.5 increments. So in my case, yours is the best answer. Commented Jul 24, 2011 at 5:54

For stretching (or increasing) the line spacing, you can use the setspace package, or use \linespread{<factor>}. Using the latter, the following minimal example showcases some of the effects of changing the \linespread:


The output looks like this:

Different line spreads

Here is also a short discussion on this topic on the TeX FAQ.

  • Do not use \linespread{0.5}\selectfont. It has no meaning. And for this question, it is not correct for many cases. The right way is to set \baselineskip less than \lineskiplimit, and set \lineskip to 0pt, that's what \offinterlineskip do.
    – Leo Liu
    Commented Jul 24, 2011 at 4:56
  • @Leo: Without more context and the minimal requirement specified by the OP, there are many other ways of fulfilling the request, I'm sure.
    – Werner
    Commented Jul 24, 2011 at 5:00
  • In LaTeX, \lineskip is 1pt by default. Set small \baselineskip will not suffie the request, if the OP really want no space between lines. After all, the default 1pt value of \lineskip makes the texts more readable.
    – Leo Liu
    Commented Jul 24, 2011 at 5:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .