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.


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

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.


    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: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: