Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a letter using newlfm, which implements the typeset signature with this code:

\namefrom{\textbf{Juan de la Cruz}\\
          "Expert" TeXnician\\
          Telephone: \printphonefrom\\
          E-mail: \printemailfrom}

How do I add my (scanned) signature over my printed name? I want it to look like it was actually signed by hand. I wouldn't want to use jpg because it doesn't support transparency. Probably png or other format with transparency.

I might as well print it, sign it, then scan it back; but then everything will be treated as graphics (e.g. text can't be selected).

share|improve this question
    
What Tex/Latex engine are you using? Do you have a PDF or DVI backend? –  Charles Stewart Nov 14 '10 at 10:22
    
You could consider scanning your signature and trace it in a vector drawing program. inkscape.org is one that comes to my mind, I don't know if it can export to something useful though. But when you've got vector graphics, you can easily achieve what you want. –  Pieter Nov 14 '10 at 10:43
    
@Charles, when I press Ctrl+T, pdflatex executes. Does this mean I'm using a PDF backend? I don't know much about backends yet. –  Kit Nov 14 '10 at 11:29
    
yes, pdflatex is the pdf backend. –  Juan A. Navarro Nov 14 '10 at 12:22
add comment

1 Answer

up vote 6 down vote accepted

Here is a starting point:

\usepackage{graphicx}
\newcommand{\signature}
  {\makebox[0pt][l]{\raisebox{\baselineskip}[0pt][0pt]{\includegraphics{signature}}}}

Put \signature right in front of your name. I haven't tested this with newflm. If it's moving the argument around, you may need to use \DeclareRobustCommand instead of \newcommand. You may also need to add some scaling argument(s) to the \includegraphics, and adjust the first argument to \raisebox.

Definitely use png for this, if you are using a pdf backend. If you want transparency, think you get the best result by using the scanned signature as a mask on an all black picture. In other words, the scanned signature becomes the alpha channel of a graphic that has all its pixels black. Or blue, if you prefer. Otherwise, you tend to get a light coloured fringe around the lines of the signature. This is not too hard to achieve with gimp or ImageMagick. Using the latter, here is a quick recipe (assume your scanned signature is black on white):

convert -negate -background blue -alpha Shape scanned.png signature.png
share|improve this answer
    
Just for the record to help others: At first I didn't realize that \baselineskip was a dimension that can be replaced with lengths (e.g. 5pt, 1in, -25pt, etc). Excellent solution, @Harald! Thanks! –  Kit Nov 14 '10 at 13:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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