# How can I nicely format my form in LaTeX?

I am in need for a little authorization form and decided that this is great opportunity to use LaTeX.

Here is what I have so far (minimized, translated to English—not the actual form of course):

\documentclass[a4paper]{article}

\usepackage[a4paper,margin=2cm]{geometry}

\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}

\renewcommand{\arraystretch}{1.4}

\newcommand\blank[1]{\rule[-.2ex]{#1}{.4pt}}
\newcommand\data{%
birthplace, \& date: \\
mother’s name:       \\
ID:                  \\
\end{tabular}
}

\begin{document}

\begin{center}
\Huge\textsc{Authorization}
\end{center}

\vspace{2cm}

\data

\textbf{authorize} \\
\blank{10cm},

\data

\vspace{1.5cm}

\end{document}


As you can see I use a custom macro utilizing \rule to make the blank lines. This works okay, until I require more advanced techniques, such as filling with a blank line until the right margin. For example, I would want to do this after the authorized person’s data '‘(to ____’). I know about \hrulefill, but even then, the next line poses yet another challenge: I would need a line that fills the space from the left margin until the text ‘instead of me’, and this line should end at the right margin.

So to summarize,

# My questions

1. How could I get the line after ‘to ____’ to go until the right margin?

2. How could I get the line after this to extend just as much that the text following it is flushed to the right margin?

3. Do you have some general recommendations to improve this document? Perhaps for example I should increase spacing between paragraph lines.

Thank you.

• I'm not sure if I understood what you want, byt maybe \hrulefill\textbf{instead of me.}? Jan 13, 2020 at 18:35

Is this what you want? (there are other possible solutions)

\documentclass[a4paper]{article}

\usepackage[a4paper,margin=2cm]{geometry}

\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}

\renewcommand{\arraystretch}{1.4}

\newcommand\blank[1]{\rule[-.2ex]{#1}{.4pt}}
\newcommand\data{%
birthplace \& date: \\
mother's name:       \\
ID:                  \\
\end{tabular}
}

\begin{document}

\begin{center}
\Huge\textsc{Authorization}
\end{center}

\vspace{2cm}

\textbf{I,}\hrulefill

\data

\textbf{authorize} \hrulefill,

\data

\textbf{to} \hrulefill


• I tried with \hrulefill\textbf{instead of me.}, but it didn’t seem to work—now I see it’s because I should have started a new paragraph.
• By the way, I'd use \setlength{\parskip}{\baselineskip}. Jan 13, 2020 at 18:46