TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.