Text FormattingList in cventry using moderncv class

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

List in cventry using moderncv class

Post by natermiller »

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:

Code: Select all

\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/con ... l_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 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

List in cventry using moderncv class

Post by gmedina »

Hi,

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

Code: Select all

\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

Post by frabjous »

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

Code: Select all

\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

Post by natermiller »

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

Post by gmedina »

Hi,

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

Code: Select all

\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

Post by natermiller »

yep, that did the trick. Thanks!

-Nate
Post Reply