书目标签采用字母样式,但包含完整的 4 位年份

书目标签采用字母样式,但包含完整的 4 位年份

考虑以下使用的书目示例字母的风格,maxalphanames = 1并停用+如果有多个作者:

在此处输入图片描述

如何才能在标签中实现完整的4位数字年份? 因此在这种情况下所需的输出将是:Baa1989

我发现了一个来源解释如何定义完整的自定义标签。但我很难相信没有更简单、更通用的 switch 来切换。在手册中找不到任何内容。

我正在寻找解决方案biblatex + biber

谢谢。


平均能量损失

\begin{filecontents}{references.bib}
@InProceedings{Baader1989,
  Title                    = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
  Author                   = {Baader, U. and Depenbrock, M. and Gierse, Georg},
  Booktitle                = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
  Year                     = {1989},
  Month                    = {Oct},
  Pages                    = {486-492 vol.1},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=alphabetic,%
            backend=biber,
            maxnames=99,
            maxalphanames=1,    
            backref=true,
            doi=false,isbn=false,url=false,
            backref=false,
            ]{biblatex}
\renewcommand*{\labelalphaothers}{}

\bibliography{references.bib} 

\begin{document}
Citation: \cite{Baader1989}
\printbibliography
\end{document}

答案1

据我所知,你将不得不诉诸\DeclareLabelalphaTemplate,但这并不是太糟糕。

我们可以直接复制默认值biblatex.def并更改\field[strwidth=2,strside=right]{year}\field{year}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1,pcompound=true]{labelname}
    \field[strwidth=1,strside=left,pcompound=true]{labelname}
  }
  \labelelement{
    \field{year}    
  }
}

就是这样。

平均能量损失

\begin{filecontents}{\jobname.bib}
@InProceedings{Baader1989,
  Title                    = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
  Author                   = {Baader, U. and Depenbrock, M. and Gierse, Georg},
  Booktitle                = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
  Year                     = {1989},
  Month                    = {Oct},
  Pages                    = {486-492 vol.1},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=alphabetic,%
            backend=biber,
            maxnames=99,
            maxalphanames=1,    
            backref=true,
            doi=false,isbn=false,url=false,
            backref=false,
            ]{biblatex}
\renewcommand*{\labelalphaothers}{}

\addbibresource{\jobname.bib} 

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1,pcompound=true]{labelname}
    \field[strwidth=1,strside=left,pcompound=true]{labelname}
  }
  \labelelement{
    \field{year}    
  }
}

\begin{document}
Citation: \cite{Baader1989}
\printbibliography
\end{document}

相关内容