# Using email in CV makes an additional space

When I am writing my CV, when I use \email to show my email there is an additional space.

Part of code:

 \documentclass[12pt]{moderncv}
\moderncvstyle{oldstyle}
\moderncvcolor{grey}
\firstname{FirstName}
\familyname{FamilyName}
\title{Curriculum Vitae}
\mobile{mobile}
\email{myemailislong@gmail.com}
\begin{document}
\makecvtitle
abc
\end{document}

• Hello and welcome to the forum! Can you post a MWE (Minimal Working Example) to help us find the bug in your code? Mar 11, 2020 at 21:01
• As always on the site: you'll have much better luck if you provide a full (but minimal) example others can copy and test as is. We don't even know what document class you're using, so not much to go on. Mar 11, 2020 at 21:02
• That is not a full example others can copy and test as is Mar 11, 2020 at 21:23
• @daleif what do you mean by full example? I added a part of my code that could be run by anyone. Mar 11, 2020 at 21:27
• You cannot run that example by copying it to a blank document and run it through, say, pdflatex. For example there is no body env. The as mentioned the example should contain everything another person needs in order to use it. Else we have to make guesses and we know from experience that thst can go very wrong Mar 11, 2020 at 21:33

Well, I'm not sure you want to read this ...

The culprit of style oldstyle of class moderncv is that the available place in the first column containing your personal datas including your email is very short with standard configuration. That is the reason you get in your case with the long email address an big empty space and an (I guess unwanted!) hyphenation of the email address.

There are only two ways to get rid of that:

1. Give the email address more space so that it can be printed in one line. That means all your datas in your cv have less space in the second column of your cv.
2. Rewrite the definition of the layout of the header for this style completly. Sorry, I have not the time to do this ...

So let us have a look to solution 1:

You can define the length of the first column in your cv containing the personal datas with the command \setlength{\hintscolumnwidth}{4.9cm} in the preamble of your cv. Play with the used length to fit your needs (depends on how long your real used email address is ...).

\documentclass[12pt]{moderncv}

\moderncvstyle{oldstyle}
\moderncvcolor{grey}

\firstname{FirstName}
\familyname{FamilyName}
\title{Curriculum Vitae}
\mobile{mobile}
\email{myemailislong@gmail.com}

\setlength{\hintscolumnwidth}{4.9cm} % <================================

\begin{document}
\makecvtitle

\section{Text}
abc

\section{Text}
abc
\end{document}


and its result (I marked the two columns for a better understanding):

Just a personal remark: for me styles classic or casual fit better your need if you have a very long email address. Please try them too.

• thank you very much! It helped! Mar 12, 2020 at 10:07