# [texhax] \url with space (%20)

Sharon Baker grover2 at asu.edu
Thu Feb 19 05:56:56 CET 2009

Yay!

Thanks, that worked.  I was using TeXShop and it "looked" like it was
"commenting out" from the % sign and after, so I assumed it wasn't
liking it.

Thanks again :)

Sharon

On Feb 13, 2009, at 2:27 AM, Lars Madsen wrote:

> Sharon Baker wrote:
>> Hello guys,
>> I'm new to this email list.  I looked in the archives and found
>> related topics, but not the answer I'm looking for:
>> To write my thesis I'm using apacite and BibTeX.  In the bib file
>> I  have a reference that contains a URL and I'm using \url.  My
>> problem  is that the URL contains a space (which is replaced with
>> "%20" by the  browser).  We all know that % begins a comment on
>> that line, so in  order to escape, we use a \ in front of the %.
>> However, what happens  to my bib entry is that it ends up printing
>> the \ before the %20 so  the URL will be invalid when "copy-
>> pasted" from the PDF.  How can I  not print the escape character
>> '\' in the URL and still print the % 20?  I also tried leaving a
>> space between "Alternative" and "methods"  instead of using the \%
>> 20 but the \url package ignored the space and  merged the two
>> words (which is also inccorect).
>> This is my entry:
>> @misc{Ludescher2006,
>>    title = {The {D}irect {M}ethod},
>>    author = {Ludescher, Franz},
>>    year  = {2006},
>>    howpublished = {Retrieved January 29, 2009, from:
>>          \url{http://www2.vobs.at/ludescher/Alternative\%
>> 20methods/ direct_method.htm}\bibnodot{.}}
>> }
>> Thanks!
>> Sharon
>> _______________________________________________
>> TeX FAQ: http://www.tex.ac.uk/faq
>> Mailing list archives: http://tug.org/pipermail/texhax/
>> Automated subscription management: http://tug.org/mailman/listinfo/
>> texhax
>> Human mailing list managers: postmaster at tug.org
>
> this works just fine for me, no need to escape, bibtex does not
> look at the contents, so this example should be enough
>
> \documentclass[a4paper]{memoir}
> \usepackage{url}
> \begin{document}
> \url{http://www2.vobs.at/ludescher/Alternative%20methods/
> direct_method.htm}
> \end{document}
>
>
>
> --
>
> /daleif