Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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

share|improve this answer
    
Thanks a lot, that is what I wanted. –  eRic Feb 23 at 6:53
    
@eRic You're welcome. –  karlkoeller Feb 23 at 6:57

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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