[Tex/LaTex] getting rid of DOI URL etc fields in aipnum4-1.bst

bibtexdoiurls

I tried the solution suggested by Mico suggested in Getting rid of DOI, ISSN links from bibliography

but no luck I get error messages like

You can't pop an empty literal stack for entry ebbesenNature1998
while executing---line 3454 of file aipnum4-1DNA.bst
You can't pop an empty literal stack for entry srituravanicNanolett2004
while executing---line 3454 of file aipnum4-1DNA.bst
You can't pop an empty literal stack for entry PrzybillaJOptA2006
while executing---line 3454 of file aipnum4-1DNA.bst

and so on
when I replace the format functions in the .bst file by dummy functions like he suggests.

Note also that I prefer for the moment not to use biblatex

Can anybody suggest a way of how to modify the .bst file to get the desired behaviour?

Best Answer

warning: not tested!

this answer is based on the file aipnum4-1.bst in tex live 2012, dated 2010-07-25.

there doesn't seem to be any explicit format.doi function, so it's a matter of figuring out what tag(s) to modify.

it may be as simple as removing the line doi from the list under ENTRY. (the documentation for this item isn't really clear in the manual -- texdoc btxhak.)

if this isn't enough, then change the lines

FUNCTION {add.doi}
{ }

to suppress its activation.

also, in FUNCTION {init.bib} there is a line init.bib.doi; removing that line might have a useful effect.