\hrulefill
vertically aligns the line at the bottom of the text.
There is also \xrfill
in the package xhfill
which raises the line, but it is raised too much for my esthetics.
What I'm looking for is a command working similarly to \hrulefill
, but such that the filler line is like a stretched em-dash, so the vertical alignment is the same as for an em-dash.
EDIT
As a clarification: I don't want to have to guess the thickness nor the amount the line is raised over the baseline. I want a command which produces a stretched em-dashed, independently of the current font size etc.
\documentclass{article}\begin{document} x \special{pdf:literal 1 0 0 1 0 2 cm} \hrulefill \special{pdf:literal 1 0 0 1 0 -2 cm} x x -- x\end{document}
\pdfliteral
, per the linked question. You can define a macro to do the technical bit and just call the macro (use a short name to save typing). Or do you want to do it some other way? Draw a\rule
and use\raisebox
, for example.