[Tex/LaTex] References are printed with spaces between them


Is it possible to better format this so that I can remove the huge spaces between words?

Code used:


Code in .bib library:

author = {Greicius, Tony},
booktitle = {NASA},
file = {:Users/user/Library/Application Support/Zotero/Profiles/zotero/storage/index.html:html},
howpublished = {http://www.nasa.gov/mission\_pages/msl/index.html},
title = {{\{NASA\} - Mars Science Laboratory}},
url = {http://www.nasa.gov/mission\_pages/msl/index.html}

enter image description here

Is this due to 'justify' style of the document ? Maybe I can prevent justifying the bibliography ? My document starts like this :



I can confirm that it's due to 'justify' .. I added \raggedright just before the bibliography and the text flushes to the left now.

However I would like to keep it justified but without the spacing … Editing the margins is not efficient, anyone got an idea how to achieve this ?

Best Answer

The problem is that the field "howpublished" is not being recognised as a URL, so any of the methods that people have given to break the URL are not working. Load the url package and change your .bib item appropriately so that the \url is encoded in the .bib file as such:

    Author = {Greicius, Tony},
    Booktitle = {NASA},
    Howpublished = {\url{http://www.nasa.gov/mission\_pages/msl/index.html}},
    Title = {{\{NASA\} - Mars Science Laboratory}},
    Url = {http://www.nasa.gov/mission\_pages/msl/index.html},

Minimal document:


output of code

Related Question