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?
(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.)
\documentclass{article}
\usepackage{calc}
\usepackage{array}
\usepackage{xparse}
\renewcommand{\arraystretch}{3.5}
\newlength{\mydepth}
\newlength{\myheight}
\newlength{\mywidth}
\newlength{\colwidth}
\newsavebox{\mybox}
\sbox{\mybox}{\Huge ipsum}
\settodepth{\mydepth}{\Huge ipsum}
\settowidth{\mywidth}{\Huge ipsum}
\setlength{\colwidth}{\mywidth+2em}
%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}{
\begin{minipage}[b]{\mywidth+2em}%
\IfBooleanTF{#1}{%
\rule[-\mydepth]{2em}{\mydepth}%
\usebox{\mybox}\\%
\IfValueTF{#2}{#2}{}%
\rule{\mywidth+1em}{#3}%
}{%else invert left/right placement
\usebox{\mybox}%
\rule[-\mydepth]{2em}{\mydepth}\\%
\rule{\mywidth+1em}{#3}%
\IfValueTF{#2}{#2}{}%
}%fi
\end{minipage}%
}%
\begin{document}
\begin{tabular}{b{\colwidth}b{\colwidth}}
\placebox{1mm} & \placebox*[\Huge A]{1mm}\\[2em]
\placebox{1mm} & \placebox*[A]{1mm}\\
\placebox{2mm} & \placebox*[A]{2mm}\\
\placebox{4mm} & \placebox*[A]{4mm}\\
\end{tabular}
\end{document}
Best Answer
To understand the behaviour it is instructive to go to the TeX primitive rules. These are defined using three dimensions height, width and depth:
LaTeX defines the
\rule
using these primitives disguised as follows:If we construct an example using first the TeX primitives,
we get
We get a different behaviour with LaTeX rules as they are typeset in horizontal mode and TeX adds a normal parskip as required..
Full minimal
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.