How do I make a long underscore in Plain TeX?

Use a negative height and a slightly bigger depth:

\vrule height -3pt depth 3.4pt width 7cm

Adjust to suit.

enter image description here

The same idea can be used for “raised rules” (with a negative depth). No rule will appear if depth + height is negative.

If you want a “low rule” that fills up a given space, leaders should be used:

\def\lowhrulefill{%
  \leavevmode % be sure to be in horizontal mode
  \leaders\hrule height height -3pt depth 3.4pt\hfill % fill all available space
  \kern0pt % so \par won't remove the rule
}

Note that \leavevmode is necessary because the command appearing in vertical mode would raise an error because of \hfill (and would do nothing good either).


Plain TeX already defines an \hrulefill command that does this. Use it like this:

\noindent
Date \hbox to 3cm{\hrulefill}

\bye

to produce

enter image description here

If you would rather have the line drawn a bit lower down, then try this:

\noindent
Date \lower.2ex\hbox to 3cm{\hrulefill}

\bye

If you were going to use it more than a few times, then you could make a macro:

\def\filler#1{\noindent\lower.3ex\hbox to #1{\hrulefill}}

\noindent
Date \filler{3cm}

\bigskip
\noindent
Name: \filler{2in}

\bigskip
\filler{\hsize}

\bye

enter image description here