# Placing the text under a line in a multiline form

I am typing a form like the following:

I want to make a command \newcommand\myform[1]{ *** #1 ***} that will produce the filled-in form with the argument substituted into it.

For example, the command \myform{Jounal of physics, the United States of America, 15 January 2013} should give me the filled-in form (keeping the helping text under the lines). Note that the command argument #1 can a be quite long, so it can span either one line or two.

So the question is: What is the best way to do this?

(A number of answers for a single-line form was given here)

You can use the \vspace*{length} command to write to the same line multiple times. Combine this with the \baselineskip length to jump several lines up or down. Additionally, change \baselineskip locally to make room for sub-line legends:

\documentclass{article}
\pagestyle{empty}
\parindent0pt
\begin{document}
\bgroup
% Double line space (or use setspace package)
\setlength{\baselineskip}{2\baselineskip}
% First line
Form \hrulefill\\
% second line
\rule{0pt}{0pt}\hrulefill \par
%
% sub-line legends
\vspace*{-1.5\baselineskip}
{\small (Undertext)\\
(Undertext2)}\par
\vspace*{.5\baselineskip}\par
% Jump up again to start filling in the lines
\vspace*{-3\baselineskip}
\hspace*{5em}
text text text text text text text
text text text text text text text text
text text text text text text text

% Make some space below the whole construction, if desired
\hspace*{0.5\baselineskip}

% broup/egroup prevents baselineskip change from propagating outside
\egroup

text text text text text text text
text text text text text text text text
text text text text text text text
\end{document}


edit: MWE

• the rule would look better if it were below the baseline. here is a substitute for \hrulefill: \makeatletter \def\formrulefill{\leavevmode\leaders\hrule\@height-.25ex\@depth.35ex \hfill\kern\z@} \makeatother – barbara beeton Nov 21 '14 at 13:40