The question refers to the topic: Disabling URLs in bibliography

Could you think of a solution, which allows to have the URL in bibliography entry or not depending on the entry type. I. e. remove the URL from the bibliography for article-type entries, but keep it for manual- or techreport-type entries?

  • Just for the practical side, I found it useful to not to keep URL address in the .bib file since DOI is exactly for that and technical reports etc. don't have one.
    – percusse
    Commented Feb 20, 2012 at 18:49

1 Answer 1


To disable the printing of URLs for certain entry types -- say, article and book -- while using the IEEEtran bibliography style, just do the following:

  • Locate the file IEEEtran.bst in your TeX distribution. On mine, the file is at TEXMFDIST\bibtex\bst\IEEEtran\IEEEtran.bst. Copy this file to, say, myIEEEtran.bst. Open the file myIEEEtran.bst in an ASCII editor.

  • Search for the line that contains FUNCTION {article}. (In my version of the file, it's at line 1964.) About a dozen lines further down from that line, there should be a line that contains

    format.url output

    Delete this line.

  • Repeat the preceding step for all other entry types, e.g., for the entry type book (which follows directly after article in this .bst file) for which you also want BibTeX to ignore any URL-related information.

  • Save the .bst file, run texhash (or the equivalent command for your TeX distribution), if necessary, to update the filename database, and specify \bibliographystyle{myIEEEtran} from now on.

Note that this approach does not require you to mess with the contents of your .bib file(s). All it does is to instruct BibTeX to ignore the url field, if available, for entries of type article and book. If, in the future, you need to use a different bibliography style -- say, the original IEEEtran bibliography style! -- just change the argument of the \bibliographystyle command.

Addendum: apacite:

If you want to remove URLs from bibliographies processed with the apacite bibliography style, comment out or remove the following directive from apacite.sty (and rename the file suitably):

  % url empty$
  %   'skip$
  %   { % Clear the stack
  %     duplicate$ empty$
  %       'skip$
  %       { output.new.block }
  %     if$
  %     format.url
  %   }
  % if$
  • 1
    Thanks very much for this answer - works perfectly! (I just copied the IEEEtran.bst file to the directory of the TeX-Source-Code, so that I am able to compile the TeX-code on any other system without having to write in the program-files-section of the respective machine. This also makes running texhash unnecessary.)
    – Neb
    Commented Feb 23, 2012 at 9:37
  • 1
    Nice answer. Here is a bash command which just removes all the URL entries and creates a new IEEEtranWoUrl.bst: cat IEEEtran.bs | grep -ve '^\ *format\.url\ output$' > IEEEtranWoUrl.bst
    – Tik0
    Commented Aug 8, 2018 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .