更改文档中的 giveninits 选项(BibLaTeX)

更改文档中的 giveninits 选项(BibLaTeX)

我想知道在有多个参考书目时是否可以在文档中更改giveninits选项。在下面的 MWE 中,我有两个单独的参考书目。我希望第一个使用作者的完整名字(),而第二个应该将名字缩写为其首字母()。似乎不适用于此。BibLaTeXrefsegmentsgiveninits=falsegiveninits=truenewrefcontext

\documentclass[a4paper,11pt]{article}
\usepackage{filecontents}
\usepackage[backend=biber,%
    style=authoryear,%
    giveninits=false,%
    maxcitenames=2]{biblatex}
%\DeclareRefcontext{inits}{giveninits=true}
\addbibresource{Lit.bib}

\begin{filecontents}{Lit.bib}
@ARTICLE{Aguilera-Franco:2001,
  author = {Noemi Aguilera-Franco and Ulises Hern\'{a}ndez-Romano and Peter A.
    Allison},
  year = {2001},
  title = {Biostratigraphy and Environmental Changes Across the {Cenomanian--Turonian}
    Boundary, Southern {Mexico}},
  journal = {Journal of South American Earth Sciences},
  volume = {14},
  number = {2},
  pages = {237--255},
  doi = {10.1016/S0895-9811(01)00014-1}
}

@ARTICLE{KrautwigEtAl:1998,
  author = {Dirk W. H. Krautwig and Lukas Hottinger and Heinrich Zankl},
  year = {1998},
  title = {The Lamellar-Perforate, Arborescent and Coloured Foraminifers \textit{Miniacina},
    \textit{Homotrema}, and \textit{Sporadotrema}},
  journal = {Facies},
  volume = {38},
  pages = {89--102},
  doi = {10.1007/BF02537359}
}
\end{filecontents}

\begin{document}
\section{A section}
\newrefsegment
Test \textcite{Aguilera-Franco:2001} and \textcite{KrautwigEtAl:1998}.

\printbibliography[segment=1]

\section{Another section}
\newrefsegment
Test \textcite{Aguilera-Franco:2001}.

%\newrefcontext{inits} %DOES NOT WORK
\printbibliography[segment=2]
\end{document}

答案1

刚刚发行

\toggletrue{abx@bool@giveninits}

之后\newrefcontext

手册中仅列出了sortingsortingnamekeyschemelabelprefix等可以传递给 的选项\DeclareRefcontext。因此您无法giveninits在那里使用。

giveninits=true仅设置了切换abx@bool@#1inits,因此只需将其切换为 true 即可产生预期的结果。

相关内容