2

Is it possible to add multiple subjects and grades using the moderncv class like shown below? Image showing multiple subjects and grades under the college name, with the city and dates on the far right

All I have so far is the code below

\cventry{Date--Date}{Subject}{College Name}{City}     
{\textit{Grade}}{}

I've tried searching on Google for the answer using 'multiple subjects moderncv' and its variations, and I have looked on Google images to see if there was any images of something similar. The only code I've tried has been:

\cventry{Date--Date}{Subject\newline Subject 2}{College Name}{City}     
{\textit{Grade}\newline\textit{Grade 2}}{}

Which failed to create either \newline

Could anyone please help?

1

You can use a tabularx:

\documentclass{moderncv}
\moderncvtheme{classic}
\usepackage{tabularx}

\firstname{John}
\familyname{Doe}

\begin{document}

\section{Test section}
\begin{tabularx}{\linewidth}{Xl}
\textbf{College Name} & \textbf{City} \\
Subject 1--Grade & year--year \\
Subject 2--Grade & year--year \\
Subject 3--Grade & year--year \\
\end{tabularx}

\end{document}

enter image description here

To align thetabular material with the section title, you can use an appropriate space:

\documentclass{moderncv}
\moderncvtheme{classic}
\usepackage{tabularx}

\firstname{John}
\familyname{Doe}

\begin{document}

\section{Test section}
\hspace*{\dimexpr\hintscolumnwidth+\separatorcolumnwidth\relax}\begin{tabularx}{\dimexpr\linewidth-\hintscolumnwidth-\separatorcolumnwidth\relax}{Xl}
\textbf{College Name} & \textbf{City} \\
Subject 1--Grade & year--year \\
Subject 2--Grade & year--year \\
Subject 3--Grade & year--year \\
\end{tabularx}

\end{document}

enter image description here

Another option would be to use \cventry and \cvitem:

\documentclass{moderncv}
\moderncvtheme{classic}

\firstname{John}
\familyname{Doe}

\begin{document}

\section{Test section}
\cventry{}{College Name}{}{}{\hfill\textbf{City}}{}
\cvitem{}{Subject 1--Grade\hfill year--year}
\cvitem{}{Subject 2--Grade\hfill year--year}
\cvitem{}{Subject 3--Grade\hfill year--year}

\end{document}

enter image description here

1
  • @HarishKumar Yes, I know, but the question doesn't specify what's considered "good alignment" with respect to other elements. In any case, I'll add some remark about this. Thanks. – Gonzalo Medina Oct 24 '15 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.