I would like to draw a hrule and have a precise control on the vertical space bewteen the line and the baseline of the text under the line.
On the following image, one can see that the space between the rule and the baseline is not the same in the three instances.
How can I achieve that?
Here is a MWE that demonstrate the issue.
\documentclass{article}
% see: https://tex.stackexchange.com/a/432196/8323
\newsavebox\textbox
\newcommand\showbaseline[1]{%
\leavevmode
\sbox\textbox{#1}%
\rlap{\rule{\wd\textbox}{.1pt}}%
\usebox\textbox
}
\begin{document}
\hrule
\showbaseline{A new line}
\vspace{1cm}
\hrule
\showbaseline{a new way}
\end{document}



\rule{\textwidth}{.4pt}instead of tex primitive\hruleyou would get baselineskp space automatically – David Carlisle Mar 12 '23 at 22:52