如何在信件中附加扫描的签名?

如何在信件中附加扫描的签名?

我用 LaTeX 写了一封信,请参阅下面的代码(有一些德语注释,但无关紧要)。

现在我想将我的扫描签名以 jpg 格式放在结束名称上方(即在“Mit freundlichen Grüssen”和我的名字之间)。

如何才能做到这一点?

%---------------------------------------------------------------------------
\documentclass%%
%---------------------------------------------------------------------------
  [fontsize=11pt,%%          Schriftgroesse
%---------------------------------------------------------------------------
% Satzspiegel
   paper=a4,%%               Papierformat
   %enlargefirstpage=on,%%    Erste Seite anders
   %pagenumber=headright,%%   Seitenzahl oben mittig  
%---------------------------------------------------------------------------
% Layout
   headsepline=off,%%         Linie unter der Seitenzahl
   parskip=half,%%           Abstand zwischen Absaetzen
%---------------------------------------------------------------------------
% Briefkopf und Anschrift
   fromalign=right,%%        Plazierung des Briefkopfs
   fromphone=on,%%           Telefonnummer im Absender
   fromrule=aftername,%%     Linie im Absender (aftername, afteraddress)
   fromfax=off,%%            Faxnummer
   fromemail=on,%%           Emailadresse
   fromurl=off,%%            Homepage
   fromlogo=on,%%            Firmenlogo
   addrfield=on,%%           Adressfeld fuer Fensterkuverts
   backaddress=on,%%         ...und Absender im Fenster
   subject=beforeopening,%%  Plazierung der Betreffzeile
   locfield=narrow,%%        zusaetzliches Feld fuer Absender
   foldmarks=on,%%           Faltmarken setzen
   numericaldate=off,%%      Datum numerisch ausgeben
   refline=narrow,%%         Geschaeftszeile im Satzspiegel
   firstfoot=on,%%           Footerbereich
%---------------------------------------------------------------------------
% Formatierung
   draft=off%%                Entwurfsmodus
]{scrlttr2}
%---------------------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage[english, ngerman]{babel}  
\usepackage{url}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
%---------------------------------------------------------------------------
% Fonts
\setkomafont{fromname}{\scshape \LARGE}
%\setkomafont{fromaddress}{\sffamily}%% statt \small
%\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\mdseries}
\setkomafont{backaddress}{\mdseries}
\usepackage{newcent}
%---------------------------------------------------------------------------
\begin{document}
%---------------------------------------------------------------------------
% Briefstil und Position des Briefkopfs
\LoadLetterOption{DIN} %% oder: DINmtext, SN, SNleft, KOMAold.
\makeatletter
\@setplength{firstheadvpos}{17mm}
\@setplength{firstfootvpos}{275mm} % Abstand des Footers von oben
\@setplength{firstheadwidth}{\paperwidth}
\@setplength{locwidth}{70mm}   % Breite des Locationfeldes
\@setplength{locvpos}{55mm}    % Abstand des Locationfeldes von oben
\ifdim \useplength{toaddrhpos}>\z@
  \@addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
\else
  \@addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
\fi
\@setplength{foldmarkhpos}{6.5mm}
\makeatother
%---------------------------------------------------------------------------
% Absender
\setkomavar{fromname}{Max Mustermann}
\setkomavar{fromaddress}{Hauptstraße 1\\12345 Musterhausen}
\setkomavar{fromphone}{+49\,(0)\,123\,123\,123\,1}%
%\renewcommand{\phonename}{Telefon}
\setkomavar{fromemail}{[email protected]}
\setkomavar{backaddressseparator}{ - }
\setkomavar{signature}{(Max Mustermann)}
\setkomavar{location}{\raggedleft

Kundennummer: 12345678 \\}

%---------------------------------------------------------------------------
\setkomavar{date}{\today}
\setkomavar{place}{Musterhausen}
%---------------------------------------------------------------------------
% Anlage neu definieren
\renewcommand{\enclname}{Anlagen}
\setkomavar{enclseparator}{: }
%---------------------------------------------------------------------------
% Seitenstil
%pagenumber=footmiddle
\pagestyle{plain}%% keine Header in der Kopfzeile bzw. plain
\pagenumbering{arabic}
%---------------------------------------------------------------------------
%---------------------------------------------------------------------------
\firstfoot{\footnotesize%
\rule[3pt]{\textwidth}{.4pt} \\
\begin{tabular}[t]{l@{}}% 
\usekomavar{fromname}\\
\usekomavar{fromaddress}\\
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \usekomavar{fromphone}\\
   \usekomavar{fromemail}\\
\end{tabular}%
\ifkomavarempty{frombank}{}{%
\hfill
\begin{tabular}[t]{l@{}}%
\usekomavar{frombank}
\end{tabular}%
}%
}% 
%---------------------------------------------------------------------------
\setkomavar{frombank}{Kto. 123\,123\,123\\
BLZ 123\,123\,12\\
Musterbank}
%---------------------------------------------------------------------------
\begin{letter}{Maxi Musterfrau\\Nebenstraße 1\\12345 Musterstadt\\}
%---------------------------------------------------------------------------
\setkomavar{subject}{\bf{Betreff}}
%---------------------------------------------------------------------------
%\setkomavar{yourref}{}
%\setkomavar{yourmail}{}
%\setkomavar{myref}{}
%\setkomavar{customer}{}
%\setkomavar{invoice}{}
%---------------------------------------------------------------------------
\opening{Sehr geehrte Damen und Herren,}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean aliquet varius blandit. Suspendisse ligula tortor, feugiat in dapibus a, dictum vel risus. Nulla at justo vitae velit sodales dignissim. Curabitur volutpat porttitor pulvinar. Quisque vulputate massa vitae dui sagittis at ultrices lorem sagittis. Nullam lobortis tincidunt libero, et tincidunt urna consectetur ac. Proin laoreet commodo auctor. Nullam nec eros enim. Maecenas commodo sem consectetur neque ullamcorper vel iaculis massa hendrerit. Integer et sem et justo pharetra mattis ut id ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec elementum pulvinar diam in accumsan. Nam laoreet tincidunt tincidunt. Nam hendrerit, lorem vel gravida fringilla, tellus augue vulputate neque, eu laoreet magna metus eu ante. Nullam auctor arcu augue, sed fringilla velit. Nunc auctor mattis nisl, sed iaculis dolor auctor faucibus. Cras libero ligula, dapibus vel egestas non, porta et ante. Nulla dolor sapien, mollis sed sodales a, posuere vitae ante. 

