# How to add a new command in moderncv template for cventry?

I want to add new moderncv command to act like the command cventry but in double, I mean that I have the same job from a period in two differnet companies and I need the command to show it, here is the original commands

\cventry[spacing]{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}


what I want is something like this

\cventrydouble[spacing]{years}{degree/job title}
{institution1/employer1}{localization1}{optionnal1: grade/...}{optional1: comment/job description}
{institution2/employer2}{localization2}{optionnal2: grade/...}{optional2: comment/job description}


and this will give final result like the original one but with \cventrydouble you will be able for the same period and same job to put two employers.
I need something close this but with better style :
\section{Experiences Professionnelles} \cventry{2008\à 2012}{Responsable...}{}{}{}{} \cventry{}{}{Company1}{Paris}{France}{Description company1.} \cventry{}{}{Company2}{Paris}{France.}{Description company2\newline{}}

Sorry but I'm not allowed to show a picture, I get this message

"We're sorry, but as a spam prevention mechanism, new users aren't allowed to post images. Earn more than 10 reputation to post images."

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). Also, usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  hpesoj626 Dec 13 '12 at 8:23
@Eric Any chance to sketch a picture of what you are trying to achieve? As far as I understand,if you just want to mention 2 employers on the same line, you could put the information about the second one as the optional1 argument. –  Xavier Dec 13 '12 at 18:01
Yes but the matter is that the format is uncorrect ! Ialso do that but it is not very convenient : \section{Experiences Professionnelles} \cventry{2008\\à 2012}{Responsable...}{}{}{}{} \cventry{}{}{Company1}{Paris}{France}{Description company1.} \cventry{}{}{Company2}{Paris}{France.}{Description company2\newline{}} –  Eric Fournet Dec 14 '12 at 4:49

To put two companies and locations for the same job title, you could use the penultimate argument of \cventry to hold information about the second company and location.
Depending on the style you are using, you will need to set formatting manually accordingly inside that argument, i.e. for the classic or casual style:

\section{Experience}
\cventry{Date}{Job title}{Company 1}{Location 1}{\textsl{Company 2}, Location 2}{Description}


which will produce

-
Ok but I have an error a } is missing ? Also I want 2 Description item one for each company –  Eric Fournet Dec 14 '12 at 6:12
Sorry misread for the missing }. I succeeded to do like your example but as I said, it is not completly convenient because I want to add description for each company ! –  Eric Fournet Dec 14 '12 at 6:34
@EricFournet Please describe exactly how you want the result. If you want 2 descriptions, for 2 companies and 2 locations, with the information about the second company separating the descriptions, it looks to me those are 2 different jobs and I don't understand why you don't simply use 2 times \cventry (I would even explicitly put twice the same job title). If you want the 2 descriptions after each other directly, simply put everything into one \cventry as above and use \newline between the 2 description texts. –  Xavier Dec 14 '12 at 15:22
in fact I want to have a better cv with a long period in the same job in two different companies rather than 2 times the same job but with short period in one company. So I need to present one period, one job title, two companies, two locations and two company descriptions ! I don't know how to use Latex to create my own presentation and I found the presentation of moderncv really nice ! –  Eric Fournet Dec 18 '12 at 9:56
@EricFournet You still don't describe what graphical output you want to achieve. What I proposed in my earlier comment is one way of presenting one job title with one period but two companies, two locations and two descriptions. If you seek help for another, please describe it. –  Xavier Dec 19 '12 at 0:01