0

Community,

I've encountered an issue with the 'mincitenames' and 'maxcitenames' options in my LaTeX document while utilizing the 'biblatex' package with the 'apa' style. According to the documentation, these options should control the number of authors displayed in in-text citations, but they don't seem to take effect as expected.

\usepackage[backend=biber, style=apa, pagetracker, ibidtracker=constrict, apamaxprtauth=20, mincitenames=2, maxcitenames=2 ]{biblatex}

Here's the link to my github repo including my template for my academic works. Even at first cite, only 2 authors should be used in the in-text citation. "Et al." should be displayed for all the others.

For the second citation (ebd) should be used. But this is already implemented and working. Only the "et al." is not working, since mincitenames and maxcitenames options are being ignored.

Here's the MWE:

   \documentclass{article}[11pt, a4paper, oneside, ngerman]
\usepackage[ngerman]{babel} % neue deutsche Trennungsregeln, etc
\usepackage[utf8]{inputenc} % korrekte Darstellung von Umlauten

\usepackage[autostyle]{csquotes} \usepackage[backend=biber, style=apa, pagetracker, apamaxprtauth=20, ibidtracker=constrict]{biblatex}

% Remove Comma after second to last author and ampersand % https://tex.stackexchange.com/questions/670888/biblatex-apa-7-modification \makeatletter \renewcommand*{\apablx@ifrevnameappcomma}{@secondoftwo} \makeatother

\DefineBibliographyExtras{ngerman}{% \renewcommand*{\finalandcomma}{}% }

%% Verwendung von "ebenda (ebd.)", wenn eine Quelle hintereinander zitiert wird. %% Dies ist nicht im Standard von APA definiert und muss somit explizit aktiviert werden. %% https://tex.stackexchange.com/questions/449249/getting-ibid-for-apa-style-citations-from-biblatex

\makeatletter \providecommand*{\mkibid}[1]{#1}

\newbibmacro*{cite:ibid}{% \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}}

\renewbibmacro*{cite}{% \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldequals{fullhash}{\cbx@lasthash} % Multiple cites in one command {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}}% % Single cite {\ifthenelse{\ifnameundef{labelname}\OR\iffieldequalstr{entrytype}{patent}} % No author/editor {\usebibmacro{cite:noname}% \setunit{\printdelim{nameyeardelim}}% \usebibmacro{cite:plabelyear+extradate}% \savefield{fullhash}{\cbx@lasthash}} % Normal cite {\ifnameundef{shortauthor} {\printnames[labelname][-\value{listtotal}]{labelname}}% {\cbx@apa@ifnamesaved {\printnames{shortauthor}} {\printnames[labelname][-\value{listtotal}]{author}% \addspace\printnames[sabrackets]{shortauthor}}}% \setunit{\printdelim{nameyeardelim}}% \usebibmacro{cite:plabelyear+extradate}% \savefield{fullhash}{\cbx@lasthash}}}}% \setunit{\multicitedelim}}

\renewbibmacro*{textcite}{% \iffieldequals{fullhash}{\cbx@lasthash} % Compact cite - more than one thing for same author {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}} % New cite {% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% \setunit{\compcitedelim}% \ifthenelse{\ifnameundef{labelname}\OR\iffieldequalstr{entrytype}{patent}} % No author/editor or patent {\iffieldundef{shorthand}% % Cite using title {\usebibmacro{cite:noname}% \setunit{\ifbool{cbx:np}% {\printdelim{nameyeardelim}}% {\global\booltrue{cbx:parens}\addspace\bibopenparen}}% \usebibmacro{cite:plabelyear+extradate}} % Cite using shorthand {\usebibmacro{cite:shorthand}}} % Normal cite with author/editor % Normal full cite {\ifnameundef{shortauthor}% % Normal full cite {\printnames[labelname][-\value{listtotal}]{labelname}} % Cite using short author {\cbx@apa@ifnamesaved {\printnames{shortauthor}} {\printnames[labelname][-\value{listtotal}]{author}}}% % Year \setunit{\ifbool{cbx:np} {\printdelim{nameyeardelim}} {\global\booltrue{cbx:parens}\addspace\bibopenparen}}% % Put the shortauthor inside the year brackets if necessary \ifnameundef{shortauthor} {} {\cbx@apa@ifnamesaved {} {\printnames{shortauthor}\setunit{\printdelim{nameyeardelim}}}}% % Actual year printing \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\usebibmacro{cite:plabelyear+extradate}}% % Save name hash for checks later \savefield{fullhash}{\cbx@lasthash}}}} \makeatother

