我想删除文档中的电话条目,该条目之前已在求职信的标题中设置,但后者会自动发生这种情况,这很不愉快。
我可以(似乎)添加任意数量的电话条目,但无法删除任何条目。
麦格
\documentclass[a4paper]{moderncv}
\moderncvtheme[blue]{classic}
\usepackage[left=25mm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{ragged2e}
\usepackage{lipsum}
\makeatletter
\newcommand*{\subject}[1]{\def\@subject{\textbf{#1}}}
\patchcmd{\makeletterhead}{\@date\\[2em]}{\@date\\[2em]\@subject\par\medskip
}{}{}
\renewcommand*{\makeletterclosing}{
\\[1em]\@closing\\[1em]
{\includegraphics[width=4cm]{mwe.png}
\par
\bfseries \@firstname~\@lastname}
\ifthenelse{\isundefined{\@enclosure}}{}{
\vfill
{\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother
\setlength{\hintscolumnwidth}{45mm}
\name{Myself}{Me}
\title{Applying including living walk}
\address{Homestreet 0}{56789 Homing}
\email{[email protected]}
\phone{0123 456 789}
\photo[55mm][0pt]{mwe.png}
\author{\href{mailto:[email protected]}{Myself Me}}
\date{\today}
\begin{document}
\newcommand{\n}{\newline}
\recipient{Musterfirming\n personal management\n attn. Max Musterman}{Musterstreet\n 01234 Mustercity}
\date{Homing, the \today}
\opening{Dear Sirs and Madams,}
\closing{Kind regards}
\enclosure[\vfill Additional things]{Living walk}
\subject{Jobapplying}
\makelettertitle\justifying
\lipsum[1]
\makeletterclosing
\newpage
\renewcommand{\fixedphonesymbol}{}
\renewcommand{\emailsymbol}{}
\name{Me, Myself}{I}
\title{Living walk}
\address{}{}
\collectionloop{phones}{}
% \phone
\email{}
\makecvtitle
\section{Personal datas\n}
\cvitem{Name}{Me, Myself and I}
\cvitem{Address}{Homestreet 1, 56789 Homing}
\cvitem{Birth date and place}{1. 2. 345 in Hometopia}
\cvitem{Citicenship}{Mine}
\cvitem{Phone}{0123 456 789}
\cvitem{Email}{[email protected]\n\n}
\section{Next whatevers\n}
\cvitem{Also name}{Me, Myself and I}
\cvitem{Again address}{Homestreet 1, 56789 Homing}
\cvitem{Birth date and place}{1. 2. 345 in Hometopia}
\cvitem{Citicenship}{Mine}
\cvitem{Phone}{0123 456 789}
\cvitem{Email}{[email protected]\n\n}
\end{document}
我确实明白(和韋斯特)。在第二页的图片旁边,有一个电话号码,这个号码不应该出现在那里,因此应该将其删除。
如何在使用过一次后删除文档中(所有)的电话条目?
答案1
嗯,在文件中moderncvheadi.sty
有一个选项的定义,如果使用则nodetails
设置为。\@detailsfalse
使用此选项,您可以在简历(和信件)标题中使用 tex 代码隐藏所有其他个人信息:
\makeatletter
\@detailsfalse
\makeatother
使用以下 MWE(参见标有 的重要代码更改<=======
):
\documentclass[a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[left=25mm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{ragged2e}
\usepackage{lipsum}
\makeatletter
\newcommand*{\subject}[1]{\def\@subject{\textbf{#1}}}
\patchcmd{\makeletterhead}{\@date\\[2em]}{\@date\\[2em]\@subject\par\medskip
}{}{}
\renewcommand*{\makeletterclosing}{
\\[1em]\@closing\\[1em]
{\includegraphics[width=4cm]{example-image}
\par
\bfseries \@firstname~\@lastname}
\ifthenelse{\isundefined{\@enclosure}}{}{
\vfill
{\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother
\setlength{\hintscolumnwidth}{45mm}
\name{Myself}{Me}
\title{Applying including living walk}
\address{Homestreet 0}{56789 Homing}
\email{[email protected]}
\phone{0123 456 789}
\photo[55mm][0pt]{example-image}
\author{\href{mailto:[email protected]}{Myself Me}}
\date{\today}
\begin{document}
\newcommand{\n}{\newline}
\recipient{Musterfirming\n personal management\n attn. Max Musterman}{Musterstreet\n 01234 Mustercity}
\date{Homing, the \today}
\opening{Dear Sirs and Madams,}
\closing{Kind regards}
\enclosure[\vfill Additional things]{Living walk}
\subject{Jobapplying}
\makelettertitle\justifying
\lipsum[1]
\makeletterclosing
\newpage
% \renewcommand{\fixedphonesymbol}{} <================================
% \renewcommand{\emailsymbol}{} <=====================================
\name{Me, Myself}{I}
\title{Living walk}
% \address{}{} <======================================================
% \collectionloop{phones}{} <=========================================
%% \phone{~}
% \email{} <==========================================================
% to get no details in makecvtitle
\makeatletter % <=======================================================
\@detailsfalse
\makeatother % <========================================================
\makecvtitle
\section{Personal datas\n}
\cvitem{Name}{Me, Myself and I}
\cvitem{Address}{Homestreet 1, 56789 Homing}
\cvitem{Birth date and place}{1. 2. 345 in Hometopia}
\cvitem{Citicenship}{Mine}
\cvitem{Phone}{0123 456 789}
\cvitem{Email}{[email protected]\n\n}
\section{Next whatevers\n}
\cvitem{Also name}{Me, Myself and I}
\cvitem{Again address}{Homestreet 1, 56789 Homing}
\cvitem{Birth date and place}{1. 2. 345 in Hometopia}
\cvitem{Citicenship}{Mine}
\cvitem{Phone}{0123 456 789}
\cvitem{Email}{[email protected]\n\n}
\end{document}
你得到了想要的结果:
在信中您仍然会看到所有个人数据: