37

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.

3
  • 2
    As you mention \citep I assume you use natbib, the cite package doesn't define that. Mar 19, 2014 at 10:01
  • yes I am using that. The solution works. Thanks.
    – Sumit
    Mar 19, 2014 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. Mar 19, 2014 at 10:18

2 Answers 2

59

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.

2
  • is there a way to do that using \cite only? Jan 26, 2017 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. Jan 26, 2017 at 8:57
4

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
  • 2
    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. Jun 5, 2019 at 10:53

You must log in to answer this question.

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