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 want my bibliography without URL fields. After modifying natbib here:

\newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}

to

\newcommand\harvardurl[1]{}

I noticed a blank line where the URL used to be. Modifying the .bib file is not an option.

share|improve this question
1  
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  egreg Jan 14 '12 at 15:23
    
It would be useful if you stated which bibliography style you employ. Is it one of the seven files -- agsm, apsr, dcu, jmr, jphysicsB, kluwer, and nederlands -- of the "harvard"-family of bibliography style files? Separately, do you load the harvard package in addition to natbib? –  Mico Jan 14 '12 at 17:08
    
I am a using gsm style file found here: civil.iitb.ac.in/tvm/2905-natBibUsage/natbibusage/… No harvard package included. –  cevel Jan 15 '12 at 13:29
add comment

1 Answer 1

up vote 9 down vote accepted

There are six styles provided by harvard which are compatible with natbib.

The command \harvardurl only format the style of the url. The output of the url is defined in the used bst file.

As an example of one of the six styles I use the file agsm.bst to demonstrate the behavior.

The file agsm.bst has the following code:

FUNCTION {write.url}
{ URL empty$
    { skip$ }
    { "\newline\harvardurl{" URL * "}" * write$ newline$ }
  if$
}

If the entry of the url is empty you will get no output. Otherwise you get the output:

\newline URL formated with \harvardurl \newline

To avoid the output of the url you must modify the bst file.

Please note: Never change the original bst file. Make a copy of the needed bst in your working directory and modify this new file.

share|improve this answer
    
Absolutely right. Just dropped the line and worked like a charm. Cheers –  cevel Jan 14 '12 at 15:58
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.