1

Is it possible to insert an image of my signature between the closing line and my name in a letter created with the class newlfm?

This is the code I have now:

\documentclass[10pt,stdletter,orderfromtodate,sigleft,a4paper]{newlfm}
\usepackage{blindtext, xfrac}
\usepackage{etoolbox}
\usepackage{lmodern}

\makeatletter
\patchcmd{\@zfancyhead}{\fancy@reset}{\f@nch@reset}{}{}
\patchcmd{\@set@em@up}{\f@ncyolh}{\f@nch@olh}{}{}
\patchcmd{\@set@em@up}{\f@ncyolh}{\f@nch@olh}{}{}
\patchcmd{\@set@em@up}{\f@ncyorh}{\f@nch@orh}{}{}
\makeatother

\newlfmP{dateskipbefore=50pt}
\newlfmP{sigsize=50pt}
\newlfmP{sigskipbefore=50pt}

\newlfmP{Headlinewd=0pt,Footlinewd=0pt}

\namefrom{John Smith}
\addrfrom{%
    221B Baker Street\\
    London, UK
}

\addrto{%
    Basil of Baker Street\\
    221$\sfrac{1}{2}$ Baker Street\\
    London, UK
}

\dateset{January 6, 1914}

\greetto{To Whom It May Concern,}

\closeline{Sincerely,}

\begin{document}
\begin{newlfm}
    \blindtext
\end{newlfm}
\end{document}

enter image description here

I tried changing the closing part with:

\closeline{With best regards,\newline
\includegraphics[width=0.4\linewidth]{signature.eps}}

This places the signature nicely just under "With best regards" but leaves too much spaces between the signature and "John Smith".

  • You can insert images using the \includegraphics command from the graphicx package – siracusa Jul 11 at 7:10
  • @siracusa I tried your suggestion and it works. I'm trying to remove the excessive space between the signature and the name under it. – matteo_gambarutti Jul 11 at 17:53
0

Your issue here has two parts:

  1. Adding the signature as an image into the letter and
  2. reducing the space between closing line and name.

Solution point 1: As already mentioned in the other answer you can use command \signature to place a photographed signatur into your letter after the closing line and before the printed (readable) name:

\signature{\includegraphics[width=4cm]{example-image-a}} % <============

Please see that I used an example image comming from package mwe, which must be installed but not called ...

Solution point 2: The distance between closing line and following image/name can be controlled for positive values (that means adding more space!) only with

\newlfmP{closeskipafter=0pt} % Skip after closeline before signature image <=================

There is a hard coded new line after the closing line you can only get rid off with patching command \closeline I did not investigate yet.

So the following mwe

\documentclass[10pt,stdletter,orderfromtodate,sigleft,a4paper]{newlfm}

\usepackage{blindtext, xfrac}
\usepackage{etoolbox}
\usepackage{lmodern}

\makeatletter
\patchcmd{\@zfancyhead}{\fancy@reset}{\f@nch@reset}{}{}
\patchcmd{\@set@em@up}{\f@ncyolh}{\f@nch@olh}{}{}
\patchcmd{\@set@em@up}{\f@ncyolh}{\f@nch@olh}{}{}
\patchcmd{\@set@em@up}{\f@ncyorh}{\f@nch@orh}{}{}
\makeatother

\newlfmP{dateskipbefore=50pt} % 
\newlfmP{sigsize=50pt}        % Size for written signature
\newlfmP{sigskipbefore=50pt}  % Skip between text and closeline 
\newlfmP{closeskipafter=50pt} % Skip after closeline before signature image <=================

\newlfmP{Headlinewd=0pt,Footlinewd=0pt}

\namefrom{John Smith}
\addrfrom{%
    221B Baker Street\\
    London, UK
}

\addrto{%
    Basil of Baker Street\\
    221$\sfrac{1}{2}$ Baker Street\\
    London, UK
}

\dateset{January 6, 1914}

\greetto{To Whom It May Concern,}

\closeline{Sincerely,}
\signature{\includegraphics[width=4cm]{example-image-a}} % <============

\begin{document}
\begin{newlfm}
    \blindtext
\end{newlfm}
\end{document}

you get the resulting pdf:

resulting pdf

As you can see an example image simulation an hand written signature is added and there is an additional distance a defined with command \newlfmP{closeskipafter=50pt}.

Change the value in that command to 0pt to get the minimal possible distance (please note: negative values doe not work!):

resulting pdf with minimal space

  • @down-voter: As usual here, explain your downvote! – Mensch Jul 28 at 21:22
2

There's no need to put the signature image into the \closeline command. newlfm provides a special command \signature for this purpose that will also take care of properly adjusting the space around the signature image. So you can just use

\closeline{Sincerely,}
\signature{\includegraphics[width=0.4\linewidth]{signature.eps}}

Using a thick rule instead of the signature image, the output looks like

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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