# How can I create a line with small text below it as in contracts? [duplicate]

This question already has an answer here:

I would like to create a line with text below it as it can be seen often in contracts:

Ideally, that line would have a fillable element over it.

## Minimal Working Example

The best I could come up (which is much better than I've expected as I started writing this question!) is:

\documentclass[a4paper]{scrartcl}
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout
\usepackage{csquotes}       % nice quotes
\usepackage{parskip}        % I don't want indentation

\begin{document}
\section{Untermietvertrag}
Im Folgenden wird ein Untermietvertrag zwischen (nachfolgend \enquote{Hauptmieter} genannt)\\

\line(1,0){250}\\
\vspace{-0.3cm}
{\scriptsize Name, Anschrift}\\

und (nachfolgend \enquote{Untermieter} genannt)\\

\line(1,0){250}\\
\vspace{-0.3cm}
{\scriptsize Name, Anschrift}\\

geschlossen.
\end{document}


which renders to

This solution does not have fillable form elements at the over the lines.

Is there probably a package that helps when you want to write a contract? Or a document class?

-

## marked as duplicate by Werner, yo', Masroor, Heiko Oberdiek, cslstrMay 27 '14 at 23:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 1 Answer

Not the prettiest, but:

\documentclass[a4paper]{scrartcl}
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout
\usepackage{csquotes}       % nice quotes
\usepackage{parskip}        % I don't want indentation

\begin{document}
\section{Untermietvertrag}
Im Folgenden wird ein Untermietvertrag zwischen (nachfolgend\enquote{Hauptmieter} genannt)\\

\def\platzhalter{Max Mustermann}

\begin{tabular}{@{}p{\linewidth}}
\platzhalter \\\hline
\scriptsize Name, Anschrift \\
\end{tabular}

und (nachfolgend \enquote{Untermieter} genannt)\\

\def\platzhalter{}

\begin{tabular}{@{}p{\linewidth}}
\platzhalter \\\hline
\scriptsize Name, Anschrift \\
\end{tabular}

geschlossen.
\end{document}


I put the @{} at before the column definition, because I like my fields better when their description is not indented. Instead of \linewidth you can put any width you like, thus creating "small input fileds".

-