Omitting fields in Bibliography
One way to proceed is to create a modified version of the file plainnat.bst
, in which the functions that format and print fields such as doi
and isbn
are reduced to stubs that do nothing:
Find the file
plainnat.bst
in your TeX distribution. Make a copy of this file and call it, say,myplainnat.bst
. (Don't edit an original file of the TeX distribution directly.)Open
myplainnat.bst
in your favorite text editor, and search for the function calledformat.doi
. (In my copy of the file, it starts on line 292.)In this function, replace the line
{ new.block "\doi{" doi * "}" * }
with
{ "" }
In short, tell BibTeX to do nothing even if the field
doi
is non-empty. (You could go further and replace the function's entire body with{ " " }
. However, if you ever choose to undo some of these edits, it may be easier to do so if you leave behind for more than that absolute minimum code snippet.)Repeat this procedure, as needed, for the functions
format.url
,format.issn
, andformat.isbn
.Save the file
myplainnat.bst
, either in the directory where your main.tex
file is located or in a directory that's searched by BibTeX. If you choose the latter option, you'll probably need to update the filename database of your TeX distribution too.Start using the new bibliography style via
\bibliographystyle{myplainnat}
You should use biblatex with this in your preamble (remove \bibliographystyle{plainnat}
)
\usepackage[style=authoryear-comp,firstinits=true,citestyle=authoryear,natbib=true,backend=bibtex]{biblatex}
\renewcommand\nameyeardelim{, }
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\finalnamedelim}{\addcomma\space}
\setlength{\bibitemsep}{\baselineskip}
\renewbibmacro{in:}{}
Where this gives you the expected removal.
\AtEveryBibitem{%
\clearfield{issn} % Remove issn
\clearfield{doi} % Remove doi
\ifentrytype{online}{}{% Remove url except for @online
\clearfield{url}
}
}
This is based on http://codydunne.blogspot.se/2012/01/suppressing-bibtex-fields-for-specific.html