\no展開

\no展開

我想修改第一個字段

\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

\no展開

將這些添加到您的序言中:

\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}

相關內容