使用 biblatex authoryear-icomp 在引用中强制使用首字母

使用 biblatex authoryear-icomp 在引用中强制使用首字母

我需要在文本中引用作者的姓名首字母,即使首字母不是消除歧义所必需的。因此调用

\parencite[244]{kull_geographie_2016}

应在文本中显示为

(CA KULL 等 S. BATTERBURY 2016,第 244 页)

并在参考书目中

KULL,Christian A. 和 Simon BATTERBURY (2016)。 “地理面临英语世界的严峻环境”。在:环境地理宣言。巴黎政治学院出版社,第 345 页。 227–255。

==============

\documentclass[11pt, a4paper]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fourier}

\usepackage[english,french]{babel}
\frenchbsetup{ThinSpaceInFrenchNumbers=true}
%%% 

\usepackage[backend=biber, style= authoryear-icomp,maxbibnames=99]{biblatex}

\renewcommand{\mkibid}[1]{\emph{#1}}

\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\emph]{andothers}}
    {}}

\addbibresource{\jobname.bib}

\usepackage{filecontents}
%%%
\usepackage[autostyle=true]{csquotes}
\DeclareQuoteStyle[quotes]{french}
  {\itshape\mkfrenchopenquote{\guillemotleft}}
  {\mkfrenchclosequote{\guillemotright}}
  {\itshape\textquotedblleft}
  {\textquotedblright}

\begin{filecontents}{\jobname.bib}
@Incollection{kull_geographie_2016,
  Title                    = {La géographie face aux défis environnementaux dans
 le monde anglophone},
  Author                   = {Kull, Christian A. and Batterbury, Simon},
  Booktitle                = {Manifeste pour une géographie environnementale},
  Year                     = {2016},
  Edition                  = {Presses de Sciences Po},
  Pages                    = {227--255},
  Collaborator             = {Chartier, Denis and Rodary, Estienne}
}
\end{filecontents}

\begin{document} 

Voila une référence \parencite[244]{kull_geographie_2016}, une autre
\cite[215]{kull_geographie_2016} et encore une autre \textcite{kull_geographie_2016}.

\printbibliography
\end{document}

答案1

您可以重新定义labelname姓名格式。下面的重新定义将给出首字母缩写(如果无歧义)和完整名字(如果需要消除歧义)。

\documentclass[11pt, a4paper]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fourier}

\usepackage[english,french]{babel}
\frenchbsetup{ThinSpaceInFrenchNumbers=true}

\usepackage[autostyle=true]{csquotes}
\usepackage[backend=biber, style=authoryear-icomp, maxbibnames=99]{biblatex}

\renewcommand{\mkibid}[1]{\emph{#1}}

\DeclareNameFormat{labelname}{%
  \ifnumequal{\value{uniquename}}{2}
    {\usebibmacro{name:given-family}
       {\namepartfamily}
       {\namepartgiven}
       {\namepartprefix}
       {\namepartsuffix}}
    {\ifuseprefix
       {\usebibmacro{name:given-family}
         {\namepartfamily}
         {\namepartgiveni}
         {\namepartprefix}
         {\namepartsuffixi}}
       {\usebibmacro{name:given-family}
         {\namepartfamily}
         {\namepartgiveni}
         {\namepartprefixi}
         {\namepartsuffixi}}}%
  \usebibmacro{name:andothers}}

\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\emph]{andothers}}
    {}}

\addbibresource{biblatex-examples.bib}

\begin{document} 
Voila une référence \parencite[244]{sigfridsson}, une autre
\cite[215]{sigfridsson} et encore une autre \textcite{sigfridsson}.

\printbibliography
\end{document}

在此处输入图片描述

相关内容