5

I have a document that is using natbib via the following usepackage command:

\usepackage[numbers,square,comma,sort&compress]{natbib}

When I cite multiple papers using the citep command, I get spaces between each of the numbers. For example, the following citation:

\cite{aldrich05,gudmundson01}

Gives me the following in-text output:

[5, 12]

However, I would like it to read:

[5,12]

Is there a way to accomplish this?

5

Try the following in your preamble:

\makeatletter
\def\NAT@def@citea{\def\@citea{\NAT@separator}}
\makeatother
4
\makeatletter
\def\NAT@spacechar{}
\makeatother
  • 2
    This actually works but has the side effect of making the citet command look funny. – Raffi Khatchadourian Jan 24 '11 at 18:26
  • Great!, this deletes the space between the author and year in author-year style which I needed :) . – Mohamed Vall Feb 28 '16 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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