0

How can I change the citation style of biblatex mid-document?

I'm using biblatex apa style in combination with authoryear citestyle in Overleaf like this:

\usepackage[style=apa,citestyle=authoryear,maxcitenames=2,mincitenames=1]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

I use different citation methods like textcite and parencite and the results look like this:

According to Howell (2013), the advantages ...

... knee-joint (Shelton, 2014) or ...

This is exactly what I want, however, for a classification in a table I would like to be able to cite by number as well, just like this:

[1]

This means that the apa style bibliography would need numbering and I would like to be able to switch between citation styles. Maybe define a new citation method, so that I can do something like this:

\numbercite{Howell2013}

Is this possible? I appreciate any help. If I need another style in order to achieve the numbering that's fine. Thanks in advance.

3
  • 1
    Not directly related to your question, but APA style is already an author-year style, so its citations are author-year as well. Unless you have a specific reason to load the style as style=apa,citestyle=authoryear, I suggest you drop the citestyle=authoryear, and just load style=apa,. Since APA style is quite complex, so is biblatex-apa and it is not really supposed to be mixed with different citestyles. Things may break. If you need APA style, load only style=apa, and no further options. if you don't need APA style, it's usually best not to use style=apa, at all.
    – moewe
    Oct 7 '20 at 15:11
  • I second this. You may get errors in places you may not even understand, specially if you are working on a big project with a lot of subfiles.
    – Masum
    Oct 7 '20 at 15:33
  • Thanks for the suggestion. I included both style=apa and citestyle=authoryear, because the style might need to be changed to e.g. numeric and I want to keep the authoryear citation style.
    – Thomas
    Oct 7 '20 at 16:00
0

In general it is not possible to mix different citation styles. But very often it is possible to cook something up that almost lets you have different citation styles.

In this case you can steal quite a lot of code from numeric.bbx and numeric.cbx.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=apa, labelnumber]{biblatex}

\providebool{bbx:subentry}

% adapted from numeric.cbx
\DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}

\newbibmacro*{numcite}{%
  \printtext[bibhyperref]{%
    \printfield{labelprefix}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}

\DeclareCiteCommand{\numcite}[\mkbibbrackets]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{numcite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareMultiCiteCommand{\numcites}[\mkbibbrackets]{\numcite}{\multicitedelim}

% adapted from numeric.bbx
\DeclareBiblatexOption{global,type,entry}[boolean]{subentry}[true]{%
  \setbool{bbx:subentry}{#1}}

\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\addbibresource{biblatex-examples.bib}


\begin{document}
Lorem \autocite{sigfridsson}
ipsum \autocite{nussbaum}
dolor \autocite{geer}

\begin{tabular}{lr}
A & \numcite{sigfridsson}\\
B & \numcite{worman}
\end{tabular}

\printbibliography
\end{document}

Lorem (Sigfridsson & Ryde, 1998) ipsum (Nussbaum, 1978) dolor (Geer, 1985)//A [3]//B [4]

As you can see, conceptually this combination is a bit tricky. The numbering makes the author and year far less prominent. If your primary way of referencing is still APA's author-year style, you are going to have a lot of unnecessary and possibly distracting numbers in the bibliography that take away focus from what is important for your readers: author and year.

1
  • This solution works as expected, thank you. Only thing I added was the hyperref package.
    – Thomas
    Oct 9 '20 at 12:15

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.