是否可以将留给公司的日期放在“专业经验”部分?
这是我的 MWE:
\documentclass[11pt,% % corpo del font: ci sono anche '10pt' e '12pt'
a4paper,% % carta A4
sans,% % famiglia di font: c'è anche 'roman'
]{moderncv} % buona classe per CV
\usepackage[T1]{fontenc} % codifica dei font:
% richiede una distribuzione completa di LaTeX,
\usepackage[utf8]{inputenc} % codifica di input:
% va accordata con le preferenze dell'editor
\usepackage[german]{babel} % per scrivere in italiano
\usepackage{microtype} % microtipografia
\usepackage{lipsum} % genera testo fittizio
\moderncvstyle{classic} % tema di moderncv:
% oltre a 'classic', ci sono 'casual' (predefinito), 'oldstyle' e 'banking'
\moderncvcolor{blue} % colori di moderncv:
% oltre a 'blue' (predefinito), ci sono 'orange', 'green', 'red', 'purple',
% 'grey' e 'black'
\nopagenumbers{} % decommenta per disabilitare la numerazione automatica delle pagine
% per CV più lunghi di una pagina
\usepackage[scale=0.85]{geometry} % imposta i margini
\usepackage{footmisc}
\usepackage{savesym}
\savesymbol{fax}
\usepackage{marvosym}
\restoresymbol{MARV}{fax}
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother
%
\setlength{\hintscolumnwidth}{3.1cm} % regola la larghezza della colonna con le date
\usepackage{mathtools}
\usepackage{xpatch}
\usepackage{verbatim}
\xpatchcmd{\cventry}{.\strut}{\strut}{}{}
\firstname{{\huge{firstname}}} % nome
\familyname{familyname} % cognome
\title{Curriculum vitae} % titolo del CV (opzionale: rimuovi la riga se non lo desideri)
\address{Street}{City} % indirizzo (opzionale)
\mobile{0123~456~789~00} % cellulare (opzionale)
\email{~name\[email protected]} % indirizzo e-mail
\renewcommand\emailsymbol{\Email}
\begin{document}
\makecvtitle
\section{Persönliche Angaben}
\cvlistdoubleitem{Geburtsort: Ort}{Geburtsdatum: Datum}{}
\cvlistdoubleitem{Ledig}{Nationalität: Nationalität}
\vspace{0.5cm}
\section{Professional experience}
\subsection{Company}
%
\cventry{08/2014 -- today}{Titel}{}{}{}{}
\cvitem{function}{
\begin{itemize}
\item task
%\item
\end{itemize}
}{}
%
\end{document}
非常感谢你的帮助
答案1
您可以重新定义该命令或者根据您的情况\subsection
更好地创建一个新命令。\mysubsection
\subsection
该类 2.0.0 版本中命令的原始定义moderncv
是:
\RenewDocumentCommand{\subsection}{sm}{%
\par\addvspace{1ex}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{subsection}{#2}%
\cvitem[0ex]{}{\strut\subsectionstyle{#2}}%
\par\nobreak\addvspace{.5ex}\@afterheading}% to avoid a pagebreak after the heading
我们现在可以用 定义一个新命令\mysubsection
(因为我们必须将此代码添加到我们需要命令的序言中\makeatletter
,并且\makeatother
因为@
在定义中使用了):
\makeatletter
\NewDocumentCommand{\mysubsection}{mm}{%
\par\addvspace{1ex}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{subsection}{#2}%
\cvitem[0ex]{#1}{\strut\subsectionstyle{#2}}%
\par\nobreak\addvspace{.5ex}\@afterheading}% to avoid a pagebreak after the heading
\makeatother
现在你可以使用以下命令调用你的特殊子部分:
\mysubsection{08/2014 -- today}{Company}
使用以下 MWE
\documentclass[%
11pt,
a4paper,
sans,
]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{microtype}
\usepackage{lipsum}
\moderncvstyle{classic}
\moderncvcolor{blue}
\nopagenumbers{}
\usepackage[scale=0.85]{geometry}
\usepackage{footmisc}
\usepackage{savesym}
\savesymbol{fax}
\usepackage{marvosym}
\restoresymbol{MARV}{fax}
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother
%
\setlength{\hintscolumnwidth}{3.1cm} % regola la larghezza della colonna con le date
\usepackage{mathtools}
\usepackage{xpatch}
\usepackage{verbatim}
\xpatchcmd{\cventry}{.\strut}{\strut}{}{}
\makeatletter
\NewDocumentCommand{\mysubsection}{mm}{%
\par\addvspace{1ex}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{subsection}{#2}%
\cvitem[0ex]{#1}{\strut\subsectionstyle{#2}}%
\par\nobreak\addvspace{.5ex}\@afterheading}% to avoid a pagebreak after the heading
\makeatother
\firstname{{\huge{firstname}}} % nome
\familyname{familyname} % cognome
\title{Curriculum vitae} % titolo del CV (opzionale: rimuovi la riga se non lo desideri)
\address{Street}{City} % indirizzo (opzionale)
\mobile{0123~456~789~00} % cellulare (opzionale)
\email{~name\[email protected]} % indirizzo e-mail
\renewcommand\emailsymbol{\Email}
\begin{document}
\makecvtitle
\section{Persönliche Angaben}
\cvlistdoubleitem{Geburtsort: Ort}{Geburtsdatum: Datum}{}
\cvlistdoubleitem{Ledig}{Nationalität: Nationalität}
\vspace{0.5cm}
\section{Professional experience}
\subsection{Company}
%
\cventry{08/2014 -- today}{Titel}{}{}{}{}
\cvitem{function}{
\begin{itemize}
\item task
%\item
\end{itemize}
}{}
%
\section{Professional experience 2}
\mysubsection{08/2014 -- today}{Company} % <==============================
%
\cventry{}{Titel}{}{}{}{}
\cvitem{function}{
\begin{itemize}
\item task
%\item
\end{itemize}
}{}
%
\end{document}
你得到了想要的结果:
答案2
我认为使用该命令很难做到这一点subsection
。但是,您可以模仿其输出,如以下 MWE 所示:
\documentclass[11pt,
a4paper,%
sans,%
]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{microtype}
\moderncvstyle{classic}
\moderncvcolor{blue}
\nopagenumbers{}
\usepackage[scale=0.85]{geometry}
\setlength{\hintscolumnwidth}{3.1cm}
\usepackage{xpatch}
\xpatchcmd{\cventry}{.\strut}{\strut}{}{}
\firstname{{\huge{firstname}}}
\familyname{familyname}
\title{Curriculum vitae}
\address{Street}{City}
\mobile{0123~456~789~00}
\email{~name\[email protected]}
\renewcommand\emailsymbol{\Email}
\begin{document}
\section{Professional experience}
\cventry{08/2014 -- today}{\normalfont\large\textcolor{color1}{Company}}{}{}{}{}%
\end{document}