更改 biblatex 的引用样式字母顺序

更改 biblatex 的引用样式字母顺序

是否存在biblatex类似的引用样式alphabetic,但没有代表年份的数字?

例如,1978 年由“巴赫”和“舒尔茨”撰写的书应该贴上标签 [BS],而不是 [BS79]。

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic,maxnames=10]{biblatex}
\addbibresource{references.bib}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{key,
  author = {Baur, S and Schmid, A},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc]
\end{document}

答案1

alphabetic您可以使用以下样式配置标签的外观\DeclareLabelalphaTemplate

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic,maxnames=10]{biblatex}
\addbibresource{references.bib}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{key1,
  author = {Baur, S and Schmid, A},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
}

@book{key2,
  author = {Baur, S and Schmid, A},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
}
\end{filecontents}

\DeclareLabelalphaTemplate{
    \labelelement{
        \field[final]{shorthand}
        \field{label}
        \field[strwidth=3,strside=left,ifnames=1]{labelname}
        \field[strwidth=1,strside=left]{labelname}
    }
%   \labelelement{ % this is removed from the default LabelalphaTemplate
%       \field[strwidth=2,strside=right]{year}
%   }
}

\DeclareFieldFormat{extraalpha}{#1}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc]
\end{document}

就你的情况而言,你想从中删除年份数字。我只是注释了默认的对应部分LabelalphaTemplate

结果:

在此处输入图片描述

相关内容