% Macros to generate proper line breaks in long URLs, e.g. in bibliographies % \def\lastedit{2008-01-13 04:16:33 by stolfi} \advance\endlinechar by -257 % This is an almost-replacement for the standard {url} pakage. % However, it should be used as a function "\url{www.foo/bar}" rather % than as font-changer "{\url www.foo/bar}". To maintain compatibility % with both packages, this and the standard one, we suggest that both styles % be used at the same time, namely "{\url{www.foo/bar}}". \def\z@s@v{0.7} \def\g@lp{\let\n@xt=} \def\url{\expandafter\d@url\g@lp} \catcode`\/=13 \catcode`\.=13 % \catcode`\&=13 \def\d@url{ \bgroup \tt \catcode`\_=12 \catcode`\#=12 \catcode`\/=13 \def/{\linebreak[0]\char`\/} \catcode`\~=13 \def~{\lower\z@s@v ex\hbox{\char`\~}} % \catcode`\&=13 \def&{\linebreak[0]\char`\&} \catcode`\.=13 \def.{\linebreak[0]\char`\.} \relax } \catcode`\/=12 \catcode`\.=12 % \catcode`\&=13 \advance\endlinechar by 257 % END