[texhax] combnat package: extra space in author-year textual citation

Tom Sutch tom at oketchup.co.uk
Sat Aug 1 18:58:17 CEST 2009

On Wed, 15 Jul 2009 22:43:30 +0100
Tom Sutch <tom at oketchup.co.uk> wrote:

> I am preparing conference proceedings using the combine package, and
> using the combnat package (which is the combine-compatible version of
> natbib) for the bibliographic referencing. It is working really well
> on the whole, but I have a small issue with an unwanted extra space
> being inserted after the year when I use \citet.
> So while \citep{foo1962} gives "(Foo and Bar, 1962)" as desired,
> \citet gives "Foo and Bar (1962 )".

An update on this.  I have hacked around with combnat.sty in a
brute-force manner and found that if I comment out line 341 it works,
although not for the case where there's more than one citation in the
brackets (fortunately I don't have too many of these so I can
manually rewrite them). It doesn't look like combnat.sty has been
changed for a while, so I would imagine people have the same version,
but just in case the context of 341 is:

339	       \if\relax\NAT at date\relax\def\@citea{\NAT at sep\ }%
340	       \else
341	         \def\@citea{\NAT@@close\NAT at sep\ }
342	       \fi

I doubt the cause of this problem is this line itself - I would
guess it's something to do with the general treatment of multiple
citations, which need separation and a space between years, not being
modified properly for the case of single citations.  I tried comparing
with the equivalent code in natbib.sty but nothing jumped out.

This is only an ugly hack, rather than a solution, of course, but it is
sufficient for my purposes now and I hope that this (a) helps someone
cleverer than me to find where the problem is, or (b) helps someone who
comes across this problem in future to get round it.

More information about the texhax mailing list