1

I would like to remove the second argument from the \address command in moderncv, classic style. Is there a reasonably easy way to do so?

In other words, I'm trying to remove "Address line 2" from the following code:

\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[roman]{classic}               
\firstname{Name}
\familyname{Surname}
\title{title-position}               
\address{Address line 1}{Address line 2}  % here I want to remove {Address line 2}  
\mobile{mobile phone}
\email{email address}                
\begin{document}
\maketitle
\section{Content}
 ...........
\end{document}

I've tried by simply using \address{Address line 1}{} but it leaves a blank line in the output.

Any hint will be most welcome, thanks.

0

1 Answer 1

2

Well, you wrote:

I've tried by simply using \address{Address line 1}{} but it leaves a blank line in the output.

That is not true. It depends on how many informations you want to print in the title.

With style classic the title prints the title-position and additional information (optional) in the same line.

So with the following MWE

\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvtheme{classic} % <=============================================
\firstname{Name}
\familyname{Surname}
\title{title-position}               
\address{Address line 1}{Address line 2}  % here I want to remove {Address line 2}  
\mobile{mobile phone}
\phone{phone (optional)} % <============================================
\email{email address} 
\extrainfo{additional information (optional)} % <=======================


\begin{document}
\maketitle
\section{Content}

\end{document}

you get the resulting pdf:

enter image description here

As you can see (long red line) There is some empty place above the printed name ...

After reducing the used personal informations (see MWE later) you get the following result:

enter image description here

Now the name and the title consumes more space than the personal informations on the right. Therefore the empty space is added on the right side ...

This is the MWE for the second screenshot:

\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvtheme{classic} % <=============================================
\firstname{Name}
\familyname{Surname}
\title{title-position}               
%\address{Address line 1}{Address line 2}  % here I want to remove {Address line 2}  
\address{Address line 1}{}  % <========================================= 
\mobile{mobile phone}
%\phone{phone (optional)} % <============================================
\email{email address} 
%\extrainfo{additional information (optional)} % <=======================


\begin{document}
\maketitle
\section{Content}

\end{document}

Please see that I moved option roman to be a class option (the right place if you use current version 2.0.0 of moderncv).

1
  • Perfect, thanks. The problems came from using an older version of moderncv.
    – Nemo
    Oct 14, 2018 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .