当使用数字样式时,\citet{key}
命令输出Lastname [n]
。我希望输出Lastname F. [n]
F 是Firstname
首字母的位置。ps 这是 MWE 代码
\documentclass[a4paper]{article}
\usepackage{fontspec}
\setmainfont[
BoldFont={DeJavu Serif Bold},
ItalicFont={DeJavu Serif Italic},
BoldItalicFont={DeJavu Serif BoldItalic}
]{DeJavu Serif}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{baez/article,
author = {Baez, John C. and Lauda, Aaron D.},
title = {Higher-Dimensional Algebra {V}: 2-Groups},
journaltitle = {Theory and Applications of Categories},
date = 2004,
volume = 12,
pages = {423-491},
version = 3,
eprint = {math/0307200v3},
eprinttype = {arxiv},
langid = {english},
langidopts = {variant=american},
annotation = {An \texttt{article} with \texttt{eprint} and
\texttt{eprinttype} fields. Note that the arXiv reference is
transformed into a clickable link if \texttt{hyperref} support
has been enabled. Compare \texttt{baez\slash online}, which
is the same item given as an \texttt{online} entry},
hyphenation={english},
}
@article{another,
author = {Another,Author and One more, Author},
title = {Title},
journaltitle = {Journal},
date = 2004,
volume = 12,
pages = {423-491},
version = 3,
eprint = {math/0307200v3},
eprinttype = {arxiv},
langid = {english},
langidopts = {variant=american},
hyphenation={english},
}
\end{filecontents*}
\usepackage[english]{babel}
\usepackage[natbib=true,
style=numeric,
isbn=true,
url=true,
defernumbers=false,
sorting=nyt,
firstinits=true,
backend=biber,
language=auto,
autolang=other]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\citet{another} \\
Some text \\
\citet{baez/article} \\
\nocite{*}
\printbibliography
\end{document}
我希望Baez,J.C. and Lauda,A.D. [2]
斜体形状更可取 :) ps 在评论中有人向我指出,正确的引用方式是J.C. Baez and A.D. Lauda [2]
,但问题仍然存在:如何以数字引用样式输出姓名首字母
答案1
看起来
\DeclareNameAlias{labelname}{family-given}
可以完成这项工作。您可以获得带有 的全名(如果有)giveninits=false
和带有 的首字母giveninits=true
。
和
\DeclareNameFormat{labelname}{%
\ifnum\value{uniquename}<2
\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}%
\or
\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\fi
\usebibmacro{name:andothers}}
您总是会得到首字母缩写,除非需要全名来消除歧义。(这仅适用于giveninits=false
,giveninits=true
始终只有首字母缩写可用。)要启用该功能,您需要uniquename
在加载时设置选项。
也可以看看firstinits 仅用于引用
family-given
您可以通过given-family
将上面的任意一个替换为来获得不同的顺序。