5

My .bib files are generated by Mendley desktop and usually contain URLs, ISSN and DOIs. I'm using the \usepackage[round]{natbib} package and \bibliographystyle{plainnat}.

I realize I'm not the first user to ask about this (question 1; question2)--although to be fair this user is asking about a different style than the one I'm using. And like this user, I don't want DOI, URL, ISSN to be displayed in my bibliography. How can I get rid of them?

Joseph Wright suggests using doi=false etc. But I'm unclear how this would be coded. I tried adding doi=false as follows: \bibliographystyle{natbib, doi=false} but this didn't work.

EDIT: Changes for clarity.

  • 1
    The link you give is about biblatex: for natbib it will depend on which style you are using. What does your \bibliographystyle line say? – Joseph Wright Aug 26 '15 at 19:49
  • 1
    natbib is a package for citation management and bibliography formatting. However, there is no bibliography style called natbib. Moreover, there is no option called rounded to pass to the natbib package -- did you mean to write round instead? Please edit your posting to clarify your setup. – Mico Aug 26 '15 at 20:42
  • Made some changes above. I'm using the style plainnat. – AllanM Aug 26 '15 at 20:59
  • 1
    Please create a minimal working example (wath that is is shown in your linked question2). Add to your question two bib entrys. You can use package filecontents to include the bib entrys to your MWE. – Kurt Aug 26 '15 at 21:10
  • Kurt, I'm sorry. I don't understand what you're asking me to do. Please clarify and I'm happy to do so. – AllanM Aug 26 '15 at 21:12
4

Recommended solution

There's no really simple way to do this elegantly using natbib, since the .bst files that format the bibliography entries either produce the fields or not. There's no way to selectively turn them on or off. For this reason, I would recommend that instead of using natbib you use biblatex to manage your bibliography, since this will allow you to have direct control over whether to produce them or not.

See

and then the solution in the question that Joseph linked to:

will work.

One minor problem with this solution however, is that there are no biblatex styles that mimic plainnat exactly, mainly because most Author-Year systems put the year right after the author, and not right at the end like plainnat does. If you have any flexibility in choosing a style, you can choose one of the standard biblatex authoryear styles, the apa style, or the biblatex-chicago package with the authordate style. Here's a minimal example using the APA style:

% !BIB TS-program = biber
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{AD.Smith2001,
  author    = {Arthur D. Smith},
  title     = {A simple model of LaTeX References.},
  journal   = {Journal of LaTeX},
  year      = {2001},
  volume    = {100},
  pages     = {1--10},
  number    = {3},
  keywords  = {LaTeX models; biology},
  doi       = {10.1115/1.1372322},
  publisher = {Cambridge},
  url       = {http://link.aip.org/link/?PBY/321},
}
\end{filecontents*}

\documentclass[a4paper,12pt]{article}

\usepackage[american]{babel} 
\usepackage{csquotes} 
\usepackage[style=apa,
            backend=biber,
            natbib=true, % use this to use natbib cite commands
            url=false,
            doi=false]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}  

\begin{document}
\citet{AD.Smith2001}.

\printbibliography
\end{document} 

output of code

Non-recommended (but will work) solution

It's not that difficult to modify a .bst file to not print any of these fields. The .bst file plainnat has functions that look like this (one for URL, one for ISSN, one for DOI etc.)

FUNCTION {format.isbn}
{ isbn empty$
    { "" }
    { new.block "ISBN " isbn * }
  if$
}

We can replace each one of these with a function like this:

FUNCTION {format.isbn}
{ "" }

And this will simply cause any of these fields not to be printed. Make a copy of plainnat.bst, give it a new name, (I've called it plainnat-noURL, and save it in the same folder as your .tex document. Then edit the file and for each of functions, replace that function with one like the one above.

With this minimal example we get the output we want.

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{AD.Smith2001,
  author    = {Arthur D. Smith},
  title     = {A simple model of LaTeX References.},
  journal   = {Journal of LaTeX},
  year      = {2001},
  volume    = {100},
  pages     = {1--10},
  number    = {3},
  keywords  = {LaTeX models; biology},
  doi       = {10.1115/1.1372322},
  publisher = {Cambridge},
  url       = {http://link.aip.org/link/?PBY/321},
}
\end{filecontents*}


\documentclass[a4paper,12pt]{article}


\usepackage[round]{natbib}


\begin{document}
\cite{AD.Smith2001}.

\bibliographystyle{plainnat-noURL}
\bibliography{\jobname}   % using the bib file created with filecontents
\end{document} 

output of code

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.