1

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

enter image description here

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

enter image description here

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?

0
2

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".

Not the answer you're looking for? Browse other questions tagged or ask your own question.