我目前正在為一家德國公司寫一封求職信,我需要在信件結束後和附件之前添加一個後記腳本(即在我的簽名之後和我列出我的學習證書的行之前,請參閱下面的示例代碼) )。是否已經有像 \ps 這樣的命令,或者有沒有辦法為此目的定義一個新命令?
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\name{Hans}{im Glück}
\title{M.Sc.}
\address{Glücksstr. 13}{55444 Glücksdorf}{Deutschland \medskip}
\phone[mobile]{+49~(176)~111~2222}
\email{[email protected]}
\begin{document}
\recipient{Max Mustermann AG}{Personalwesen \\ Hans-Beispiel-Straße 2 \\ 55555 Beispielhausen}
\date{\today}
\opening{Dear Sir or Madam,}
\closing{Your sincerely, \vspace{0,3cm} \\
%\includegraphics[width = 4.5cm]{signature.png} \vspace{-1,0cm}}
\enclosure[Attachment]{study certifcates}
\makelettertitle
text...
\bigskip
\makeletterclosing
\end{document}
非常感謝
答案1
好吧,我自己找到了答案。您必須編輯moderncv.cls和moderncvbodyi.sty檔案:新增一個新指令,例如
\newcommand*{\postscript}[1]{\def\@postscript{#1}}
在 Moderncv.cls 檔案的字母設計指令定義部分
然後添加行
{\@postscript\\[3em]}%
行前
{\color{color2}\itshape\enclname: \@enclosure}}%
在moderncvbodi.sty檔案中,在字母樣式定義部分(有五個這樣的檔案:moderncvbodi.sty,...,moderncvbodv.sty,只需將行新增至每個檔案)