![在 biblatex 中,是否可以在不定义参考书目样式的情况下在某人的参考书目中打印 \shorttitle?](https://linux22.com/image/322663/%E5%9C%A8%20biblatex%20%E4%B8%AD%EF%BC%8C%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E5%9C%A8%E4%B8%8D%E5%AE%9A%E4%B9%89%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E6%A0%B7%E5%BC%8F%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%E5%9C%A8%E6%9F%90%E4%BA%BA%E7%9A%84%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%E6%89%93%E5%8D%B0%20%5Cshorttitle%EF%BC%9F.png)
我希望所有简称(如果已定义)都打印在参考书目中完整标题后的括号中。如果不定义自己的参考书目样式,这是否可行?
女士:
\documentclass[11pt,a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear-ibid,language=american]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Hicks1925,
address = {Cambridge, MA},
author = {Diogenes Laërtius},
publisher = {Harvard University Press},
series = {Loeb Classical Library},
shorttitle = {DL},
title = {{Lives of Eminent Philosophers}},
translator = {Hicks, R. D.},
volume = {II},
year = {1925}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\citetitle{Hicks1925}
\printbibliography[heading=bibintoc]
\end{document}
这使:
拉尔修斯,狄奥吉尼斯 (1925)。《著名哲学家的生活》。RD Hicks 译。第 II 卷。洛布古典图书馆。马萨诸塞州剑桥:哈佛大学出版社。
而我想说的是:
拉尔修斯,狄奥吉尼斯 (1925)。《著名哲学家的生活》 (DL)。RD Hicks 译。第 II 卷。洛布古典图书馆。马萨诸塞州剑桥:哈佛大学出版社。
答案1
我不太确定你是否应该以shorttitle
这种方式使用该字段。也许shorthand
更合适?
shorttitle
无论如何,我们可以通过这个方便的修改直接在标题后打印
\renewbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\setunit{\addspace}%
\printfield[parens]{shorttitle}%
\newunit}%
\printfield{titleaddon}}
这是标准宏,其中biblatex.def
添加了两行以打印shorttitle
。
平均能量损失
\documentclass[11pt,a4paper,british]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear-ibid]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Hicks1925,
address = {Cambridge, MA},
author = {Diogenes Laërtius},
publisher = {Harvard University Press},
series = {Loeb Classical Library},
shorttitle = {DL},
title = {{Lives of Eminent Philosophers}},
translator = {Hicks, R. D.},
volume = {II},
year = {1925}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\setunit{\addspace}%
\printfield[parens]{shorttitle}%
\newunit}%
\printfield{titleaddon}}
\begin{document}
\citetitle{Hicks1925}
\printbibliography[heading=bibintoc]
\end{document}