![Biblatex:如何才能获得参考书目中的完整名字?](https://linux22.com/image/391669/Biblatex%EF%BC%9A%E5%A6%82%E4%BD%95%E6%89%8D%E8%83%BD%E8%8E%B7%E5%BE%97%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%E7%9A%84%E5%AE%8C%E6%95%B4%E5%90%8D%E5%AD%97%EF%BC%9F.png)
我希望 BibLaTeX 在文本中引用时不显示任何名字或首字母。但我希望在参考书目中有完整的名字。据我所知,这可以通过 来实现giveninits=false
。但此命令根本不影响引用样式。
我这样设置 BibLaTeX:
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[
backend=biber,
style=apa,
maxcitenames = 2,
mincitenames = 1,
uniquename = false,
uniquelist = false,
maxbibnames = 99,
apamaxprtauth=99,
giveninits=false
]{biblatex}
\DeclareLanguageMapping{english}{english-apa}
\usepackage{filecontents}
\begin{filecontents*}{test.bib}
@article{marquard1975,
author = {Donald W. Marquardt and Ronald D. Snee},
title = {Ridge Regression in Practice},
journal = {American Statistician},
volume = {29},
number = {1},
pages = {3-20},
year = {1975},
publisher = {Taylor & Francis},
}
}
\end{filecontents*}
\addbibresource{test.bib}
\begin{document}
\title{asdf}
\author{myself}
\date{\today}
\maketitle
TEST \cite{marquard1975}
\printbibliography
\end{document}
我得到的是(文中引用可以,但参考书目不可以)
测试 Marquardt 和 Snee,1975 年
参考
Marquardt, DW 和 Snee, RD (1975)。 实践中的岭回归。 美国统计学家,29(1),3-20。
我想要得到的:
测试 Marquardt 和 Snee,1975 年
参考
Marquardt, Donald W. 和 Snee, Ronald D. (1975)。 实践中的岭回归。 美国统计学家,29(1),3-20。
答案1
正如评论中提到的那样,APA 样式要求将名字缩写为首字母,并且只有在首字母有歧义的情况下才添加全名(方括号)。biblatex-apa
尽可能地实现这一要求。由于这非常棘手,因此正常选项giveninits
无法按预期工作。这与选项无法按预期工作biblatex-apa
的情况类似。(max|min)(bib|cite)?names
您必须重新定义两个名称 bibmacros 才能获取全名,一个用于按given-family
顺序排列的名称,另一个用于family-given
。原始定义可以在 中找到apa.bbx
,我们仅删除了 \ifthenelse{\value{uniquename}>1}
测试并确保使用\mkbibnamegiven{#2}
而不是打印完整的给定名称\mkbibnamegiven{#3}
。
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[
backend=biber,
style=apa,
uniquename = false,
uniquelist = false,
apamaxprtauth=99,
giveninits=false,
]{biblatex}
% argument meanings from apa.bbx
% #1 = family name
% #2 = given name
% #3 = given name (initials)
% #4 = name prefix
% #5 = name suffix
\renewbibmacro*{name:apa:family-given}[5]{%
\ifuseprefix
{\usebibmacro{name:delim:apa:family-given}{#4#1}%
\usebibmacro{name:hook}{#4#1}%
\ifdefvoid{#4}{}{%
\mkbibnameprefix{#4}\isdot%
\ifprefchar{}{\bibnamedelimc}}%
\mkbibnamefamily{#1}\isdot%
\ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#5}{}{\addcomma\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}
{\usebibmacro{name:delim:apa:family-given}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamefamily{#1}\isdot
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#4}}}
{}
{\revsdnamepunct}%
\ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#4}{}{%
\bibnamedelimc\mkbibnameprefix{#4}%
\ifprefchar{}{\bibnamedelimc}}%
\ifdefvoid{#5}{}{\addcomma\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}}
\renewbibmacro*{name:apa:given-family}[5]{%
\usebibmacro{name:delim}{#2#4#1#5}%
\usebibmacro{name:hook}{#2#4#1#5}%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot%
\bibnamedelimd}%
\ifdefvoid{#4}{}{%
\mkbibnameprefix{#4}\isdot
\ifprefchar{}{\bibnamedelimc}}%
\mkbibnamefamily{#1}\isdot%
\ifdefvoid{#5}{}{\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{marquard1975,
author = {Donald W. Marquardt and Ronald D. Snee},
title = {Ridge Regression in Practice},
journal = {American Statistician},
volume = {29},
number = {1},
pages = {3-20},
year = {1975},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
TEST \cite{marquard1975}
\printbibliography
\end{document}
请注意,应将&
in转义为。这里没有错误,因为不会打印s的字段,但最好记住正确处理。publisher = {Taylor & Francis},
\&
biblatex
publisher
@article
&