将速记缩写纳入参考书目(biblatex)

将速记缩写纳入参考书目(biblatex)

我不想生成缩写列表,而是想将缩写包含在参考书目中,就像下面使用 ESSJ 的示例一样(此列表不是由 LaTeX 生成的):

在此处输入图片描述

以下面的代码为例,

\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage{american}

\usepackage[style=ext-authoryear-comp,articlein=false,innamebeforetitle=false,dashed=false]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Corbett2000Number,
    author = {Corbett, Greville G.},
    date = {2000},
    location = {Cambridge},
    publisher = {Cambridge University Press},
    title = {Number}
}
@book{BezlajESSJ,
    author = {Bezlaj, France},
    date = {1977/2007},
    location = {Ljubljana},
    title = {Etimološki slovar slovenskega jezika},
    shorthand = {ESSJ}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

Something (\cite{Corbett2000Number}, \cite{BezlajESSJ}).

\printbibliography

\end{document}

我得到:

在此处输入图片描述

但想要得到:

在此处输入图片描述

我正在使用 XeLaTeX 和biblatexext-authoryear-comp样式。我恳请指点如何实现这一点。

答案1

这是 bibmacro 的工作begentry,可用于在条目开头插入任意内容。

\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage{american}

\usepackage[
  style=ext-authoryear-comp,
  articlein=false,
  innamebeforetitle=false,
  dashed=false,
]{biblatex}

\renewbibmacro*{begentry}{%
  \printfield{shorthand}%
  \printunit*{\addspace=\space}%
}

\begin{filecontents}{\jobname.bib}
@book{Corbett2000Number,
  author    = {Corbett, Greville G.},
  date      = {2000},
  location  = {Cambridge},
  publisher = {Cambridge University Press},
  title     = {Number},
}
@book{BezlajESSJ,
  author    = {Bezlaj, France},
  date      = {1977/2007},
  location  = {Ljubljana},
  title     = {Etimološki slovar slovenskega jezika},
  shorthand = {ESSJ},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Something \autocite{Corbett2000Number,BezlajESSJ}.

\printbibliography
\end{document}

ESSJ = Bezlaj,法国 (1977–2007)。斯洛伐克语 斯洛文尼亚语。卢布尔雅那。

相关内容