20

When I reference some work, currently I get something like (Jimmy and Tan, 2003). I want an updated \citep where I can use (e.g., Jimmy and Tan, 2003). I should be able to call either the earlier reference such as, (Jimmy and Tan, 2003), or the updated citation (e.g., Jimmy and Tan, 2003) at will. How can I achieve that? Thanks.

  • 2
    As you mention \citep I assume you use natbib, the cite package doesn't define that. – Torbjørn T. Mar 19 '14 at 10:01
  • yes I am using that. The solution works. Thanks. – Sumit Mar 19 '14 at 10:15
  • Glad to hear it. Note that you can mark questions as solved by accepting the most helpful answer. This is done by clicking the checkmark next to the answer. – Torbjørn T. Mar 19 '14 at 10:18
32

You can add prenotes and postnotes to the site with the optional arguments:

\citep{dude}
\citep[p. 42]{dude}
\citep[e.g.][]{dude}

See page 7 in natbibs manual.

When using only one optional argument (one pair of []), that becomes a postnote, when using two the first one is a prenote, the second a postnote.

  • is there a way to do that using \cite only? – Andre Cytryn Jan 26 '17 at 5:56
  • @AndréCytryn The default implementation of \cite only has the postnote, but for example the natbib implementation has both pre- and postnote. So if you're using natbib you can do exactly as in my answer. If not, the answer will depend on the setup you're using, so please ask a new question and include a minimal example (see meta.tex.stackexchange.com/questions/4407/…) that shows how you're doing things. – Torbjørn T. Jan 26 '17 at 8:57
0

In addition to the answer by Torjørn T., given that the "e.g., Author, year" format is quite common, one can conveniently define a \citeg command (to be inserted before the \begin{document}) as

\newcommand{\citeg}[1]{\citep[e.g.,][]{#1}}

which automatically produces the prenote "e.g.,".

  • 1
    Though—just since it may not be obvious to a user who doesn’t know this method—this new command can only be used to add “e.g.” without a page reference. – ChristopherE Jun 5 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.