[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#146438: tetex-base: bibtex deals badly with \% at a linebreak



"A" == Agthorr  <agthorr@barsoom.org> 

[deletia]

    A> I'm using regular latex to generate my output.

If you're just generating DVI, PostScript, or PDF files, I don't
think that you should be using the \htmladdnormallink command --
there are better alternatives.  If you're using latex2html to
generate HTML, then you might need to use it, in which case one of
the workarounds I present below might work for you.

Going back to your original bib entry,

   @Misc{qrp,
     author =       {Christopher Rohrs},
     title =        {Query Routing for the Gnutella Network},
     howpublished = {\htmladdnormallink{\url{http://www.limewire.com/developer/query\_routing/keyword\%20routing.htm}}{http://www.limewire.com/developer/query_routing/keyword\%20routing.htm}},
     month =        jan,
     year =         2002
   }

causes errors or loses information.

I thought I had come up with a way to slightly modify your bibliography
entry so that it would work, but I can't reproduce my initial
success so I'm not going to include it here.

I still don't have a very good idea of what you're trying to do --
what kind of output you want to end up with -- which makes it
difficult for me to know whether anything I can suggest will give
you what you're looking for.

My general take, however, is that you should use a simplified
bibilography entry such as 

   @Misc{qrp3,
     author =       {Christopher Rohrs},
     title =        {Query Routing for the Gnutella Network},
     url = {http://www.limewire.com/developer/query_routing/keyword%20routing.htm},
     month =        jan,
     year =         2002
   }

along with a bibliography style that knows about url fields, such
as plainnat, harvard, or one that you create yourself with
custom-bib.  With plainnat, using this bib entry generates

\bibitem[Rohrs(2002)]{qrp3}
Christopher Rohrs.
\newblock Query routing for the gnutella network, January 2002.
\newblock URL
  \url{http://www.limewire.com/developer/query_routing/keyword%20routing.htm}.

The trick with your URL is that you have to load the url or
hyperref package in the preamble of your document.  If you haven't
already defined the \url command with a robust version that can
handle underscores, percent signs, and some other things that can
throw LaTeX, the plainnat bibliography style file inserts a
definition for a much less capable \url command that will generate
errors with URLs containing percent signs.

If you load the hyperref package, you'll end up with an output
file that includes the URL and a link (as a separate string or as
part of the URL, depending on the driver).


    A> These are good things to know, but it looks like the
    A> problem occurs without hyperref and with any bst file. :-(

Not necessarily with any bst file.

    A> (Input that breaks in one bst file may work fine in
    A> another, but for any given bst file there is some input
    A> that will work incorrectly)

If you insist on including code to create the link in your
bibliography file, that's true.  But if you go with the method I
suggested, you'll have a clean, portable bibliography database
that will work with any bibliography style -- if your bibliography
style doesn't know about the url field, it will be ignored; if it
does know about the url field, it will do useful things with it,
ranging from typesetting it properly to providing a functional
link.

(All of the above aside, the folks with the space in their URL
should really replace it with an underscore.)

   CMC

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Man cannot be civilised, or be kept civilised by what he does in his
	    spare time; only by what he does as his work.
			     W.R. Lethaby
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  C.M. Connelly               cmc@debian.org                   SHC, DS
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+


-- 
To UNSUBSCRIBE, email to debian-tetex-maint-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: