[Tex/LaTex] Apacite – Different citation output for multiple authors

apa-stylebibliographiesciting

I have a question that I haven't been able to solve, even though I got through the documentation , web pages and apacite.bst code (although I'm quite new with this stuff). The problem is as follows:

Using apacite citation style package, I'd like

\citeA{ref} argued that the value of ... 

to be rendered as

Borges and collaborators (2006) argued that the value of …

and at the same time, if the citation is not textual, the code

was proved \cite{ref}.

should be rendered as

was proved (Borges et al., 2006).

In summary, when a citation results in an "et al.", I would like it to have different outputs whether it is a text citation (and colaborators) or a normal citation (et al.).

Already tested renewcommand \BOthers but it affects both types of citation.

Can you help me?

Best Answer

In the definition of \BOthers, we may test wether we're inside a \citeA citation command or not and typeset the appropriate string. Looking into apacite.sty, the internal \@BAY macro (the "after year" string) is a good test candidate -- its definition is \BBCP in "citeA" citations, and empty otherwise. For convenience, I use the etoolbox package and its \ifdefstring macro to amend the definition of \BOthers.

\documentclass{article}

\usepackage{apacite}

\usepackage{etoolbox}

\makeatletter
\AtBeginDocument{%
  \renewcommand{\BOthers}[1]{%
    \ifdefstring{\@BAY}{\BBCP}{%
      and collaborators\hbox{}%
    }{%
      et al.\hbox{}%
    }%
  }%
}
\makeatother

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and B and C and D and E and F},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\begin{document}

\citeA{A01} argued~\dots

\dots\ was proved \cite{A01}.

\bibliographystyle{apacite}
\bibliography{\jobname}

\end{document}

enter image description here

Related Question