I am working on a article using IEEEtrans template in overleaf, but I just noticed that a technical report reference with a URL doesn't compile correctly:
%Smith2040
@electronic{Smith2040,
author = "Smith, Matthew Nitch",
title = "The number of cars worldwide is set to double by 2040",
url = "\url{https://www.weforum.org/agenda/2016/04/the-number-of-cars-worldwide-is-set-to-double-by-2040}"
}
I get the aforementioned problem when using \usepackage{url}
.
But, when using \usepackage{hyperref}
I get fatal error.
Best Answer
When using the
IEEEtran
bibliography style and the hyperref package, it's a mistake to encase the contents of theurl
field in a\url{...}
wrapper. You should just writeIncidentally, I think it would be a really good idea for you to backfill the
year
andorganization
fields of this entry.The following example loads the
xurl
package, rather than theurl
package. The only difference is that the former allows linebreaks inside a formatted URL string at any letter.