[OS X TeX] MacOSX-TeX: Problem with BibTex

Bruno Voisin bvoisin at mac.com
Thu Apr 29 03:59:17 EDT 2004


Le 29 avr. 04, à 08:43, Samuel Lelievre a écrit :

>> bibtex and latex don't like URLs because of the special characters in 
>> them
>> i.e. "_" which you need to edit to the latex compatible version, i.e. 
>> "\_".
>
> I don't use bibtex but when I include urls I use verbatim as in
>   \verb+http://my_url.etc/+
>
> There are probably smarter ways but that fits my needs.

In LaTeX you can use the package url that defines a command \url such 
that

	\url{http://myurl.etc/}

typesets the argument in monospace font, makes it an hyperlink (in 
Adobe Reader, or Panther's Preview), and allows hyphenation at sensible 
points. Characters such as ~ or _ do not have to be escaped, too. See 
/Library/teTeX/share/texmf.tetex/tex/latex/misc/url.sty (the doc lives 
in this file, in the form of comments).

You can also use the package hyperref, which loads the package url and 
adds many goodies such as

	\href{http://my_url.etc/}{My URL}

which typesets the second argument in the current font and makes it an 
hyperlink to the first argument. By default the text appears boxed in 
Adobe Reader and normal in Preview; by setting an option colorlinks, 
you can make the text colored instead, which shows up in both Reader 
and Preview. See 
/Library/teTeX/share/texmf.tetex/doc/latex/hyperref/manual.pdf.

The only problem with hyperref is that it redefines many standard LaTeX 
commands such as \section etc, to make them behave as hyperlinks, but 
making also in the process the code for these commands practically 
undecipherable. Then, if you are used to modifying these commands 
yourself, as discussed in the LaTeX Companion, to customize the 
presentation of section headings for example, things can get *really* 
challenging...

That doesn't answer in any case your original question regarding URLs 
in BibTeX. I can't say anything about it, as I don't use BibTeX.

Hope this helps though,

Bruno Voisin
-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list