3

Consider the MWE below. The resulting bibliography displays an annoying comma after the website name. Is there any way to fix it (but keep the unsrtnat style for all other types like articles)?

enter image description here

\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[square,numbers]{natbib}
\bibliographystyle{unsrtnat}
\usepackage[english]{babel}
\usepackage{url}
\begin{filecontents}{\jobname.bib}
@Other{some-web,
  Title                    = {A Website},
  url = {https://en.wikipedia.org/wiki/Main_Page},
 Note                     = {Last visited: 15.03.2014},
}
@Other{some-web2,
  Title                    = {Another Website},
  url = {https://en.wikipedia.org/wiki/Main_Page},
 Note                     = {Last visited: 15.03.2014},
}
\end{filecontents}

\begin{document}
\section{first section}
some content \cite{some-web,some-web2}
\newpage
\section{Bibliography}
\bibliography{\jobname}
\end{document}
  • The easy solution is to add an author=... field. Oddly, when I do this for one entry, the issue is solved for the other entry as well. – cslstr Mar 25 '14 at 1:50
3

The comma is before the year. (When you run bibtex on that file you get warnings about "empty year".)

The documentation for natbib seems to indicate (in "2.7 Authorless and Yearless References") that that should just be omitted then, but it seems like it doesn't work in all styles.

I would use Biblatex which handles missing fields very well (run biber instead of bibtex):

\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[style=numeric-comp]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[english]{babel}
\usepackage{url}
\begin{filecontents}{\jobname.bib}
@online{some-web,
  Title                    = {A Website},
  url = {https://en.wikipedia.org/wiki/Main_Page},
  urldate                     = {2014-03-15},
}
@online{some-web2,
  Title                    = {Another Website},
  url = {https://en.wikipedia.org/wiki/Main_Page},
  urldate                     = {2014-03-15},
}
\end{filecontents}

\begin{document}
\section{first section}
some content \cite{some-web,some-web2}
\newpage
\printbibliography[title=Bibliography]
\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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