[Tex/LaTex] Separator for citing multiple sources in BibTeX without natbib

apa-stylebibtex

I'm using apalike-letters bibliography style and when citing multiple sources a comma is used to separate them:

image

How can I modify this to use semicolon instead of comma? I've changed every comma to semicolon in the class file but it didn't help :/

Any ideas? Please note that I don't want to use natbib because I have very large document and natbib generates some strange errors while compiling…

You can find the whole project (with the style file in it) at http://piec.info/apalike-letters_test.zip [76 KB].

Best Answer

It's really quite easy; well, almost. Just remove

\usepackage{breakcites}

and substitute that line with

\makeatletter
\def\@citex[#1]#2{%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{;\penalty\@m\ }%
     \edef\@citeb{\expandafter\@firstofone\@citeb}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {\csname b@\@citeb\endcsname}}}{#1}}
\makeatother

It's just the same definition make by breakcites, but with a semicolon instead of a comma.

If this mysterious code scares you, use

\usepackage{breakcites}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@citex}{,}{;}{}{}
\makeatother

that does the same.

Related Question