Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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).

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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