TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a \rule is placed below a line of text, some space is inserted between the line and the rule. Usually, the amount of space appears to precisely add the difference to the height of the current font size, regardless of whether text is actually inserted (cf. figure, right column, row 1/2) or not (left column). However, if the rule's height surpasses the font height, there is some additional space between the lines (row 3).

Of what amount is this space?

enter image description here

(The purpose of the last row is to quickly demonstrate that the identical results in spacing in the two columns in rows 1-3 are independently achieved.)



\sbox{\mybox}{\Huge ipsum}
\settodepth{\mydepth}{\Huge ipsum}
\settowidth{\mywidth}{\Huge ipsum}


%typeset \mybox underlined with a rule of mandatory height #3,
%and place an optional text #2 either right or left of the rule,
%as indicated by a star (#1).
\DeclareDocumentCommand{\placebox}{s o m}{
    }{%else invert left/right placement

\placebox{1mm} & \placebox*[\Huge A]{1mm}\\[2em]
\placebox{1mm} & \placebox*[A]{1mm}\\
\placebox{2mm} & \placebox*[A]{2mm}\\
\placebox{4mm} & \placebox*[A]{4mm}\\
share|improve this question
I think you mean nointerlineskip. – Marco Daniel Jun 4 '12 at 18:09
@MarcoDaniel Almost -- I was looking for the amount of space. But \lineskip was indeed what I was looking for. Thanks. – dgs Jun 4 '12 at 20:23
up vote 8 down vote accepted

To understand the behaviour it is instructive to go to the TeX primitive rules. These are defined using three dimensions height, width and depth:

\vrule height1pt width 1pt depth0pt fjord\par
\hrule height1pt width 100pt depth0pt fjord

LaTeX defines the \rule using these primitives disguised as follows:

\def\rule{\@ifnextchar[\@rule{\@rule[\z@]}} width height raised

If we construct an example using first the TeX primitives,

 \vrule height1pt width 1pt depth0pt fjord
 \hrule height1pt width 100pt depth0pt fjord

we get

enter image description here

We get a different behaviour with LaTeX rules as they are typeset in horizontal mode and TeX adds a normal parskip as required..

\rule{1pt}{1pt}fjord fjord fjord fjord\par
\rule{30pt}{1pt}fjord fjord fjord fjord

enter image description here

Full minimal

\vrule height0.4pt width 1pt depth0pt fjord\par
\hrule height0.4pt width 30pt depth0pt fjord

\rule{1pt}{1pt}fjord fjord fjord fjord\par
\rule{30pt}{1pt}fjord fjord fjord fjord

The amount of space left is normally lineskip for LaTeX plus \parskip in the examples. vary the parskip value to see how the lines get moved. Note that both start the rule at the baseline of the letters.

share|improve this answer
\lineskip is what I was looking for -- thanks. Had you not mentioned \parskip, I might have also missed its rubber length. Strangely though, increasing \lineskip immediatley after begin{minipage} in my code seems to only affect the third row (while it is always correctly changed, as checked with \the). Do you have any idea why this could be the case? – dgs Jun 4 '12 at 20:18
This question is of course directly related to the fact that even though \the\lineskip prints 1pt (without rubber lengths), no such space is inserted in rows 1 and 2 of the figure given in the OP. Since all boxes are printed by the same command, this is somewhat surprising. – dgs Jun 4 '12 at 20:45
\lineskip is inserted between two lines only when b-(h+d) < s, where b is the baselineskip, h is the height of the line below, d is the depth of the line above and s is a dimen parameter called \lineskiplimit. Otherwise the skip inserted is just b-(h+d) in order to keep the two baselines b apart. – egreg Jun 4 '12 at 20:48
The default value of \lineskiplimit is 0pt. See also tex.stackexchange.com/a/51395/4427 – egreg Jun 4 '12 at 21:00
@egreg I see. Assuming s >= 0, that translates to "if the baselines are separated by more than b-s anyway, make them even further apart", which at first sight seems peculiar. What's the reason for that? – dgs Jun 4 '12 at 21:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.