6

In an ideal situation using natbib and abbrvnat, citations e.g. \citet{Jones2004} and '\citep{Jones2004}' would have given Jones et al. (2004) and (Jones et al., 2004) respectively.

Unfortunately I don't get that, instead I get

\citep{Jones2004} gives me ===> '(Jones, Giannini and Chang, 2004)'

Previously, @egreg, @lockstep: I followed your last idea by removing numbers from

\usepackage[square,numbers,round,comma,sort&compress,longnamesfirst]{natbib},

and citations are picked quite well, except that '\citep{}' in the text doesn't work but if I try it on plain part of a page, it works. An example as below.

However, if I remove longnamefirst, it works but then I lose the style of having longnamefirst in the Bibliography content. Nevertheless, I've got another bibliographystyle that I tweaked but it would be useful if others could know this effect and may be the solution.

\documentclass[a4paper, 11pt, twoside]{article} \usepackage[round,authoryear,semicolon,sort&compress,longnamefirst]{natbib} \usepackage{hyperref} \usepackage{filecontents}`

\begin{filecontents}{\jobname.bib}

@misc{A01,

author = {Jones, A. and James, C., and Giannini, J.},

year = {2001},

title = {Title of journal article},

}

\end{filecontents}

\begin{document}

Space is such an alien environment that attempting to work \citep{A01} in it requires new techniques and knowledge.\

\citep{A01}\\

\bibliographystyle{plainnat}

\bibliography{\jobname}

\end{document}

4
  • 2
    Please add a minimal example that illustrates your problem. Apr 9, 2011 at 16:57
  • Haven't you asked this question already? Citet and citep not working with hyperlink. If your question has changed, it's better to edit the question, than ask a new one.
    – Alan Munn
    Apr 9, 2011 at 18:21
  • @lockstep: Your example worked fine, but still wondered why not in thesis. @egreg, @lockstep: I followed your last idea by removing numbers from \usepackage[square,numbers,round,comma,sort&compress,longnamesfirst]{natbib}, and everything worked fine! Great idea!!!
    – BrettHarry
    Apr 9, 2011 at 19:56
  • Its surprising why I still get this problem....'\citep' still gives citation as '\citep', despite removing 'Numbers' from the '\usepackage[...,numbers,...]{natbib}'. In fact, it fluctuates...some times it works well, sometimes it doesn't. I tried compiling more than 2 times but to no avail. Any idea? Cheers
    – BrettHarry
    Apr 17, 2011 at 20:24

2 Answers 2

4

This minimal example works for me.

\documentclass{article}

\usepackage{natbib}

\usepackage{hyperref}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\begin{document}

\citet{A01}

\citep{A01}

\bibliographystyle{abbrvnat}
\bibliography{\jobname}

\end{document}

(The filecontents environment is only used to include some external files directly into the example, so that it compiles. It is not necessary for the solution.)

8
  • 2
    I get the OP's behavior if I load natbib with the numbers option, with which \citep behaves exactly as \cite as per natbib's documentation (bottom of page 4).
    – egreg
    Apr 9, 2011 at 18:13
  • @egreg: Good catch -- maybe the OP didn't mention the numbers option, or the documentclass he uses activates it. You should post your comment as an answer.
    – lockstep
    Apr 9, 2011 at 18:18
  • @BrettHarry: The answer to your question is: "Remove the numbers option."
    – lockstep
    Apr 9, 2011 at 19:21
  • @lockstep @ egreg : Problem again. I realised that removing 'Numbers' from 'Usepackage' worked but only for some paragraphs. When I '\citep{21}' at a plain page, it works, but not in paragraphs. Any idea why this mix up occur? I recompiled more than twice but to no avail.
    – BrettHarry
    Apr 17, 2011 at 22:00
  • @BrettHarry: Please update your original question and include a minimal working example (i.e. one that compiles and shows the problem).
    – lockstep
    Apr 18, 2011 at 6:10
8

When natbib is loaded with the numbers option, i.e.,

\usepackage[...,numbers,...]{natbib}

the command \citep behaves like the usual \cite, while \citet prints "Author name(s) [x]", where "x" is the numeric reference. In this case only the number is made a link to the bibliography. On the contrary, with the default author-year citation system, all the "Author name(s) (year)" given by \citet and "(Author name(s), year)" given by \citep become a link to the bibliography.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .