我正在寻找一种方法,当要显示的作者数量有限且用 et al 缩写时,在有许多作者的参考文献中始终列出一位特定作者。
例如
These are the relevant papers:
\fullcite{paper1}
\fullcite{paper2}
应该导致
These are the relevant papers:
Author, A., ..., Alwaysthisauthor, X., ..., et al.
Buthor, B., ..., Alwaysthisauthor, X., ..., et al.
根据要求,下面是一个最小示例:
\documentclass{article}
\usepackage{filecontents}
\usepackage[backend=biber,natbib]{biblatex}
\begin{filecontents}{\jobname.bib}
@INPROCEEDINGS{2001AIPC..569..163C,
author = {{Cheshkov}, S. and {Tajima}, T. and {Chiu}, C. and {Breitling}, F. },
title = "{Emittance control in Laser Wakefield Accelerator}",
booktitle = {American Institute of Physics Conference Series},
year = 2001,
volume = 569,
month = may,
pages = {163-176},
}
@ARTICLE{2001RScI...72.1339B,
author = {{Breitling}, F. and {Weigel}, R.~S. and {Downer}, M.~C. and
{Tajima}, T.},
title = "{Laser pointing stabilization and control in the
submicroradian regime with neural networks}",
journal = {Review of Scientific Instruments},
year = 2001,
month = feb,
volume = 72,
pages = {1339-1342},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
结果是
参考
F. Breitling 等人。“利用神经网络实现亚微弧度范围内的激光指向稳定和控制”。《科学仪器评论》第 72 卷(2001 年 2 月),第 1339-1342 页。
S. Cheshkov 等人。“激光尾场加速器中的发射度控制”。收录于:美国物理学会会议系列。第 569 卷。2001 年 5 月,第 163-176 页。
但是,即使作者列表被 et al 截断,我也需要 Breitling 的名字始终明确出现。
答案1
以下内容适用于biblatex
自我的回答,适用于> = 3.3从 [et al.] 中排除某一位作者。
为了使此解决方案有效,您将需要您姓名的哈希值,请参阅使用 biblatex 突出显示参考书目中的作者,并允许使用参考书目样式对其进行格式化有关如何从.bbl
文件中检索特定名称的哈希值的详细信息。
如果将名字括在括号中,则F. {Breitling}
/ 的哈希{Breitling}, F.
值为3f71afbcde39f096d711d45fa2c17bc7
。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber, maxnames=999]{biblatex}
\begin{filecontents*}{\jobname.bib}
@INPROCEEDINGS{cheshkov,
author = {{Cheshkov}, S. and {Tajima}, T. and {Chiu}, C. and {Breitling}, F. },
title = "{Emittance control in Laser Wakefield Accelerator}",
booktitle = {American Institute of Physics Conference Series},
year = 2001,
volume = 569,
month = may,
pages = {163-176},
}
@ARTICLE{breitling,
author = {{Breitling}, F. and {Weigel}, R.~S. and {Downer}, M.~C. and
{Tajima}, T.},
title = "{Laser pointing stabilization and control in the
submicroradian regime with neural networks}",
journal = {Review of Scientific Instruments},
year = 2001,
month = feb,
volume = 72,
pages = {1339-1342},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\newcounter{namesnotimportant}
\newtoggle{ellipsis}
\makeatletter
\newbibmacro*{name:etal:delim}[1]{%
\ifnumgreater{\value{listcount}}{\value{liststart}}
{\ifboolexpr{
test {\ifnumless{\value{listcount}}{\value{liststop}}}
or
test \ifmorenames
or test {\ifnumcomp{\value{namesnotimportant}}{>}{0}}
}
{\printdelim{multinamedelim}}
{\lbx@finalnamedelim{#1}}}
{}}
\makeatother
\DeclareNameFormat{given-family-etal}{%
\letbibmacro{name:delim}{name:etal:delim}%
\ifnumcomp{\value{listcount}}{=}{1}
{\setcounter{namesnotimportant}{0}%
\global\toggletrue{ellipsis}}
{}%
\ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}}
or test {\ifnumcomp{\value{listtotal}}{=}{2}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
{\iffieldequalstr{hash}{3f71afbcde39f096d711d45fa2c17bc7}%% <----- put the correct hash here
{\global\toggletrue{ellipsis}%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
{\stepcounter{namesnotimportant}%
\iftoggle{ellipsis}
{\addcomma\space\textellipsis\global\togglefalse{ellipsis}\isdot}
{}}}%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
(test \ifmorenames
or test {\ifnumcomp{\value{namesnotimportant}}{>}{0}})
}
{\andothersdelim\bibstring{andothers}}
{}}
\DeclareNameAlias{sortname}{given-family-etal}
\DeclareNameAlias{author}{given-family-etal}
\DeclareNameAlias{editor}{given-family-etal}
\DeclareNameAlias{translator}{given-family-etal}
\begin{document}
\nocite{cheshkov,breitling,aksin,worman,nussbaum,geer,sigfridsson}
\printbibliography
\end{document}
你因此得到
如果你只想要这种特殊格式\fullcite
,请将这四行移到\DeclareNameAlias
的预代码钩中,\usedriver
就像\DeclareCiteCommand{\fullcite}
这样
\DeclareCiteCommand{\fullcite}
{\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{given-family-etal}%
\DeclareNameAlias{author}{given-family-etal}%
\DeclareNameAlias{editor}{given-family-etal}%
\DeclareNameAlias{translator}{given-family-etal}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
如果你想为此定义一个特殊命令,以便可以\fullcite
同时使用“正常”和新名称格式,你可以\fullcite*
通过以下方式定义一个星号
\DeclareCiteCommand*{\fullcite}
{\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{given-family-etal}%
\DeclareNameAlias{author}{given-family-etal}%
\DeclareNameAlias{editor}{given-family-etal}%
\DeclareNameAlias{translator}{given-family-etal}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
反而。
如果你想要“过滤”多个名称(另外,比如{Tajima}, T.
),你可以将哈希比较合并为一个\ifboolexpr
。只需使用
\ifboolexpr{test {\iffieldequalstr{hash}{f9c1127a739dfe7ad337f89c98aebf51}}
or
test {\iffieldequalstr{hash}{67bbebbc19c3d65d07202eac52047d5e}}}%% <----- put the correct hash here
而\iffieldequalstr{hash}{f9c1127a739dfe7ad337f89c98aebf51}
不是\DeclareNameFormat{given-family-etal}
:
\DeclareNameFormat{given-family-etal}{%
\letbibmacro{name:delim}{name:etal:delim}%
\ifnumcomp{\value{listcount}}{=}{1}
{\setcounter{namesnotimportant}{0}%
\global\toggletrue{ellipsis}}
{}%
\ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}}
or test {\ifnumcomp{\value{listtotal}}{=}{2}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
{\ifboolexpr{test {\iffieldequalstr{hash}{f9c1127a739dfe7ad337f89c98aebf51}}
or
test {\iffieldequalstr{hash}{67bbebbc19c3d65d07202eac52047d5e}}}%% <----- put the correct hash here
{\global\toggletrue{ellipsis}%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
{\stepcounter{namesnotimportant}%
\iftoggle{ellipsis}
{\addcomma\space\textellipsis\global\togglefalse{ellipsis}\isdot}
{}}}%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
(test \ifmorenames
or test {\ifnumcomp{\value{namesnotimportant}}{>}{0}})
}
{\andothersdelim\bibstring{andothers}}
{}}