Take the 2-minute tour ×
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.

I am using the following BibTeX style for my bibliography.

   \bibliographystyle{IEEEtran}
   \bibliography{IEEEabrv,references,thesis}

This formats bibliography entries like this:

enter image description here

, including a hyperlink to the web if provided. For brevity, I don't want it to show the URLs. How can I deactivate them?

EDIT: Let me clarify - I want to save space by not showing the URL, although the BibTeX entry for the publication contains a URL.

share|improve this question
    
Do you want to deactivate the hyperlinks for all possible URLs in your document or just for those URLs appearing in your bibliography? –  Gonzalo Medina May 23 '12 at 17:52
1  
I want to remove the URLs from my Bibliography without editing the .bib file. –  clstaudt May 23 '12 at 18:01
    
I think the only way to do this would be editing the IEEEtrans.cls and make it somehow ignore the URL entries. Can you edit the .cls? –  Dan May 23 '12 at 18:48
2  
I've just goggled it a bit, and apparently you can do this by editing the .bst file. Check this out tug.org/pipermail/tex-live/2007-August/014582.html –  Dan May 23 '12 at 18:53
    
@Dan Yes, this works. Had you posted this as an answer, I could accept it now. ;) –  clstaudt May 23 '12 at 18:59
add comment

2 Answers

up vote 9 down vote accepted

If you don't want BibTeX to print out the URL field for a given entry even though a URL field is present, you need to edit the bibliography style file -- in the present case, the file IEEEtran.bst -- to disable this printing. Make a copy of the file IEEEtran.bst and call it, say, myIEEEtran.bst. Open the new file in a text editor and search for the function format.url. It should look like this:

FUNCTION {format.url}
{ url empty$
    { "" }
    { this.to.prev.status
      this.status.std
      cap.yes 'status.cap :=
      name.url.prefix " " *
      "\url{" * url * "}" *
      punct.no 'this.status.punct :=
      punct.period 'prev.status.punct :=
      space.normal 'this.status.space :=
      space.normal 'prev.status.space :=
      quote.no 'this.status.quote :=
    }
  if$
}

Replace this function with the following "dummy" function:

FUNCTION {format.url}
{ url empty$
    { "" }
    { "" }
  if$
}

In short, you're telling BibTeX not to print out any information contained in the URL field. Save the file, update the filename database if necessary (e.g., if using TeXLive, type texhash in a command window), and be sure to use the new bibliography style file from now on. Happy TeXing!

share|improve this answer
1  
This should be marked as the correct answer, as the author of this question recognised in my comment above (which is pretty much the same as this answer) tex.stackexchange.com/questions/57087/… –  Dan May 23 '12 at 19:32
add comment

\hypersetup{hidelinks=true} will make the links "hidden" (typeset without emphasis, but still clickable).

You can switch this on and off for parts of the text (using \hypersetup{hidelinks=false} appropriately), so you can hide only the bibliography links or all links in the document.

share|improve this answer
    
inserting this command gives me an error: Package kvsetkeys Error: Undefined key 'hidelinks'. –  clstaudt May 23 '12 at 18:04
    
It is also not a solution to my problem, because it removes the colored border/clickable link, not the URL. I hope have formulated the question more clearly now. –  clstaudt May 23 '12 at 18:11
add comment

Your Answer

 
discard

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.