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 used urlbst package to modify a .bst file for URL inclusion. All worked good, but if I want the url only for the webpages, how should i modify the .bst?

From what I read the response should be in this function:

FUNCTION {output.url}
{ url empty$
'skip$ 
{ new.block 
  format.url output
  format.lastchecked output
}
  if$
}

But i didn't managed to modify it. Can some one point me to the right modification?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Replace the definition of the function with the following

FUNCTION {output.url}
{
type$ "webpage" =
  {
    { url empty$
    'skip$ 
    { new.block 
      format.url output
      format.lastchecked output
    }
      if$
    }
  }
  { skip$ }
  if$
}

The code above puts the type of the current entry on the stack, and check whether the type is webpage, if the comparison is successful it executes the old procedure, otherwise it does nothing.

share|improve this answer
    
Works like a charm! Thank you very much! –  mihai niculita Sep 15 '12 at 14:49

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.