
我正在嘗試使用 alpha 參考書目風格,但我必須自訂它。我的 .bib 檔案中的內容是:
@book{laue,
Author = {Kurt Laue and Helmut Stenger},
Date-Added = {2014-05-06 20:55:13 +0000},
Date-Modified = {2014-05-06 20:55:42 +0000},
Title = {Strangpressen: Verfahren, Maschinen, Werkzeuge},
Year = {1976}}
我自然得到:
但我希望參考書目和引文顯示為 [LAU76] 而不是 [LS76]。我的意思是,我想在所有引用中顯示第一作者的前 3 個字母(大寫)和出版年份。
我怎麼做?謝謝...
答案1
您可以重新定義 Biber 建立標籤的方式\DeclareLabelalphaTemplate
。
\renewcommand*{\labelalphaothers}{}
這是為了擺脫+
if 作者數量多於maxnames
。
\DeclareLabelalphaTemplate{
\labelelement{
\field[final]{shorthand}
\field{label}
\field[strwidth=3,strside=left]{labelname}
}
\labelelement{
\field[strwidth=2,strside=right]{year}
}
}
這始終採用第一作者姓氏的前三個名字,並添加年份的最後兩位數字。
我們也設定maxalphanames=1
和minalphanames=1
\usepackage[maxalphanames=1, minalphanames=1, style=alphabetic, backend=biber]{biblatex}
微量元素
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{laue,
Author = {Kurt Laue and Helmut Stenger},
Date-Added = {2014-05-06 20:55:13 +0000},
Date-Modified = {2014-05-06 20:55:42 +0000},
Title = {Strangpressen: Verfahren, Maschinen, Werkzeuge},
Year = {1976}}
\end{filecontents*}
\usepackage[maxalphanames=1, minalphanames=1, style=alphabetic, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}
\renewcommand*{\labelalphaothers}{}
\DeclareLabelalphaTemplate{
\labelelement{
\field[final]{shorthand}
\field{label}
\field[strwidth=3,strside=left]{labelname}
}
\labelelement{
\field[strwidth=2,strside=right]{year}
}
}
\begin{document}
\cite{laue,wilde,baez/article,cicero}
\printbibliography
\end{document}
答案2
如果你不喜歡正確的方法,我建議一個 hack:
\newcommand{\Bibkeyhack}[3]{}
像使用它一樣
author = {This Is The Author\Bibkeyhack LAU}
完整答案這裡。