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}
1
  • 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
    Commented Mar 25, 2014 at 1:50

1 Answer 1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .