2

I'm using authoryear style (biblatex) and I want to remove "et al" from (in-text) citation while showing only the first author name in it. But I want to show "et al." in bibliography (maxbibname=3).

\documentclass{article}
\usepackage[style=authoryearcomp,uniquename=false,uniquelist=false,%
  maxcitenames=1,maxbibnames=3,sortcites=true,%
  firstinits=true,doi=false,url=false,isbn=false,%
  hyperref,backend=biber,useprefix]{biblatex}

\DeclareFieldFormat
[article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1\isdot}         %titoli non virgolettati
\DeclareNameAlias{sortname}{last-first} %prima il cognome e poi il nome

\DeclareFieldFormat{journaltitle}{{#1}\isdot}%titolo rivista normale

\DeclareFieldFormat{pages}{#1}% no prefix for the `pages` field in the bibliography

\DeclareFieldFormat[article]{title}{\textit{#1}\isdot}%titolo articolo corsivo



\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}%issue tra parentesi\renewcommand*{\bibpagespunct}{\addcolon\space}

\renewcommand{\labelnamepunct}{\addspace}

\renewbibmacro{in:}{%
    \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}%rimuovo l'"In" prima del titolo della rivista

\renewcommand*{\finalnamedelim}{\addcomma\space}%rimuovo l'"and per il nome dell' ultimo autore e separo i nomi con virgole

\renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    %  \setunit*{\adddot}% DELETED
    % NEW (optional); there's also \addnbthinspace
    \printfield{number}%
    \setunit{\addcomma\space}%
    \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}



\DeclareCiteCommand{\parencite}[\mkbibbrackets]%parentesi quadre
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
    \usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}

\DeclareCiteCommand*{\parencite}[\mkbibbrackets]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
    \usebibmacro{citeyear}}
{\multicitedelim}
{\usebibmacro{postnote}}

\DefineBibliographyStrings{english}{andothers={}}%%%%%%%%%IMPORTANT%%%%%%%%%%%

\renewcommand*{\nameyeardelim}{\addcomma\addspace}%virgola tra autore e anno nella citazione


\renewcommand*{\revsdnamepunct}{}%tolgo virgola tra cognome e nome nella bibliografia


\renewbibmacro*{journal+issuetitle}{%  %metto la virgola dopo il nome del journal
    \usebibmacro{journal}%
    \setunit*{\addcomma\space}%
    \iffieldundef{series}
    {}
    {\newunit
        \printfield{series}%
        \setunit{\addspace}}%
    \usebibmacro{volume+number+eid}%
    \setunit{\addspace}%
    \usebibmacro{issue+date}%
    \setunit{\addcolon\space}%
    \usebibmacro{issue}%
    \newunit}

\renewcommand*{\newunitpunct}{\addcomma\space}%virgola dopo il nome dell'articolo

\renewcommand*{\bibpagespunct}{\addcolon\space}% duepunti dopo issue


\begin{filecontents}{\jobname.bib}

@ARTICLE{key,
    author = { {\lowercase{d}}e Gennaro, B. and Gallo, M. and Lanzotti,A. and Mandela,N. },
    title = {Metodo di preparazione dell'elaborato di Laurea},
    year = {2012},
    journal = {Journal of Thesis Preparation},
    volume  = {14},
    number  = {3},
    pages   = {342--351}

}

\end{filecontents}


\begin{document}

\parencite{key}

\printbibliography

\end{document}

With the line \DefineBibliographyStrings{english}{andothers={}} I removed "et al." both from the citation and the bibliography while I wanted to remove it only from the citation (what I need is [de Gennaro, 2012] ) and mantain the "et al." in the bibliography after the first author name if there are more than 3 authors (I need: de Gennaro et al. (2012) .......)

  • Welcome to TeX.SX! Do you think that is wise? How will you be able to tell apart "Doe 2012" and "Doe et al. 2012"? Your readers will be especially confused when an "et al." reappears in the bibliography if you did not have any in the text. – moewe Aug 22 '15 at 9:47
  • The problem I'm currently seeing is that you can make biblatex forget about "et al."s, but Biber has to do sorting and disambiguation and is not that easily fooled. One could cheat and use the alphabetic style with maxalphanames=1 and \renewcommand*{\labelalphaothers}{}, plus a labelname format that prints the entire name. But that is hardly nice. – moewe Aug 22 '15 at 10:00
  • Where can I add my MWEB for my question? – Peppe Min Aug 22 '15 at 10:02
  • 1
    Just edit your question and add the code. – moewe Aug 22 '15 at 10:03
  • I'm sorry but i have some problems whit the addcode command i hope it can be understood also in this form. – Peppe Min Aug 22 '15 at 10:26
2

Removing the "et al." in citations is as easy as removing \usebibmacro{name:andothers} from the labelname name format.

But simply suppressing the "et al." in citations without taking care of sorting and the name hashes can lead to problematic results with the disambiguation letter (or rather the lack of a disambiguation letter). The recently released biblatex 3.13 lets you ignore "et al." for name hash generation and sorting purposes. See https://github.com/plk/biblatex/issues/861.

The relevant options are nohashothers and nosortothers. You can test their effect in the following MWE.

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

\usepackage[backend=biber, style=authoryear, 
  maxnames=3,
  nohashothers=true, nosortothers=true,
  uniquelist=false]{biblatex}

\DeclareNameFormat{labelname}{%
  \ifcase\value{uniquename}%
    \usebibmacro{name:family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \or
    \ifuseprefix
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffixi}}
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefixi}
        {\namepartsuffixi}}%
  \or
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  date    = {1980},
}
@book{applebyetal,
  author  = {Humphrey Appleby and Annie Hacker and James Hacker
             and Bernard Woolley},
  title   = {On the Importance of the Civil Service: Part II},
  date    = {1980},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson,companion,aksin,herrmann}

\autocite{appleby,applebyetal}

\printbibliography
\end{document}

(Sigfridsson and Ryde 1998; Goossens, Mittelbach and Samarin 1994; Aksın 2006; Herrmann 2006)

(Appleby 1980a; Appleby 1980b)

Image of the citations from above including the bibliography.

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.