3

I want to find a way to split long line in the 3rd element of \cventry. I use moderncv package and banking style. Using \newline doesn't help. I get the result in the picture using following code. I want to have the word "markets" go to the 2nd line, and "Euro-Finance company" to the 3rd line.

\cventry{2006}{Euro-Finance company}{Certified as technical and fundamental analyst of international financial \newline markets}{MyCity, MyCountry}{}{}

Below is the definition of \cventry in the moderncvstylebanking.sty. I tried to modify it but wasn't able to reach my goal, as I don't understand most of that code.

\renewcommand*{\cventry}[7][.25em]{
  \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}%
  {\bfseries #4} & {\bfseries #5} \\%
  {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
  \end{tabular*}%
  \ifx&#7&%
\else{\\\vbox{\small#7}}\fi%
\par\addvspace{#1}}

Bad result

2 Answers 2

4

Redefine \cventry as

\renewcommand*{\cventry}[7][.25em]{
  \begin{tabular*}{\textwidth}{p{7cm}@{\extracolsep{\fill}}r}%
  {\bfseries #4} & {\bfseries #5} \\%
  {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
  \end{tabular*}%
  \ifx&#7&%
\else{\\\vbox{\small#7}}\fi%
\par\addvspace{#1}}

and adjust 7cm to your needs.

MWE:

\documentclass[sans]{moderncv}

\moderncvtheme{banking}

\firstname{John}
\familyname{Doe}
\title{curriculum vitae}

\renewcommand*{\cventry}[7][.25em]{
  \begin{tabular*}{\textwidth}{p{7cm}@{\extracolsep{\fill}}r}%
  {\bfseries #4} & {\bfseries #5} \\%
  {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
  \end{tabular*}%
  \ifx&#7&%
\else{\\\vbox{\small#7}}\fi%
\par\addvspace{#1}}

\begin{document}

\section{Education}

\cventry{2006}{Euro-Finance company}{Certified as technical and fundamental analyst of international financial markets}{MyCity, MyCountry}{}{}

\end{document}

enter image description here

0
0

I found how can I accomplish what I wanted, by modifying my entry in a following way

\cventry{2006}{\textnormal{\textbf{markets}}}{Certified as technical and fundamental analyst of international financial}{City, Country}{}{\normalsize{\textit{Euro-Finance company}}}

Good output

But, I think, this is very artificial and not convenient for general use.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .