Я составляю резюме и хочу добиться примерно такого вида:
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}}