# How to produce the parenthetical citation "(AuthorA, 1999, 5; AuthorB, 2001, 21)" in Natbib

I am working on an article using the elsarticle-harv template, which uses Natbib as a backend. I can cite multiple sources using

Here is a citation \cite[][]{keyA, keyB}.


which produces the text

Here is a citation (AuthorA, 1999; AuthorB, 2001).

And I can cite a single source at a specific page or chapter using

Here is a citation \cite[][5]{keyA}.


which produces the text

Here is a citation (AuthorA, 1999, 5).

How can I obtain both at the same time? I would like to produce the following text:

Here is a citation (AuthorA, 1999, 5; AuthorB, 2001, 21).

Needless to say,

Here is a citation \cite[][5]{keyA}[][21]{keyB}.


does not work.

natbib's \citealp macro is your friend.

\documentclass[authoryear]{elsarticle} % 'natbib' is loaded automatically
\begin{filecontents}[overwrite]{mybib.bib}
@misc{a1, author = "AuthorA", title = "Who?", year = 1999 }
@misc{a2, author = "AuthorB", title = "Why?", year = 2001 }
\end{filecontents}

\bibliographystyle{elsarticle-harv}

\begin{document}
\noindent
(\citealp[5]{a1}; \citealp[21]{a2})
\bibliography{mybib}
\end{document}