In light of this and this AND if I'd want to use pdflatex
instead of biblatex
, how do I get rid of doi, ISSN links from my bibliography?
I can write a script such as here but that leaves a ,
hanging in each of the entries?
Any comments?
Edit:
I received very nice input from
Mico
but I was not able to apply his recommendations (I will do it and post
the result here).Meawhile, here is one not very elegant solution I devised:
I rid my .bib file off all url, doi, issn text like this:
cat mybibfile.ib | sed -e '/url /d' > mybibfile2.bib
Then I opened my new .bib file viz, mybibfile2.bib in gedit and
replaced all,\n}
with}
which ensured that I didn't have a
hanging comma(,) in my file.
Best Answer
One way to make BibTeX ignore fields such as
doi
andissn
is to set the BibTeX functions that format these fields to a "dummy" instruction that does nothing at all. These functions (and all other BibTeX functions) are contained in the bibliography style file that's in use. Since you indicate that you use theunsrtnat
bibliography style, you could proceed as follows:Find the file
unsrtnat.bst
on your TeX system and copy it to, say,unsrtnatDNA.bst
. (Never edit the original style files.)Open the file
unsrtnatDNA.bst
in your favorite text editor. Search for the functions{format.issn}
and{format.doi}
. (The headers of these functions are on lines 278 and 292 in my version of the fileunsrtnat.bst
.) Replace their definitions -- the stuff below the respective header lines that's enclosed by a pair of curly braces -- with a "dummy" definition, viz.,{ }
. For instance, you should change the definition offormat.issn
fromto
Save and close the file.
Depending on your TeX distribution, you may have to update the filename database that TeX uses to find all relevant files. For instance, if you use TeXLive, the command that updates the filename database is called
texhash
.From now one, use the command
\bibliographystyle{unsrtnatDNA}
in your tex files to instruct BibTeX to use your modified bibliography style file.