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 a lot of links with http:// in my document, but the two slashes are too much separated, I'd like them to be more near each other. How do I do this, in a neat way?

I'm using a sans-serif font: \renewcommand{\familydefault}{\sfdefault}

share|improve this question
    
I would use the url-command from the url package: \url{http://tex.stackexchange.com} –  xfoo Feb 16 '13 at 13:45
    
That makes a monospace font, I really want the sans-serif font. –  Camil Staps Feb 16 '13 at 13:48
3  
@CamilStaps Use \urlstyle{sf}. Also have a look at tex.stackexchange.com/questions/98466/… –  lockstep Feb 16 '13 at 14:42
3  
@lockstep There’s also \urlstyle{same} which picks \familydefault and is a tiny bit more comfortable. –  Qrrbrbirlbel Feb 16 '13 at 16:27
add comment

1 Answer

up vote 12 down vote accepted

This should do what you want. Of course, you can choose the command name (\twobar) and the amount of kerning (–0.2em):

\documentclass{article}
\newcommand{\twobar}{/\kern-0.2em/}
\begin{document}
{\sffamily

http://www.jb.com.br

http:\twobar{}www.jb.com.br

}
\end{document}
share|improve this answer
6  
Or \def\http://{http:/\kern-.2em/} and \http://www.x.y :) –  egreg Feb 16 '13 at 13:50
1  
Welcome to TeX.sx! –  Peter Jansson Feb 16 '13 at 14:03
    
@egreg : Thank you. I'm not very sure about how \def works, yet, so I was more comfortable to stay with \newcommand –  Bianca Lobo Feb 16 '13 at 14:08
    
@PeterJansson Thank you, very kind. –  Bianca Lobo Feb 16 '13 at 14:09
1  
@Tobi You sure that was a typo? I always thought ex was a height –  Brent.Longborough Feb 16 '13 at 15:32
show 2 more comments

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.