The \hrulefill
command could draw rubber length underlines, like abc___def
. I just want to draw line in the vertical centre of a text, like abc---def
. Thanks.
[Tex/LaTex] How to draw horizontal line with rubber length
rules
Related Question
- [Tex/LaTex] How to change the footnote line (thickness, length)
- [Tex/LaTex] How to draw a horizontal line between middle of the page and one of the edges (in beamerposter)
- [Tex/LaTex] LyX command(s) to insert WYSIWYG horizontal line, for keyboard shortcut
- [Tex/LaTex] Draw Horizontal line between rows in latex table
Best Answer
The
xhfill
package provides different leader commands to do exactly this:Specifically regarding your question,
\xrfill[<raise>]{<width>}
prints a rule of width<width>
raised<raise>
from the baseline. Other leader options are also provided by the package. See the documentation for more examples.For drawing a rule of specific (rather than rubber) length, you can always use a regular raised
\rule
: