1

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 at 16:39
  • That almost works, but it seems to be ignoring the height argument. – Grant Petty Jan 24 at 16:40
  • 1
    I forgot to set depth. – egreg Jan 24 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} – Grant Petty Jan 24 at 17:04
4

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.

\bye

enter image description here

|improve this answer|||||

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.