I have a moderncv \cvitem shown as below.
\cvitem{title}{item1, item2, ... , item(n)}
When the item list gets longer, it displays as following:
Title: item1, item2, ...
item(n-1), item(n)
However, I would like to make it to look as following:
Title: item1, item2, ...
item(n-1), item(n)
Is there a simple way to do this? I tried to apply some of the hanging indentation solutions, but I could not quite make it work. Any help would be appreciated.
Edit: Adding compilable code below
\documentclass[11pt, letterpaper, sans]{moderncv}
\moderncvstyle{banking}
\usepackage[scale=0.75, vmargin=1.0in]{geometry}
\name{first}{last}
\begin{document}
\makecvtitle
\section{Title}
\cvitem{Subtitle}{item-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong, item1, item2, item3, item4, item5, item6, item7}
\end{document}
Best Answer
Well, class
moderncv
offers different commands you could use for your list. I added them into the following MWE to show all possibilities.If you insist in your list inside
\cvitem
there is some programming needed. Please have a look to the following code:Let's say we use
\mycvitem{definiens}{definiendum}
.In command
\mydefwidth
(line 3 above) we calculate the length of the first worddefiniens
(#2) including:
. In command\myitawidth
(line 4) we calculate the remaining width for your following list, heredefiniendum
(#3). Line 5 is used to print thedefiniens:
followed by aminipage
, containing the listdefiniendum
. Line 6 is used to add an space to the next paragraph. If no value is given (an optional value#1
) the default value.25em
is used. Commands\makeatletter
and\makeatother
are need to be able to use@
in the code.Please compile the following MWE:
and see the resulting pdf:
You see first your
\cvitem
and afterwards some examples with the new command\mycvitem
. Then you can see in the complete pdf the result of provided commands of classmoderncv
.