我想在文内引用中显示作者和编辑的姓名首字母,在参考书目中显示全名。仅针对作者的类似问题和解决方案是这里。现在我希望编辑器也能有同样的功能。
梅威瑟:
\documentclass{article}
\usepackage[style=verbose-trad1]{biblatex}
\ExecuteBibliographyOptions[book]{useeditor=false}
\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}
\DeclareNameFormat{labelname-revinit}{%
\ifnum\value{uniquename}<2%
\ifuseprefix
{\usebibmacro{name:family-given}
{\namepartgiveni}
{\namepartfamily}
{\namepartprefix}
{\namepartsuffixi}}
{\usebibmacro{name:family-given}
{\namepartgiveni}
{\namepartfamily}
{\namepartprefixi}
{\namepartsuffixi}}
\else
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\fi
\usebibmacro{name:andothers}}
\DeclareNameAlias{default}{labelname-revinit}
\begin{filecontents}{\jobname.bib}
@book{authoronly,
author = {Aniston, John},
title = {Make my day},
location = {London},
date = {1953},
pagetotal = {100},
}
@book{authorandeditor,
author = {Clinton, Matthew},
editor = {Smakowski, Andrew AND Bronson, William},
title = {Good things},
location = {Torronto},
date = {2014},
pagetotal = {200},
}
@book{editoronly,
editor = {Lejba, Mose},
title = {Big brother},
location = {Boston},
date = {2020},
pagetotal = {300},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Lorem \autocite{authoronly}
ipsum \autocite{authorandeditor}
dolor\autocite{editoronly}
\printbibliography
\end{document}
因此,现在我在所有地方都拥有良好的名字/姓氏顺序。我对作者的风格很好。但我希望出现的编辑\printbibliography
也用全名书写(但顺序与作者相反)。结果:
在带下划线的地方应使用完整的编辑者姓名。
答案1
labelname-revinit
问题中显示的定义在某些情况下将名字换成了姓氏,但没有biblatex
说明这一点。这会导致不寻常的输出,例如名字和姓氏之间的逗号,这对于自然“给定家族”顺序的西方名字来说是不寻常的。
如果您对所看到的内容大致满意,但希望在引文中看到名字的首字母,在参考书目中看到完整的名字,您可能需要尝试以下操作,我们使用切换按钮abx@bool@giveninits
切换到引文中的首字母。
\documentclass{article}
\usepackage[style=verbose-trad1]{biblatex}
\ExecuteBibliographyOptions[book]{useeditor=false}
\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\toggletrue{abx@bool@giveninits}%
\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}
\DeclareNameAlias{sortname}{family-given}
\begin{filecontents}{\jobname.bib}
@book{authoronly,
author = {Aniston, John},
title = {Make my day},
location = {London},
date = {1953},
pagetotal = {100},
}
@book{authorandeditor,
author = {Clinton, Matthew},
editor = {Smakowski, Andrew AND Bronson, William},
title = {Good things},
location = {Torronto},
date = {2014},
pagetotal = {200},
}
@book{editoronly,
editor = {Lejba, Mose},
title = {Big brother},
location = {Boston},
date = {2020},
pagetotal = {300},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Lorem \autocite{authoronly}
ipsum \autocite{authorandeditor}
dolor\autocite{editoronly}
\printbibliography
\end{document}