LaTeX forum ⇒ Text FormattingList in cventry using moderncv class

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
natermiller
Posts: 9
Joined: Thu Oct 15, 2009 8:07 pm

List in cventry using moderncv class

Postby natermiller » Tue Feb 23, 2010 4:10 am

I am using the moderncv.cls class file to make a resume'. I want to do a very simple thing, which is to put a bulleted list into the {description} portion of a \cventry. The \cventry command takes options as follows:
\cventry{years}{degree/job title}{institution/employer}{localization}{grade}{description}
and creates output as in the education section of the example pdf here: http://mirror.ctan.org/macros/latex/contrib/moderncv/examples/template_en_casual_blue.pdf

This command puts the 'years' option in the margin text and formats the rest nicely, but I would like to put a bulleted list in the {description} option. The listed commands shown farther down in the example, such as \cvlistitem, do not have the margin text option, which I need. Maybe the easiest is to create a new command that has both the list structure and the margin text option, but this is a bit beyond my LaTeX know-how. Any help?

Thanks,
Nate

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

List in cventry using moderncv class

Postby gmedina » Tue Feb 23, 2010 4:41 am

Hi,

perhaps something like the following is what you are trying to obtain:

\documentclass{moderncv} 

\firstname{John}
\familyname{Doe}

\newcommand\myitem{\item[\textbullet]\hspace*{.5em} }

\begin{document}  

\cventry{years}{degree/job title}{institution/employer}{localization}{grade}{%
 \begin{itemize}\setlength\itemindent{6pt}
   \myitem First item.
   \myitem Second item.
   \myitem Third item.
 \end{itemize}}

\end{document}


Feel free to adapt my example according to your needs.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

List in cventry using moderncv class

Postby frabjous » Tue Feb 23, 2010 5:06 am

It's kind of an ugly hack, but in my CV (which uses moderncv), I have a portion of the form:

\cventry{University of Massachusetts}{Graduate Courses/Seminars Taught}{}{}{}{}
\vspace{-1.5\baselineskip}

\cvlistdoubleitem{Mathematical Logic I}{Mathematical Logic II}
\cvlistdoubleitem{Modal Logic}{Intensional and Higher-Order Logic}
\cvlistdoubleitem{Philosophy of Mathematics}{Early Analytic Philosophy}

(etc.)

The list occurs right under the cventry thanks to the negative vspace, which needs to be retweaked if I change fonts, etc. There's got to be a cleaner way of doing this, though. (I'd gmedina's if it wasn't a double list.)

natermiller
Posts: 9
Joined: Thu Oct 15, 2009 8:07 pm

Re: List in cventry using moderncv class

Postby natermiller » Wed Feb 24, 2010 10:39 am

Thanks to you both. I think gmedina's solution is pretty much what I need. However, if the text from one of the bulleted items gets wrapped onto a second line it is not indented to line up with the text from the first line, like it is when the \cvlistitem command is used. I tried to use \hangindent commands to fix this to no avail. Any help on that?

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

List in cventry using moderncv class

Postby gmedina » Wed Feb 24, 2010 3:04 pm

Hi,

perhaps another approach would be better. In the code below, the \mybitem command uses two \parbox commands to simulate a bulleted item:

\documentclass{moderncv} 

\firstname{John}
\familyname{Doe}

\newcommand\mybitem[1]{%
   \parbox[t]{3mm}{\textbullet}\parbox[t]{10cm}{#1}\\[1.6mm]}

\begin{document}  

\cventry{years}{degree/job title}{institution/employer}{localization}{grade}{%
  \mybitem{First item text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text text text text
    text text text.}
  \mybitem{Second item}}

\end{document}


Of course, change the width of the boxes, and make the necessary modifications according to your needs.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

natermiller
Posts: 9
Joined: Thu Oct 15, 2009 8:07 pm

Re: List in cventry using moderncv class

Postby natermiller » Wed Feb 24, 2010 7:55 pm

yep, that did the trick. Thanks!

-Nate


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 9 guests