20

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}
\homepage {homepage: my.homepage.url/{\texttildelow}username/}

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?

1
  • @Martin Thanks for the patch! This also works great probably a little cleaner than the other solution.
    – ajpyles
    Commented Feb 16, 2011 at 21:28

2 Answers 2

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

should work.

7
  • 1
    @Jake yes it works! It doesn't look as good as \texttildelow but it compiles. Any idea why the other doesn't work?
    – ajpyles
    Commented Feb 16, 2011 at 17:37
  • 1
    @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
    Commented Feb 16, 2011 at 17:41
  • 1
    @jake OK I'll report it. Isn't that the Ubuntu bug reporting page though?
    – ajpyles
    Commented Feb 16, 2011 at 17:49
  • 1
    \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. Commented Feb 16, 2011 at 18:09
  • 1
    With the latest version, the leading homepage: should be removed
    – giordano
    Commented Jul 1, 2015 at 8:28
5

This happens because this class first saves the \homepage argument away and then uses it inside hyperrefs \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}
%...

\homepage {homepage: \url{http://my.homepage.url/~username/}}
4
  • 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
    Commented Feb 16, 2011 at 17:36
  • I have the same problem. I get an "! LaTeX Error: Option clash for package hyperref." must be something weird with moderncv.
    – ajpyles
    Commented Feb 16, 2011 at 17:40
  • @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
    Commented Feb 16, 2011 at 17:45
  • 1
    @jake doesn't help. I get the same infinite loop listed in the question: ! TeX capacity exceeded, sorry [input stack size=5000].
    – ajpyles
    Commented Feb 16, 2011 at 17:47

You must log in to answer this question.

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