For various reasons, I have to use TeX rather than LaTeX for a short document. I need to be able to insert a short blank underline within a paragraph. In LaTeX, this would be done easily with \rule{length}{thickness}. What is the plain TeX equivalent?

  • 1
    \def\rule#1#2{\leavevmode\vrule width #1 height #2 depth 0pt\relax}
    – egreg
    Jan 24, 2020 at 16:39
  • That almost works, but it seems to be ignoring the height argument. Jan 24, 2020 at 16:40
  • 1
    I forgot to set depth.
    – egreg
    Jan 24, 2020 at 16:45
  • I ended up using a slight modification with just one argument: \def\rule#1{\leavevmode\vrule width #1 height 0.45pt depth 0pt\relax} Jan 24, 2020 at 17:04

1 Answer 1


For a long underline you can use \hrulefill inside a box:

Some text with no real sense, just to fill
\hbox to 6em{\hrulefill} some space.


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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