Computational Economics

computational tools for economists

BibTex URL entries using underscore

with 2 comments

Problem with bibtex ‘URL’ field entries having an underscore ‘_’ in them: When you run latex (after running bibtex), it complains about ‘Missing $’, apparently trying to treat the _ as a math-mode subscript.

Solution:

If you change the _ in the .bib file to \_ , then latex works fine by treating the \_ as \textunderscore in the .bbl file.

Advertisements

Written by Jingjing Wang

08/29/2011 at 8:30 pm

Posted in LyX

2 Responses

Subscribe to comments with RSS.

  1. There is a problem with this solution. If you use the package hyperref, \_ will break the link. If you change the “_” to “\textunderscore “, it will look funny in the .bib file, but the link will work.

    pahi

    04/03/2014 at 4:13 am

  2. For me, neither works. with \_ it can be compiled but the link is broken. With \textunderscore it says undefined control sequence. Besides, I read that if \usepackage{url} is included, you can use url = “\url{http://….}”. But it’s not working in my case, saying undefined.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this:
https://computationecon.wordpress.com/2011/08/29/bibtex-url-entries-using-underscore/
computationecon.wordpress.com
crawl=CC-MAIN-2018-05
43714
application/http; msgtype=response
sha1:Y75BYXDVW2TAJPYLW4GUR3D626F5V6WB
<urn:uuid:99004d91-d3cf-497e-94a6-b0f9fa2433a2>
2018-01-17T10:33:21Z
192.0.78.12
application/xhtml+xml
sha1:YTYEGL4OSCGASEQ5NHMCPYOXF4WOUP37
<urn:uuid:1228928e-ebbf-4489-b48c-6c17040b8ae0>
https://computationecon.wordpress.com/2011/08/29/bibtex-url-entries-using-underscore/
length
response
<urn:uuid:8508428c-9b2d-4d94-a79f-41c7d9d52023>
robots: classic
hostname: ip-10-149-106-217.ec2.internal
software: Nutch 1.6 (CC)
isPartOf: CC-MAIN-2018-05
operator: Common Crawl Admin
description: Wide crawl of the web for January 2018
publisher: Common Crawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf