3

I would like to have a signature line for my thesis. I tried to use \hrulefill, but it creates a long line. Is there any way to have a short line?

Maryam
  • 273

1 Answers1

4

The following code could be helpful. It defines the \signature-macro that does the required job.

\documentclass{article}

\newbox\namebox
\newdimen\signboxdim

\def\signature#1{%
    \setbox\namebox=\hbox{#1}
    \signboxdim=\dimexpr(\wd\namebox+1cm)
    \parbox[t]{\signboxdim}{%
        \centering
%           \mbox{}\leaders\hbox to .4em{\hss.\hss}\hskip\nameboxdim\mbox{}\\   % for dots
            \hrulefill\\    % for a line
            #1
        \par}%
    }

\begin{document}
\signature{Abraka Dabra}
\end{document}

enter image description here

Marian G.
  • 1,951
  • 1
  • 9
  • 14