更改 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}

在您的情況下,因為您想從中刪除年份數字。我只是評論了default中對應的部分LabelalphaTemplate

結果:

在此輸入影像描述

相關內容