TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 Feb 20 '12 at 18:49

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$
share|improve this answer
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 Feb 23 '12 at 9:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.