[l2h] Tilde problem

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Tue Jan 3 01:34:41 CET 2006


> 
> Thanks for the pointer, Les. After smacking the side of head a few times 
> the light is slowly coming on :)
> 
> Yes, a tilde is a non-breaking space. So, with
> 
> \newcommand{\path}[1]{\texttt{#1}}
> 
> I can do something like \path{\~{}/foo} and it works just fine. But, if 
> I use the \path{} from the url.sty file which provides some line 
> breaking feature (?? I really have to go check why I'm using this I 
> think ??) then "\" and "{}"s are printed verbatim. So, I guess I have to 
> use the same macro for both latex and latex2html.
> 
> Anyone have a simple solution?

url.sty provides "sensible" breaks that are useful in long urls.

since it postdates the invention of l2h, there's never been an
adequate way of dealing with it in l2h.

if you want to have typeset urls in your documents, i would recommend
having latex-only and html-only sections, load url in a latex-only
section and do "proper" urls in that, and do the old-fashioned
non-breakable \texttt-style urls in the html sections.

otoh, if you don't need anything more complicated than your ~/foo
things, you might as well forget url.sty altogether.

r



More information about the latex2html mailing list