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

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



On Fri, May 10, 2002 at 02:43:57PM -0700, C.M. Connelly wrote:
> tags 146438 moreinfo
> thanks
> 
> I need some more information to narrow your problem down.
> 
> At the least, I need a minimal TeX document that tells me what
> packages you're using, what bibilography style files you're using,
> and so on.  It would also be useful to know whether you're using
> latex, pdflatex, hypertex, or whatever to generate your output
> files.
> 
> With the information I currently have, some possible causes for
> the problem include

>   1. User error.  There's probably a better way of specifying
>      these bib entries that doesn't involve adding arbitrary
>      commands to fields.  Also, the \url command doesn't require
>      any of the escapes you're using (on the underscores and on
>      the %s -- try it!).

I did try this, but it doesn't seem to work.  If there's an unescaped
percent sign in the URL, LaTeX dies with "Paragraph ended before
\htmladdnormallink was complete.".  You're right about being able to
change the \_ to _, though; I just recently discovered the url
package, so I'm still learning these things ;)

Here's a minimal LaTeX document:
--------------------- main.tex -----------------------------------------
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{acm}
\bibliography{main}
\end{document}
------------------------------------------------------------------------

and here's a more minimal bibtex file:
--------------------- main.bib -----------------------------------------
  howpublished = {fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\%ggggggggggggg},
}
------------------------------------------------------------------------

the .bbl I see from this is:
--------------------- main.bbl -----------------------------------------
\begin{thebibliography}{1}

\bibitem{qrp}
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\%
%ggggggggggggg.

\end{thebibliography}
------------------------------------------------------------------------

In the final dvi output, none of the g's appear.

Obviously, this is very contrived, but my initial example was quite
real :>

I'm using regular latex to generate my output.

(In my original bug report, I was using a different bibliography style
(IEEE) not included in the standard distribution, but I was able to
reproduce the problem easily enough with the acm style, which I
figured would be easier.)

>   2. Old hyperref.  At the moment, the version of hyperref
>      included with Debian is an older version that doesn't deal
>      very well with % signs in entries.  A newer version
>      (available from CTAN) might.

>   3. Choice of bst file.  Some bst files support a url field which
>      doesn't require you to use the \url command at all.  See, for
>      example, <http://ads.harvard.edu/pubs/bibtex/>.  Using
>      pdflatex, a version of your bib entry with a url field
>      containing only the URL (with no escapes), and the
>      astroads.bst file linked to from this page, I was able to get
>      the file to TeX and produce a PDF file with a ``LINK'' field
>      that links to the URL you're citing.
> 
>      That page also mentions plainnat.bst (included with natbib,
>      and present in Debian).  Using plainnat as the bibliography
>      style, and ``\usepackage[pdftex]{hyperref}'' in the preamble
>      of a sample document citing a cleaned-up bib entry, I was
>      able to produce a PDF file with pdflatex that includes a
>      working link.

These are good things to know, but it looks like the problem occurs
without hyperref and with any bst file. :-( (Input that breaks in one
bst file may work fine in another, but for any given bst file there is
some input that will work incorrectly)

Let me know if I can be of any further assistance.

-- Agthorr


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



Reply to: