[Tex/LaTex] How to get a subentry in moderncv

moderncv

In my cv, I want my internship to be a sub-entry of my masters education.

MWE:

\documentclass[12pt,a4paper,sans]{moderncv}

\moderncvtheme[green]{classic}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}

\firstname{Ice}
\familyname{Rabbit}
\title{curriculum vitae}

\begin{document}
\begin{center}
\makecvtitle
\end{center}

\section{Education}
\cventry{2011 -- 2014}{Master Penguin science}{University of Queen Maud Land}{Antarctica}{}{More learning about penguin behaviour in Antarctica.}

\cventry{2012}{Internship}{University of Ellesmere Island}{Nunavut, Canada}{}{Internship assignment. The goal was to find penguins in the Canadian Arctic.}

\cventry{2006 -- 2011}{Bachelor Penguin science}{University of Queen Maud Land}{Antarctica}{}{Learning about penguin behaviour.}

\end{document}

Result
MWE result

I've gotten the advice to indent the internship entry, to make it more clear that it was a part of my masters education, rather than a separate education.

How can I indent this entry? Alternatively, is there another method to clearly list my internship as part of my masters education? I do want the internship to be clearly present, since on my real cv it shows some good achievements (international experience, high grade, scientific publication)

Best Answer

You can define a new command \subcventry and use it instead of \cventry when you want it indented:

\newcommand*{\subcventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\hspace*{1em}\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&#7&%
      \else{\newline{}\hspace*{1em}\begin{minipage}[t]{\dimexpr\linewidth-1em}\small#7\end{minipage}}\fi}}

Note that if you want to adjust the indentation, you have to modify 1em, which occurs three times in the definition.

MWE:

\documentclass[12pt,a4paper,sans]{moderncv}

\moderncvtheme[green]{classic}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}

\firstname{Ice}
\familyname{Rabbit}
\title{curriculum vitae}

\newcommand*{\subcventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\hspace*{1em}\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&#7&%
      \else{\newline{}\hspace*{1em}\begin{minipage}[t]{\dimexpr\linewidth-1em}\small#7\end{minipage}}\fi}}


\begin{document}
\begin{center}
\makecvtitle
\end{center}

\section{Education}
\cventry{2011 -- 2014}{Master Penguin science}{University of Queen Maud Land}{Antarctica}{}{More learning about penguin behaviour in Antarctica.}

\subcventry{2012}{Internship}{University of Ellesmere Island}{Nunavut, Canada}{}{Internship assignment. The goal was to find penguins in the Canadian Arctic.}

\cventry{2006 -- 2011}{Bachelor Penguin science}{University of Queen Maud Land}{Antarctica}{}{Learning about penguin behaviour.}

\end{document} 

Output:

enter image description here