\不扩展

\不扩展

我想修改

\cventry{Aug 2014 - Present}{WiMi}{LMU}{}{}{}

在某种程度上,它是不规则的。这可能同样有趣,因为:

\cvitem
\cvitemwithcomment

这在 .tex 文件中是否可行,还是我必须修改 moderncv.cls 和 moderncvstyleclassic.sty?

这是一个简单的例子:

% "ModernCV" CV and Cover Letter
% LaTeX Template
% Version 1.11 (19/6/14)
% Original author:
% Xavier Danaux ([email protected])

\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fixltx2e}
\usepackage{eurosym}
\usepackage{etoolbox} 
\moderncvstyle{classic} 
\moderncvcolor{grey}
\usepackage[scale=0.75]{geometry} 

\firstname{Thomas}
\familyname{Mueller} 
\title{Curriculum Vitae}


\begin{document}

\makecvtitle

\section{Experience}
\cventry{Aug 2014 - Present}{WiMi}{LMU}{}{}{
\begin{itemize}
\item Development of stuff,
\item Misc analysis.
\end{itemize}}

\section{Phd thesis}
\cvitem{Title:}{\emph{The ball and You}}
\cvitem{Supervisors:}{Adam\&  Eva}
\cvitem{Description:}{Random Text.}

\section{Languages}
\cvitemwithcomment{Mothertongue:}{German}{}
\cvitemwithcomment{Intermediate:}{English}{Conversationally fluent}

\end{document}

这就引出了下面的图表。为了清楚起见,我希望日期排列正确(2014 年 8 月 - 至今) 在此处输入图片描述

答案1

\不扩展

将这些添加到你的序言中:

\usepackage{xpatch}% http://ctan.org/pkg/xpatch
% \xpatchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\xpatchcmd{\cvitem}{\raggedleft\hintstyle{#2}}{\raggedright\hintstyle{#2}}{}{}

在此处输入图片描述

\扩张

用途\cventry\cvitem定义\cvitem

\renewcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
    \raggedleft\hintstyle{#2} &{#3}%
  \end{tabular}%
  \par\addvspace{#1}}

您可以看到\raggedleft上面的 必须替换为\raggedright。由于\cvitem使用可选参数,因此最好使用包\xpatchcmd中的进行修补xpatch

完整代码:

% "ModernCV" CV and Cover Letter

% LaTeX Template
% Version 1.11 (19/6/14)
% Original author:
% Xavier Danaux ([email protected])

\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fixltx2e}
\usepackage{eurosym}
\usepackage{etoolbox}
\moderncvstyle{classic}
\moderncvcolor{grey}
\usepackage[scale=0.75]{geometry}

\firstname{Thomas}
\familyname{Mueller}
\title{Curriculum Vitae}


\usepackage{xpatch}% http://ctan.org/pkg/xpatch
% \xpatchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\xpatchcmd{\cvitem}{\raggedleft\hintstyle{#2}}{\raggedright\hintstyle{#2}}{}{}

\begin{document}

\makecvtitle

\section{Experience}
\cventry{Aug 2014 - Present}{WiMi}{LMU}{}{}{
\begin{itemize}
\item Development of stuff,
\item Misc analysis.
\end{itemize}}

\section{Phd thesis}
\cvitem{Title:}{\emph{The ball and You}}
\cvitem{Supervisors:}{Adam\&  Eva}
\cvitem{Description:}{Random Text.}

\section{Languages}
\cvitemwithcomment{Mothertongue:}{German}{}
\cvitemwithcomment{Intermediate:}{English}{Conversationally fluent}

\end{document}

相关内容