\closing{Mit freundlichen Grüßen,}
%---------------------------------------------------------------------------
%\ps{PS:}
%\encl{Lebenslauf\\ Zeugnisse}
%\cc{}
%---------------------------------------------------------------------------
\end{letter}
%---------------------------------------------------------------------------
\end{document}
%---------------------------------------------------------------------------

答案1

你可以使用类似

\newsavebox\signaturebox
\sbox\signaturebox{%
  \begin{tabular}{@{}c@{}}
    \smash{\includegraphics[height=2.25em]{example-image.pdf}}\\[5pt]
    (\usekomavar{fromname})
  \end{tabular}}
\setkomavar{signature}{\usebox{\signaturebox}}%

有可能

\renewcommand*\raggedsignature{\raggedright}

在此处输入图片描述

代码:

\documentclass%%
  [fontsize=11pt,
   parskip=half,%%           Abstand zwischen Absaetzen
   fromalign=right,%%        Plazierung des Briefkopfs
   fromphone=on,%%           Telefonnummer im Absender
   fromrule=aftername,%%     Linie im Absender (aftername, afteraddress)
   fromemail=on,%%           Emailadresse
]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage[english, ngerman]{babel}
\usepackage{url}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\usepackage{newcent}
\setkomafont{fromname}{\scshape \LARGE}
\setkomafont{backaddress}{\mdseries}

\makeatletter
\@setplength{firstheadvpos}{17mm}
\@setplength{firstfootvpos}{275mm} % Abstand des Footers von oben
\@setplength{locwidth}{70mm} % Breite des Locationfeldes
\@setplength{locvpos}{55mm} % Abstand des Locationfeldes von oben
\@setplength{foldmarkhpos}{6.5mm}
\makeatother

\begin{document}
\setkomavar{fromname}{Max Mustermann}
\setkomavar{fromaddress}{Hauptstraße 1\\12345 Musterhausen}
\setkomavar{fromphone}{+49\,(0)\,123\,123\,123\,1}%
\setkomavar{fromemail}{[email protected]}
\setkomavar{backaddressseparator}{ - }
\setkomavar{location}{\raggedleft Kundennummer: 12345678}
\setkomavar{place}{Musterhausen}
\setkomavar{firstfoot}{\footnotesize%
  \rule[3pt]{\textwidth}{.4pt}\\
  \begin{tabular}[t]{l@{}}% 
    \usekomavar{fromname}\\
    \usekomavar{fromaddress}\\
  \end{tabular}%
  \hfill
  \begin{tabular}[t]{l@{}}%
    \usekomavar{fromphone}\\
    \usekomavar{fromemail}\\
  \end{tabular}%
  \ifkomavarempty{frombank}{}{%
    \hfill
    \begin{tabular}[t]{l@{}}%
      \usekomavar{frombank}
    \end{tabular}%
    }%
}% 
\setkomavar{frombank}{Kto. 123\,123\,123\\
  BLZ 123\,123\,12\\
  Musterbank}

\newsavebox\signaturebox
\sbox\signaturebox{%
  \begin{tabular}{@{}c@{}}
    \smash{\includegraphics[height=2.25em]{example-image.pdf}}\\[5pt]
    (\usekomavar{fromname})
  \end{tabular}}
\setkomavar{signature}{\usebox{\signaturebox}}%
\renewcommand*\raggedsignature{\raggedright}

\renewcaptionname{ngerman}{\enclname}{Anlagen}

\begin{letter}{Maxi Musterfrau\\Nebenstraße 1\\12345 Musterstadt}
\setkomavar{subject}{Betreff}
\opening{Sehr geehrte Damen und Herren,}
\lipsum[1]
\closing{Mit freundlichen Grüßen,}
\end{letter}
\end{document}

请注意,Letter-Class-Option 文件DIN由类自动加载。您必须使用\setkomavar{firstfoot}{...}过时的\firstfoot{...}。并且不要使用\bf

相关内容