%% Bibliographie einbinden \addbibresource{biblatex-examples.bib} %% ++++++++++++++++++++++++++++++++++++++++++ %% Dokument %% ++++++++++++++++++++++++++++++++++++++++++ \begin{document}

here we have 5 authors, but only 2 should be displayed \parencite{herrmann}.'et al.' is missing here.

First citation should be normal \parencite[11]{sigfridsson}, second time with ibidem \parencite[95]{sigfridsson}, but after a second citation \parencite[282]{geer} it should appear as usual \parencite[2]{sigfridsson}.

\end{document}

karlh
  • 640
Markus
  • 15
  • 1
    Why do you employ the apa style if you don't want to adhere to the APA7 rules for truncating long author lists? These rules are widely acknowledged to be quite (and, IMNSHO, pointlessly) complicated. That said, if you can't stand the APA7 formatting rules, don't employ the apa (or, for that matter, the apa6) biblatex style. – Mico Dec 03 '23 at 16:49
  • Usually APA style will show the first author + "et al." for all works with three or more authors. You will get both authors for works by two authors and only one name for works of one author. (See for example https://apastyle.apa.org/style-grammar-guidelines/citations/basic-principles/author-date.) This is what style=apa, implements. There are a couple of complex exceptions for works with different lists of authors that would abbreviate to the same "first author + et al." (https://apastyle.apa.org/style-grammar-guidelines/citations/basic-principles/same-year-first-author). – moewe Dec 04 '23 at 06:52
  • So if I understand your question correctly, you should not have to change any max/mincitenames at all. Since style=apa, implements the complex APA guidelines and was not written with customisability in mind, it is, however, possible that some of the standard customisation options do not work as expected with style=apa,. In order to check out what exactly is wrong though, we need to see an example document that reproduces what you have at the moment: https://tex.meta.stackexchange.com/q/228/35864 – moewe Dec 04 '23 at 06:54
  • I just played around with a small example document and could get maxcitenames and mincitenames to affect the output even with style=apa,, so we need to know more about your setup, what you want and what you tried. – moewe Dec 04 '23 at 06:57
  • Thank you very much for your help so far. My university's citation guide follows APA7 style, but has some slight variations in certain places. One of them is the use of "et al" for in-text citations of three or more authors:

    "Three or more authors (last name author:in et al., year of publication, p. ??)"

    – Markus Dec 04 '23 at 14:31
  • here's my MWE: https://github.com/markushaug/mwe_apa_citations

    all the config is in "main.tex". see for the citation problem in section 2 "Hauptteil" (chapters/hauptteil.tex). I hope this helps. "main.tex" contains the citation config as of line 64.

    – Markus Dec 04 '23 at 14:45
  • "et al." for three or more authors is normal APA style, so I don't immediately see how this particular bit is a variation of APA style. I'm assuming your university guidelines are silent about the special cases that APA style considers (I linked one of them above), but in that case it is probably fair to assume you can follow APA style rather than some unwritten rule in your university guidelines. – moewe Dec 04 '23 at 20:59
  • Please don't link to off-site resources for the MWE. Reduce your code so much that it can be posted as a single document in a single code block in the question here. Avoid \includeing multiple files. Remove everything that is not strictly necessary to show the issue (you can most likely remove everything that is unrelated to citations and the bibliography). – moewe Dec 04 '23 at 21:01
  • got it. I've added the MWE above in the question. – Markus Dec 05 '23 at 09:10
  • Not the point of the question, but if you put the class options after the class name as in \documentclass{article}[11pt, a4paper, oneside, ngerman] the options are ignored. You probably want \documentclass[11pt, a4paper, oneside, ngerman]{article}. – moewe Dec 05 '23 at 20:43

1 Answers1

1

The code modifying cite and textcite is based on an older version of biblatex-apa (if I'm not mistaken it's based on a biblatex-apa version that implemented 6th-edition APA style). In a current version of biblatex-apa these macros look slightly different. If we adapt them to the current version, the macros respond to mincitenames/maxcitenames. (Are you absolutely sure you need two authors plus "et al."? That is pretty unusual. Usually you see one author plus "et al." - that's also what normal APA style wants.)

\documentclass[11pt, a4paper, oneside, ngerman]{article}
\usepackage[ngerman]{babel} % neue deutsche Trennungsregeln, etc
\usepackage[utf8]{inputenc} % korrekte Darstellung von Umlauten

\usepackage[autostyle]{csquotes} \usepackage[ backend=biber, style=apa, maxcitenames=2, mincitenames=2, apamaxprtauth=20, pagetracker, ibidtracker=constrict, ]{biblatex}

% Remove Comma after second to last author and ampersand % https://tex.stackexchange.com/questions/670888/biblatex-apa-7-modification \makeatletter \renewcommand*{\apablx@ifrevnameappcomma}{@secondoftwo} \makeatother

\DefineBibliographyExtras{ngerman}{% \renewcommand*{\finalandcomma}{}% }

%% Verwendung von "ebenda (ebd.)", wenn eine Quelle hintereinander zitiert wird. %% Dies ist nicht im Standard von APA definiert und muss somit explizit aktiviert werden. %% https://tex.stackexchange.com/questions/449249/getting-ibid-for-apa-style-citations-from-biblatex

\makeatletter \providecommand*{\mkibid}[1]{#1}

\newbibmacro*{cite:ibid}{% \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}}

\renewbibmacro*{cite}{% \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldequals{namehash}{\cbx@lasthash} % Multiple cites in one command {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}}% % Single cite {\ifnameundef{labelname} % No author/editor {\usebibmacro{cite:noname}% \setunit{\printdelim{nameyeardelim}}% \usebibmacro{cite:plabelyear+extradate}% \savefield{namehash}{\cbx@lasthash}} % Normal cite {\ifnameundef{shortauthor} {\printnames{labelname}}% {\cbx@apa@ifnamesaved {\printnames{shortauthor}} {\printnames[labelname]{author}% \addspace\printnames[sabrackets]{shortauthor}}}% \setunit{\printdelim{nameyeardelim}}% \usebibmacro{cite:plabelyear+extradate}% \savefield{namehash}{\cbx@lasthash}}}}% \setunit{\multicitedelim}}

\renewbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} % Compact cite - more than one thing for same author {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}} % New cite {\ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% \setunit{\textcitedelim}% \ifnameundef{labelname} % No author/editor {\iffieldundef{shorthand}% % Cite using title {\usebibmacro{cite:noname}% \setunit{\global\booltrue{cbx:parens}% \printdelim{nonameyeardelim}% \bibopenparen}% \usebibmacro{cite:plabelyear+extradate}} % Cite using shorthand {\usebibmacro{cite:shorthand}}} % Normal cite with author/editor % Normal full cite {\ifnameundef{shortauthor}% % Normal full cite {\printnames{labelname}} % Cite using short author {\cbx@apa@ifnamesaved {\printnames{shortauthor}} {\printnames[labelname]{author}}}% % Year \setunit{\global\booltrue{cbx:parens}% \printdelim{nameyeardelim}% \bibopenparen}% % Put the shortauthor inside the year brackets if necessary \ifnameundef{shortauthor} {} {\cbx@apa@ifnamesaved {} {\printnames{shortauthor}% \setunit{\printdelim{innernameyeardelim}}}}% % Print prenote (belongs to first cite) \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% % Actual year printing \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\usebibmacro{cite:plabelyear+extradate}}% % Save name hash for checks later \savefield{namehash}{\cbx@lasthash}}% \stepcounter{textcitecount}}} \makeatother

%% Bibliographie einbinden \addbibresource{biblatex-examples.bib} %% ++++++++++++++++++++++++++++++++++++++++++ %% Dokument %% ++++++++++++++++++++++++++++++++++++++++++ \begin{document}

here we have 5 authors, but only 2 should be displayed \parencite{herrmann}.'et al.' is missing here.

First citation should be normal \parencite[11]{sigfridsson}, second time with ibidem \parencite[95]{sigfridsson}, but after a second citation \parencite[282]{geer} it should appear as usual \parencite[2]{sigfridsson}.

\end{document}

here we have 5 authors, but only 2 should be displayed (Herrmann, Öfele et al., 2006).’et al.’ is missing here.
First citation should be normal (Sigfridsson & Ryde, 1998, S. 11), second
time with ibidem (ebd., S. 95), but after a second citation (Geer, 1985,
S. 282) it should appear as usual (Sigfridsson & Ryde, 1998, S. 2).

moewe
  • 175,683
  • Thank you so much for helping me again! This works as expected. Actually, I checked the guideline again, and you were right. Only one author plus et al. is necessary here. So, I just removed the config flags and it works. – Markus Dec 08 '23 at 09:00