答案1
这是一个使用 的解决方案biblatex
。它以trad-alpha
作为基本样式,并通过对标签进行一些(简单)定制来获得输出。
\DeclareLabelalphaNameTemplate{
\namepart{family}
}
上面的模板只是告诉我们将使用姓氏部分来创建标签。
\DeclareLabelalphaTemplate{
\labelelement{\field[names=1,noalphaothers]{labelname}}
\labelelement{\literal{,~}}
\labelelement{\field{year}}
}
对于标签,第一个可选参数(names=1 ) is to instruct to consider only the family name of the first author. The second
noapohaohters`是为了防止在有多个作者的情况下放置一个市场。
最后一步是调整参考书目(列表)的定义,我们将列表的缩进设置为固定宽度,而不是(最长)标签的宽度。
\defbibenvironment{bibliography}
{\list
{\printtext[labelalphawidth]{%
\printfield{labelalpha}%
\printfield{extraalpha}}}
{\setlength{\labelwidth}{\parindent}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{##1\hss}}
{\endlist}
{\item}%
完整的文件如下所示:
\documentclass{article}
\usepackage[giveninits=true,style=trad-alpha]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareLabelalphaNameTemplate{
\namepart{family}
}
\DeclareLabelalphaTemplate{
\labelelement{\field[names=1,noalphaothers]{labelname}}
\labelelement{\literal{,~}}
\labelelement{\field{year}}
}
\defbibenvironment{bibliography}
{\list
{\printtext[labelalphawidth]{%
\printfield{labelalpha}%
\printfield{extraalpha}}}
{\setlength{\labelwidth}{\parindent}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{##1\hss}}
{\endlist}
{\item}%
\begin{document}
\cite{knuth:ct:a,knuth:ct:b,knuth:ct:c}
\cite{murray}
\printbibliography
\end{document}
并产生