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 apj.bst together with style \citestyle{apj} and with the \usepackage{natbib}.

I have made few changing on this style, so that my bibliography appears like this: for example

Beth, T. and Gollmann, D. 1989. Algorithm Engineering for Public Key Algorithm. IEEE Journal on selected areas in communications 7 (4): 458-465.

My question is: how can put parentheses around the year to be appear like this:

Beth, T. and Gollmann, D. (1989). Algorithm Engineering for Public Key Algorithm. IEEE Journal on selected areas in communications 7 (4): 458-465.

Is there anyone who can help me?

share|improve this question
    
Code can be marked by enclosing it in backticks :` –  Seamus Jul 18 '11 at 14:52
add comment

1 Answer

up vote 2 down vote accepted

copy the apj.bat to myapj.bst and then replace the function format.date with

FUNCTION {format.date}
{  year duplicate$ empty$
    { "empty year in " cite$ * "; set to ????" * warning$
       pop$ "????" }
    'skip$ 
  if$
  " (" swap$ * * ")" *
  extra.label *
  before.all 'output.state :=
  after.sentence 'output.state :=
}

put the myapj,bst for testing in your documents directory and use

\bibliographystyle{myapj}

share|improve this answer
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.