[Tex/LaTex] Extra info in moderncv title

moderncvtitles

The \homepage info is appearing in the title of moderncv. The code works fine in writeLatex, but not on MikTeX. The error is

missing \begin{document}

Please help.

Code:

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

\moderncvstyle{casual}

\moderncvcolor{green} 

\usepackage[scale=0.75]{geometry} % Reduce document margins

\renewcommand*{\namefont}{\fontsize{24}{10}\mdseries\upshape}

\usepackage{verbatim}

\usepackage[T1]{fontenc}

\firstname{Parul} % Your first name
\familyname{Gupta} % Your last name

\address{Address Line 1}{Address Line 2}
%\mobile{(000) 111 1111}
%\phone{(000) 111 1112}
%\fax{(000) 111 1113}
\email{123xyz@gmail.com}

\homepage{http://gmail.com/}{www.gmail.com} % The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example

%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle % Print the CV title

Best Answer

\homepage only takes one argument. So, you should just write:

\homepage{www.gmail.com}

You may want to use the template from CTAN, which can be found here, as it is the most up to date template.

It seems that the template that you're opening from the LaTeX Templates website automatically opens all of the associated .sty files in either of the online editors (i.e., sharelatex and writelatex), and it seems that that version of moderncv is version 1.1. The most recent version on CTAN, however, is version 1.5.1.

It seems that at some point (in particular, in version 1.1), \homepage actually could take two arguments, which is why this works on writelatex for you (i.e., because opening the moderncv template via the LaTeX Templates website automatically opens and uses the version 1.1 .sty files). However, this use seems to have been deprecated in (at least) version 1.5.1, which is the version you will have locally on your machine if your TeX distribution is up to date, since it is the most recent version on CTAN.

This change is not documented in the moderncv changelog, however, so it's not clear in which version that use of \homepage was deprecated.