Better way to center text below overline with given length

You can create a \parbox and insert a \rule:

\documentclass{article}
\usepackage{calc}

%Specify the longest signaturekey here:
\newcommand{\sigwidth}{\widthof{\footnotesize xDatum/Unterschrift\ Ausbildungsleiterx}}
%Define a signaturbox of 2.5 cm in height with a mandatory argument of the signature
\newcommand{\signaturehere}[1]{%
\parbox[b][2.5cm][b]{\sigwidth}{%
\footnotesize%Everything in footnotesize
\centering% 
\rule[-3pt]{\linewidth}{0.4pt}\\[0ex]%
{#1}%
}}

\begin{document}
\begin{center}
\signaturehere{Datum/Unterschrift\ Auszubildender}\\
\signaturehere{Datum/Unterschrift\ Betreuer}\hfill%
\signaturehere{Datum/Unterschrift\ Ausbildungsleiter}
\end{center}

\end{document}

enter image description here


You can also automatize the computation of the largest text:

\documentclass{article}
\usepackage{calc}

\newlength{\signaturelength}
\newcommand{\signatures}[3]{%
  \begin{center}\footnotesize % all is \footnotesize
  % compute the maximum width
  \setlength{\signaturelength}{\maxof{\widthof{#1}}{\widthof{#2}}}%
  \setlength{\signaturelength}{\maxof{\signaturelength}{\widthof{#3}}}%
  \addtolength{\signaturelength}{2em}% Add some space
  % print the three lines with their caption
  \strich{#1}\\[2.5cm]
  \strich{#2}\hfill
  \strich{#3}
  \end{center}
}

\newcommand{\strich}[1]{% The line and its caption
  \parbox[t]{\signaturelength}{\footnotesize % \parbox does \normalsize
    \centering\hrule\vspace{.5ex}\strut#1}}

\begin{document}

\signatures{Datum/Unterschrift Ausbildungsleiter}
  {Datum/Unterschrift Betreuer}
  {Datum/Unterschrift Ausbildungsleiter}

\end{document}

enter image description here

(Thanks to Heiko for spotting the misalignment of the rules.