2

This is my first post here, I usually solve my LaTeX issues through other people's questions.

I'm using moderncv 2.0.0 to make my CV. I'm listing a bunch of small courses, workshops, and lectures I attended (check my MWE for example), and having trouble when an argument is longer than the regular page.

I have been trying a few different line breaks, such as \\, \parbox, \linebreak, but none seem to work in that environment.

My issue is that although it compiles, the 2nd argument occupies the whole width of the page, while the 3rd argument divides in 4-5 irregular lines under it.

I want the 2nd argument's width to be shorter, to break it in different lines, so that the 3rd one sits in its place comfortably. Basically, I want the 3rd item on my MWE to line up with the other items.

Note: the \item environment seems to be working here, but I can remove it if needed to solve the problem.

Thanks

MWE:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

\name{Jane}{Doe}
\address{1st Street, 123}{1234-123}{Place}

\begin{document}

\makecvtitle

\subsection{Participation in Lectures, Workshops, Seminars}
\begin{itemize}
\item{\cvitemwithcomment{}{Name of Workshop (year)}{Department, University}}
\item{\cvitemwithcomment{}{This shorter one worked out fine (2018)}{ABCD, University of Place}}
\item{\cvitemwithcomment{}{This one is huge and will not fit into place unless I do something about it like a linebreak or something, and I need help with it (2017)}{123, University of 1234567890}}
\end{itemize}

\end{document}
1

My idea would be to wrap the long text of the \cvitemwithcomment with a parbox, which allows manual linebreaks. You might have to play with the width of the parbox. Using this solution, the dots of the list are centered, which might not be optimal.

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

\name{Jane}{Doe}
\address{1st Street, 123}{1234-123}{Place}

\begin{document}

\makecvtitle

\subsection{Participation in Lectures, Workshops, Seminars}

\begin{itemize}
\item{\cvitemwithcomment{}{Name of Workshop (year)}{Department, University}}
\item{\cvitemwithcomment{}{This shorter one worked out fine (2018)}{ABCD, University of Place}}
\item{\cvitemwithcomment{}{\parbox{0.6\textwidth}{This one is huge and will not fit into place unless I do something about it like a linebreak or something, and I need help with it (2017)}}{123, University of 1234567890}}
\item{\cvitemwithcomment{}{\parbox{0.6\textwidth}{The parbox will wrap text automatically at the end of the box, but you can also insert linebreaks\\manually}}{123, University of 1234567890}}
\end{itemize}

\end{document}

Rendered LaTeX document

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.