0

When putting education, we have an expected date which is too long and I'm not sure how to make a right alignment in \cventry.

What I have is

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}

\usepackage[scale=0.75]{geometry}

\firstname{Nomen}
\familyname{Nescio}

\title{Curriculum Vitae}

\begin{document}

\section{\textbf{Education}}

\cventry{2022(expected)}{Ph.D. in some field}{some school}{some country}{}{}
\cventry{2021}{M.S.}{some school}{some country}{}{}
\end{document}

The output is

enter image description here

Is it possible to align 2022(expected) and 2021 properly?

I tried to follow the answer in this question but it didn't work.

1
  • I have modified your MWE so that it actually compiles.
    – Ingmar
    Jun 18, 2022 at 11:47

1 Answer 1

0

The way I see it, there are a couple of options:

  1. You could use a smaller font, or abbreviate expected to exp. or similar. (Be sure to use a space after 2022 to allow for a linebreak.)

  2. You could move the year to the left, essentially giving you a longer line (at the price of bleeding into the left margin, so to speak):

\cventry{\llap{2022} (expected)}{Ph.D. in some field}{some school}{some country}

  1. You could make the whole column bigger, at least for the Education section:

\setlength{\hintscolumnwidth}{2.25cm}

See if any of that helps …

PS: Here's a full example (pardon the purple)

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{purple}

\usepackage[scale=0.75]{geometry}

\firstname{Nomen}
\familyname{Nescio}

\title{Curriculum Vitae}

\begin{document}

\section{\textbf{1. Abbreviate!}}
\cventry{2022 (exp.)}{Ph.D. in some field}{some school}{some country}{}{}
\cventry{2021}{M.S.}{some school}{some country}{}{}

\section{\textbf{2. Smaller Font}}
\cventry{2022 \scriptsize(expected)}{Ph.D. in some field}{some school}{some country}{}{}
\cventry{2021}{M.S.}{some school}{some country}{}{}

\section{\textbf{3. Bleeding Into Left Margin}}
\cventry{\llap{2022} (expected)}{Ph.D. in some field}{some school}{some country}{}{}
\cventry{2021}{M.S.}{some school}{some country}{}{}

\section{\textbf{4. Embiggen Column to the Right}}
\setlength{\hintscolumnwidth}{3cm}
\cventry{2022 (expected)}{Ph.D. in some field}{some school}{some country}{}{}
\cventry{2021}{M.S.}{some school}{some country}{}{}

\end{document}

enter image description here

You must log in to answer this question.