1

I'd like to shift the description of a moderncv entry (here the "Lorem ipsum..." block created with \blindtext in command \cventry) to the left, positioning it under the date and keeping it left aligned, like the date. What's the best way to do that?

enter image description here

Here's an MWE:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc} 
\firstname{firstname}
\familyname{familyname}
\usepackage{blindtext}
\usepackage{xpatch}
\xpatchcmd{\cvitem}{\raggedleft\hintstyle{#2}}{\raggedright\hintstyle{#2}}{}{}

\begin{document}
\maketitle
\section{Section}
\cventry{2013--2014}{Title}{Subtitle}{Subsubtitle}{Subsubsubtitle}{\blindtext}
\end{document}
3

Well, the design of command \cventry does not allow what you want because it defines a table and only the first parameter (2013--2014 for example) is placed in the first column.

But there is a workaround. Define a new command

% usage: \mycvitem{Text}
\newcommand*{\mycvitem}[2][.25em]{%
  \vspace{-.25em}
  \begin{tabular}{@{}p{\textwidth}@{}}%
    \small#2%
  \end{tabular}%
  \par\addvspace{#1}}

to insert the text over the complete textwidth. Just leave in cventry the last parameter empty. Then the combination

\cventry{2013--2014}{Title}{Subtitle}{Subsubtitle}{Subsubsubtitle}{}
\mycvitem{\blindtext}

gives the output you want.

See the complete MWE

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

\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc} 
\firstname{firstname}
\familyname{familyname}
\usepackage{blindtext}
\usepackage{xpatch}
\xpatchcmd{\cvitem}{\raggedleft\hintstyle{#2}}{\raggedright\hintstyle{#2}}{}{}

% usage: \mycvitem{Text}
\newcommand*{\mycvitem}[2][.25em]{%
  \vspace{-.25em}
  \begin{tabular}{@{}p{\textwidth}@{}}%
    \small#2%
  \end{tabular}%
  \par\addvspace{#1}}


\begin{document}
\maketitle
\section{Section}
\cventry{2013--2014}{Title}{Subtitle}{Subsubtitle}{Subsubsubtitle}{\blindtext}

\cventry{2013--2014}{Title}{Subtitle}{Subsubtitle}{Subsubsubtitle}{} % <=====
\mycvitem{\blindtext} % <====================================================
\end{document}

with the result

enter image description here

  • Awesome, thanks so much for taking the time! – Zubo Aug 15 '17 at 0:34

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.