# Multicolumn at the beginning of moderncv

I changed the beginning of my CV as

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{classic}

\moderncvcolor{blue}

\usepackage[utf8]{inputenc}

\usepackage[scale=0.75]{geometry}

\makeatletter
\renewcommand*{\makecvtitle}{%
\recomputecvlengths%
% detailed information box
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
\begin{tabular}[b]{@{}p{10cm}@{}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile} %
\end{tabular}
}%
% name and title
\newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
\ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}%
{\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth
}}%
{}%
\raggedright\namestyle{\@firstname\ \@familyname}\par\medskip%
\ifthenelse{\equal{\@title}{}}{}{{\centering\titlestyle{\@title}\par}\medskip}%
\usebox{\makecvtitledetailsbox}%
\par}%
\makeatother

\name{John}{Doe}

\email{john@doe.org}

\begin{document}

\makecvtitle

\end{document}



The output (in overleaf) is

For some reason, it does not work in WinEdt!

But the problem is that the name is not in the center.

I also would like to have "street and number" and "postcode city" in one column (on left) and email and phone number in another column (on right) next to it.

Could someone help me with this?

• Sorry, not clear what you want to center. Can you please add a screenshot to your question? And please, add at least the preamble, starting with \documentclass. Jun 14 at 11:23
• Thank you for the comment. I'm new to everything here and I don't know what a preamble is! I put all the code that I use in the question and added the output I get from overleaf. Jun 14 at 14:36
• That's fine. // Where did you get the code from? Did you read the moderncv-manual mirror.marwan.ma/ctan/macros/latex/contrib/moderncv/manual/… ? Jun 14 at 15:00
• As I see it, this class is quite limited. I.e. you can select from two themes, and that's it. From this perspective many of your commands don't match the manual (17 mnths old). // Though it can be done, changing macros might be a bit too much at the beginning. Did you have a look at alternatives: ctan.org/topic/cv ? As a rule of thumb, the koma-series tends to provide flexibility. Jun 14 at 15:07
• Perhaps it's even easier to find other Latex templates for CV's. Try e.g. google.com/search?&q=latex+cv , and also switch to images to see results. Looks like you can get almost anything you want. Jun 14 at 15:34

I agree with some of the comments that if you want to completely restyle everything, there's no reason to use moderncv.

But if you like moderncv in other ways and just want to change the \makecvtitle command, it should be doable. You can do it with simpler code than what you were using—not sure where you got that code since I doubt you made it yourself… A lot of the complexity of the redefinition you were giving are eliminated if you know in advance which contact data is going to be supplied.

Here I'm separating the two "columns" of the address/contact information with \hfills, which right aligns the second column to the right side of the page. You may not want that, in which case something different would have to be done, but things can be fairly simply.

I also redefined the \mobile command since it wasn't properly setting \@mobile.

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

\makeatletter

\renewcommand*{\makecvtitle}{%
{\centering\namestyle{\@firstname\ \@lastname}\par}\medskip
\hfill
\mobilesymbol\@mobile\\
\hfill
\emailsymbol\@email\\
}}
\makeatother
\name{John}{Doe}