[Tex/LaTex] A comma separator for \citet and a semicolon separator for \citep simultaneously

natbibpunctuation

Is there an easy way to simultaneously have a comma separator for \citet and a semicolon separator for \citep? It is currently [comma]{natbib}, but (e.g., Black and White, 2006, Pink, 2006) looks ugly and so does by White and Black (2006); Pink(2006).

Best Answer

If I'm understanding what you want correctly, I think this should do it.

\usepackage{natbib}
\usepackage{etoolbox}

\makeatletter
\newcommand\bibstyle@comma{\bibpunct(),a,,}
\newcommand\bibstyle@semicolon{\bibpunct();a,,}
\makeatother

\pretocmd\citet{\citestyle{comma}}\relax\relax
\pretocmd\Citet{\citestyle{comma}}\relax\relax
\pretocmd\citep{\citestyle{semicolon}}\relax\relax
\pretocmd\Citep{\citestyle{semicolon}}\relax\relax

You could probably omit the \citestyle and just use \bibpunct directly.