Thursday, January 31, 2013

Writing signature in latex documents

Some documents need to be signed by hand, leaving an empty line for the signature and writing the name underneath here is  the solution that worked for me:

First define a new command at the beginning of your document as
\newcommand{\signature}[2][5cm]{
  \begin{tabular}
  {@{}p{#1}@{}}
    \hrule \\[0.05cm]
    \centering{#2}
  \end{tabular}
}

Then use it at the end of the document for instance as

 \flushright\noindent \signature{Firstname Lastname}