Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

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

2 Answers 2

up vote 9 down vote accepted
\homepage {homepage: my.homepage.url/\textasciitilde username/}

should work.

share|improve this answer
    
@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
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 Feb 16 '11 at 17:41
1  
@jake OK I'll report it. Isn't that the Ubuntu bug reporting page though? –  ajpyles Feb 16 '11 at 17:49
    
@ajpyles "launchpad" hosts open source projects, and moderncv uses it for the bug tracking. The Ubuntu bug tracker is at bugs.launchpad.net/ubuntu –  Jake Feb 16 '11 at 17:52
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. –  Ulrike Fischer Feb 16 '11 at 18:09

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/}}
share|improve this answer
    
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
    
I have the same problem. I get an "! LaTeX Error: Option clash for package hyperref." must be something weird with moderncv. –  ajpyles Feb 16 '11 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 Feb 16 '11 at 17:45
    
@jake doesn't help. I get the same infinite loop listed in the question: ! TeX capacity exceeded, sorry [input stack size=5000]. –  ajpyles Feb 16 '11 at 17:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.