13

I'm using an @misc bibtex entry to cite a government website in my thesis. The Bibliography compiles fine, but within the text the citation is included twice. for example text text (cite, cite).

Any ideas would be appreciated.

\documentclass{report}
\usepackage{natbib}

bibtex entry:

@misc{kinaSUR,
    author = {{Ministry for Primary Industries}},
    title = {{Kina sea urchin regions in NZ}},
    howpublished = {\url{http://fs.fish.govt.nz/Page.aspx?pk=7\&sc=SUR}},
    note = {Online; accessed 29 January 2014} 

The double brackets for author ensure it typesets correctly, otherwise it tries to make it a first and last name and comes out a jumbled mess. It might be the problem but its the only way I could get the author to typeset correctly.

Suggestions appreciated. Thanks

\documentclass{report}
\usepackage{natbib} 
\begin{document}
\bibliographystyle{otago} 
\bibliography{thesis}
\citep{kinaSUR}
\end{document}

bibtex entry is above

2 Answers2

14

For testing I downloaded the file otago.bst from this website: http://otago.libguides.com/content.php?pid=172484&sid=1451535

The issue is based on your entry type. The style otago and the resulting output require a field year. So if you modify your entry it works.

Correct BibTeX-Entry:

@misc{kinaSUR,
    author = "{Ministry for Primary Industries}",
    title = {{Kina sea urchin regions in NZ}},
    howpublished = {\url{http://fs.fish.govt.nz/Page.aspx?pk=7&sc=SUR}},
    note = {Online; accessed 29 January 2014} ,
    year=2013,
}

Here a complete MWE:

\RequirePackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{kinaSUR,
    author = "{Ministry for Primary Industries}",
    title = {{Kina sea urchin regions in NZ}},
    howpublished = {\url{http://fs.fish.govt.nz/Page.aspx?pk=7&sc=SUR}},
    note = {Online; accessed 29 January 2014} ,
    year=2013,
}
\end{filecontents}
\documentclass{report}
\usepackage{natbib}
\usepackage{url}

\begin{document}
\cite{kinaSUR}

\bibliographystyle{otago} 
\bibliography{\jobname}
\end{document}

enter image description here

Marco Daniel
  • 95,681
  • You were right, I didn't have a year field as I wanted a date accessed instead, however adding a year fixed the problem. Thanks for your help. – Jodi Pilbrow Feb 25 '14 at 10:53
0

I'd suggest using filecontents environment without filecontents package, because since the 2019 update this package is not needed anymore. Here's the updated MWE:

\documentclass{article}
\usepackage[style=numeric]{biblatex}

\begin{filecontents}{references.bib} @misc{kinaSUR, author = "{Ministry for Primary Industries}", title = {{Kina sea urchin regions in NZ}}, howpublished = {\url{http://fs.fish.govt.nz/Page.aspx?pk=7&sc=SUR}}, note = {Online; accessed 29 January 2014} , year=2013, } \end{filecontents} \addbibresource{references.bib}

\title{My article} \author{John Doe}

\begin{document} \maketitle \section{Introduction}

Here's the reference: \cite{kinaSUR}

\printbibliography \end{document}

finnan
  • 101