Hi,

and thanks for your reply, Herbert.

Herbert Voss, maanantai, 12.12.2005 23:11:
> K. Elo wrote:
> >>>This might be true, but this won't work, if your .bst uses the
> >>> \url command to format url-fields (as does mine).
> >>
> >>url and \url are _two_ things! show me an example
> >>where it doesn't work!
> >
> > Well, using url={\url{site}} in a bibtex won't solve the underscore
> > (_)
>
> it will!

No, it won't solve it CORRECTLY! Please see below.

> > problem. If the "site" contains pure underscore (_) you still have
> > to use \_. You may try it with the attached files
> > (test.bib,.bst,.lyx).
>
> \usepackage{url} in Layout->Document->Preamble
>
> and there is _no_ error

Well, the are no errors, but the output is not correct! 

If I leave the underscore(s) alone and use the \usepackage{url} in the 
preamble, then all whitespaces in the bibtex entry are lost in the output 
(which is NOT correct). The result is the same, if I use no preamble, but 
url={\url{...}} in the bibtex-entry instead. If I use both \usepackage and 
url={\url..., then the url in the output will begin with \url (which is also 
NOT correct).

The only way I have managed to produce a correct output is the combination no 
preamble, url={site} format in a bibtex entry and all underscores in the site 
name as \_. You may twist and turn it like you will, but I have tested all 
possible (i.e. error-free) combinations and this is the only producing a 
correct, i.e. a WYSIWYM output. Please feel free to test it by yourself if you 
don't believe me.

Herbert Voss, 12.12.2005 23:25:
> and the following is the reason why a \url in the bib file
> is not needed, because the bst file does it already ...
>
> > FUNCTION {format.url}
> > { url empty$
> >     { "" }
> >     { "\url{" url * "}" * }
> >   if$
> > }

Well, this is already clear to me. As I mentioned, I have made the .bst file 
myself, so please belive me, I have an idea what it is supposed to do...;-) 
(I'm really not a newbie with .bst files).

To sum up: I don't see the point of using url={\url...} in a bibtex entry, if 
a) the .bst file does the formatting for you and b) if there are no other 
benefits (e.g. the underscore problem is not solved)... Or do I miss a benefit?

Kind regards,
Kimmo



Reply via email to