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 Answers
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 natbib
s 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.
-
-
@AndréCytryn The default implementation of
\cite
only has the postnote, but for example thenatbib
implementation has both pre- and postnote. So if you're usingnatbib
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
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.,".
-
2Though—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
\citep
I assume you usenatbib
, thecite
package doesn't define that.