[pdftex] pdflatex problem with bibtex URL entries using underscore

Nelson H. F. Beebe beebe at math.utah.edu
Tue Mar 12 10:56:03 CET 2002


Anand Bedekar <anandbedekar at yahoo.com> writes on Tue, 12 Mar 2002
10:10:15 -0700 (MST):

>> Problem with bibtex 'URL' field entries having an underscore '_' in them...

One quick fix at your end that requires NO software updates whatsoever
is to recall that URL syntax permits any character to be represented
as a 3-character uppercase hexadecimal sequence %XX.  Since underscore
is hexadecimal 5F, you can represent it as %5F in each URL.

>From RFC 1738, available at

	ftp://ftp.internic.net/rfc/rfc1738.txt
	ftp://ftp.math.utah.edu/pub/rfc/rfc1738.txt

>> ...
>>    In addition, octets may be encoded by a character triplet consisting
>>    of the character "%" followed by the two hexadecimal digits (from
>>    "0123456789ABCDEF") which forming the hexadecimal value of the octet.
>>    (The characters "abcdef" may also be used in hexadecimal encodings.)
>> 
>>    Octets must be encoded if they have no corresponding graphic
>>    character within the US-ASCII coded character set, if the use of the
>>    corresponding character is unsafe, or if the corresponding character
>>    is reserved for some other interpretation within the particular URL
>>    scheme.
>> ...

However, we need to determine how TeX sees your URLs.  

I use URL fields extensively in the BibTeX archives at

	ftp://ftp.math.utah.edu/pub/bibnet
	ftp://ftp.math.utah.edu/pub/tex/bib

I just counted 94,061 such fields, at least 12,800 of which have
embedded underscores.

The BibTeX styles used in my LaTeX wrapper files which are used to
typeset every bibliography before installation in the archives.  These
styles output URLs wrapped inside macros, like this one from
compj.bib:

...
\ifx \path       \undefined \input path.sty               \fi
...
\path|http://www3.oup.co.uk/computer_journal/hdb/Volume_17/Issue_02/tiff/192.tif|

The extended styles that provide this support

	is-abbrv.bst  is-alpha.bst  is-plain.bst  is-unsrt.bst

are available at 

	ftp://ftp.math.utah.edu/pub/tex/bibtex

and at CTAN hosts in the path

	tex-archive/biblio/bibtex/contrib

It is not too difficult to extend other bibliographic styles to handle
URL values, just tedious, especially since the 225+ style files in the
CTAN tree have to be modified (and, of course, tested :^)).  Thus,
I've only provided this kind of support in the above extensions of the
basic styles, plus occasionally in private styles for local book
projects.  However, you can certainly examine the is-*.bst files to
see what to do.



-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah                    Internet e-mail: beebe at math.utah.edu  -
- Department of Mathematics, 110 LCB        beebe at acm.org  beebe at computer.org -
- 155 S 1400 E RM 233                       beebe at ieee.org                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------



More information about the pdftex mailing list