# Space between the two slashes in “http://” too big

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}

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

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}

• Or \def\http://{http:/\kern-.2em/} and \http://www.x.y :) Feb 16, 2013 at 13:50
• Welcome to TeX.sx! Feb 16, 2013 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 Feb 16, 2013 at 14:08
• @Tobi You sure that was a typo? I always thought ex was a height Feb 16, 2013 at 15:32
• It doesn’t matter matter. An ex is based on the height of the small letter x and an em is based on the width of the capital M, but it is okay to measure a width in multiples of ex and heights in multiples of em. But on may consider it good style to use ex for heights and em for widths, so I’ll change my edit to ems …
– Tobi
Feb 16, 2013 at 16:16