仅从引文中删除“et al.”并将其保留在参考书目中

仅从引文中删除“et al.”并将其保留在参考书目中

我使用authoryear样式 ( biblatex),我想从(文内)引文中删除“et al”,同时仅显示其中的第一个作者姓名。但我想在参考书目 ( maxbibname=3)中显示“et al.”

\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}

我用这一行\DefineBibliographyStrings{english}{andothers={}}从引文和参考书目中删除了“et al.”而我只想从引文中删除它(我需要的是 [de Gennaro, 2012] )并保留“et al.”在参考书目中,如果有超过 3 位作者,则在第一位作者姓名后面(我需要:de Gennaro et al. (2012) .......)

答案1

\usebibmacro{name:andothers}删除引文中的“et al.”与从名称格式中删除一样简单labelname

但是,如果只是在引用中隐藏“et al.”而不考虑排序和名称哈希,则会导致消歧字母出现问题(或者说缺少消歧字母)。最近发布的biblatex3.13 允许您忽略“et al.”以进行名称哈希生成和排序。请参阅https://github.com/plk/biblatex/issues/861

相关选项是nohashothersnosortothers。您可以在以下 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 和 Ryde 1998 年;Goossens、Mittelbach 和 Samarin 1994 年;Aksın 2006 年;Herrmann 2006 年)

(Appleby 1980a;Appleby 1980b)

上面的引文图像,包括参考书目。

相关内容