# moderncv : \homepage - can't handle a tilde

I'm using the latest version of `moderncv` from CTAN. When I set :

``````\homepage {homepage: my.homepage.url/~username/}
``````

The tilde doesn't show up. So I tried:

``````\usepackage{textcomp}
``````

But.. that causes an infinite loop:

``````Package hyperref Warning: Option `baseurl' has already been used,
(hyperref)                setting the option has no effect on input line 54.

Package hyperref Warning: Option `pdfpagemode' has already been used,
(hyperref)                setting the option has no effect on input line 54.

Package hyperref Warning: Option `pdfstartpage' has already been used,
(hyperref)                setting the option has no effect on input line 54.

! TeX capacity exceeded, sorry [input stack size=5000].
\font@name ->
\U/mvs/m/n/14.4
l.55 \maketitle
``````

Any Ideas how to fix this?

-
@Martin Thanks for the patch! This also works great probably a little cleaner than the other solution. – ajpyles Feb 16 '11 at 21:28

``````\homepage {homepage: my.homepage.url/\textasciitilde username/}
``````

should work.

-
@Jake yes it works! It doesn't look as good as \texttildelow but it compiles. Any idea why the other doesn't work? – ajpyles Feb 16 '11 at 17:37
@ajpyles: I don't, unfortunately, but this is almost definitely a bug in `moderncv`, which you might want to report at bugs.launchpad.net/moderncv – Jake Feb 16 '11 at 17:41
@jake OK I'll report it. Isn't that the Ubuntu bug reporting page though? – ajpyles Feb 16 '11 at 17:49
`\homepage{my.homepage.url/\string~username/}` should work too. If you want a working link you shouldn't add text like "homepage", it will be added to the url. Redefine `\homepagesymbol` instead. – Ulrike Fischer Feb 16 '11 at 18:09
With the latest version, the leading `homepage: ` should be removed – giordano Jul 1 '15 at 8:28

This happens because this class first saves the `\homepage` argument away and then uses it inside `hyperref`s `\href` macro.

The `~` is then already expanded to an unbreakable space and `\href` doesn't like macros like `\texttilde...` inside the URL part.

Here a small patch of the internally used `\httplink` macro:

``````\renewcommand*\httplink[2][]{{\urlstyle{sf}\expandafter\href#2}}
\homepage{{http://mydomain/~user}{homepage: mydomain/{\texttildelow}user}}                % optional, remove the line if not wanted
``````

old:

Try to use the `\url` macro from the `hyperref` package to format the address correctly:

``````\usepackage{hyperref}
%...

`hyperref` is loaded by `moderncv` automatically, and `\url` is usable in normal entries in the CV, but for me it does not work in `\homepage`, strangely enough... – Jake Feb 16 '11 at 17:36
@ajpyles: Try not loading `hyperref` explicitly (it should be loaded by `moderncv`), and then use `\url` in the `\homepage`. That should get rid of the `option clash` error (although I got a different error message in that case, but maybe it works for you). – Jake Feb 16 '11 at 17:45