Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am getting unwanted whitespace in references.

unwanted out put

I am using these packages for my bibliography

\usepackage[round, sort, numbers]{natbib}
\usepackage[numbib]{tocbibind}
\renewcommand{\bibname}{References}

These are my lines to create the bibliography

\bibliographystyle{plainnat}
\bibliography{references}

And my .bib entries are as follows

@booklet{NaveDP,
author = {Nave},
title = {Law of Dulong and Petit},
year = {2014},
howpublished = {url},
}

@booklet{NaveDB,
author = {Nave},
title = {Debye's Contribution to Specific Heat Theory},
year = {2014},
howpublished = {url},
}

@booklet{Brown,
author = {Robert G. Brown},
title = {First Law of Thermodynamics Summary},
year = {2004},
howpublished = {url},
}
share|improve this question
3  
It can't break the URLs correctly, try adding the package url? –  bombcar Apr 2 at 3:15
    
@bombcar The url entries in the .bib file are actual urls, I couldn't post links though. But what you are saying is just add \usepackage{url} to the preamble? –  Jasper Grond Apr 2 at 3:19

1 Answer 1

You need little help from the package url as mentioned by bombcar.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{mybib.bib}
  @booklet{NaveDP,
author = {Nave},
title = {{Law of Dulong and Petit}},        %% note extra pair of braces
year = {2014},
howpublished = {\url{http://hyperphysics.phy-astr.gsu.edu/hbase/thermo/dulong.html}},
}

@booklet{NaveDB,
author = {Nave},
title = {Debye's Contribution to Specific Heat Theory},
year = {2014},
howpublished = {\url{http://hyperphysics.phy-astr.gsu.edu/hbase/thermo/debye.html}},
}

@booklet{Brown,
author = {Robert G. Brown},
title = {First Law of Thermodynamics Summary},
year = {2004},
howpublished = {\url{http://phy.duke.edu/rgb/Class/phy51/phy51/node59.html}},
}
\end{filecontents*}
\usepackage[round, sort, numbers]{natbib}
\usepackage[numbib]{tocbibind}
\renewcommand{\bibname}{References}
\usepackage{url}
\begin{document}
  \nocite{*}
  \bibliographystyle{plainnat}
  \bibliography{mybib}
\end{document}

enter image description here

What I did:

I wrote the howpublished data field as

howpublished = {\url{http://hyperphysics.phy-astr.gsu.edu/hbase/thermo/dulong.html}},

using \url command after loading url package. This should be done for all urls.

To prevent bibtex from converting Dulong and Petit in to lower case, an extra pair of braces is used (thanks to Mico for picking it up).

{{Law of Dulong and Petit}}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.