我正在製作一份履歷,希望能達到這樣的效果:
University 1
Degree 1 Jan 2016 -- Present
Details about degree 1
Degree 2 Previous -- Jan 2016
Details about degree 2
University 2 Degree X
Details about degree X
目前,我有以下程式碼,要求我進入同一所大學兩次。如果我第二次不輸入的話,就只有一個空白行。同樣的情況也適用於不同雇主的不同職位。
\documentclass[10pt,a4paper]{moderncv}
\moderncvtheme[blue]{banking}
\usepackage[utf8]{inputenc} %Windows
\firstname{Student}
\familyname{of Master}
%\title{Dragonkin}
\address{70 x street}{xxxx}
\mobile{+61 xxx xxx xxx}
\email{[email protected]}
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother
\usepackage{multibib,comment}
\newcites{book,misc}{{Books},{Others}}
\nopagenumbers{}
\begin{document}
\setlength{\parskip}{-0.09em}%Change space between entries
%%%%%%Change space between sections
\maketitle
\vspace{-1.3cm}
\section{Education}
\cventry{{2016--Present}}{Postgraduate degree}{University of Gauss}{Antarctica}{}{Details about degree}
\cventry{{2011--2015}}{Undergraduate degree}{University of Gauss}
{Antarctica}{}{Details}
\cventry{{2006--2010}}{High school certificate}{High School}{London}{}{details
}
\end{document}
答案1
不幸的是,主題並不那麼靈活。一個簡單的補丁是根據\cventry
該主題的原始定義定義您自己的命令。
\newcommand*{\cvsimple}[4][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%
% {\bfseries #4} & {\bfseries #5}\\%
{\itshape #3} & {\itshape #2}\\%
\end{tabular*}%
\ifx&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#4%
\end{minipage}}\fi%
\par\addvspace{#1}}
有了這個定義,你就可以寫
\cventry{{2016--Present}}{Postgraduate degree}{University of Gauss}{Antarctica}{}{Details about degree}
\cvsimple{{2016--Present}}{Postgraduate degree}{Details about degree}
去獲得你想要的東西。
這是完整的修改程式碼
\documentclass[10pt,a4paper]{moderncv}
\moderncvtheme[blue]{banking}
\usepackage[utf8]{inputenc} %Windows
\firstname{Student}
\familyname{of Master}
%\title{Dragonkin}
\address{70 x street}{xxxx}
\mobile{+61 xxx xxx xxx}
\email{[email protected]}
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\newcommand*{\cvsimple}[4][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%
% {\bfseries #4} & {\bfseries #5}\\%
{\itshape #3} & {\itshape #2}\\%
\end{tabular*}%
\ifx&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#4%
\end{minipage}}\fi%
\par\addvspace{#1}}
\makeatother
\usepackage{multibib,comment}
\newcites{book,misc}{{Books},{Others}}
\nopagenumbers{}
\begin{document}
\setlength{\parskip}{-0.09em}%Change space between entries
%%%%%%Change space between sections
\maketitle
\vspace{-1.3cm}
\section{Education}
\cventry{{2016--Present}}{Postgraduate degree}{University of Gauss}{Antarctica}{}{Details about degree}
\cvsimple{{2016--Present}}{Postgraduate degree}{Details about degree}
\cventry{{2011--2015}}{Undergraduate degree}{University of Gauss}
{Antarctica}{}{Details}
\cventry{{2006--2010}}{High school certificate}{High School}{London}{}{details
}
\end{document}
細節
上面的定義\cvsimple
是基於\cventry
銀行主題使用的定義,令人困惑的是,它包含在文件中moderncvbodyiii.sty
:
\renewcommand*{\cventry}[7][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%
{\bfseries #4} & {\bfseries #5}\\%
{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#7%
\end{minipage}}\fi%
\par\addvspace{#1}}