![平均能量损失](https://linux22.com/image/401459/%E5%B9%B3%E5%9D%87%E8%83%BD%E9%87%8F%E6%8D%9F%E5%A4%B1.png)
对于几乎所有的 biblatex 样式,以下宏都会将原始年份添加到出版年份中。但在历史我正在使用的样式包。出于多种原因,我不想更改样式。但这将是我经常需要添加原始年份的功能。
工作示例:背页
\documentclass[a4paper,oneside,BCOR=48mm,12pt,titlepage]{jurabook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=authortitle-dw, nopublisher=false, journalnumber=afteryear, addyear=true, origfields=false]{biblatex}
\renewbibmacro*{date}{%
\printdate
\iffieldundef{origyear}{%
}{%
\setunit*{\addspace}%
\printtext[parens]{\printorigdate}%
}%
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{schaeffer1977traite,
author = {Schaeffer, Pierre},
title = {Traité des objets musicaux: essai interdisciplines},
year = {1977},
origdate = {1966},
location = {Paris},
publisher = {Editions du Seuil},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
如何使用 geschichtsfrkl 包存档原始年份输出?(下面的示例在括号中显示了缺失的原始年份。)
geschichtsfrkl 示例(不起作用)Overleaf2
\documentclass[a4paper,oneside,BCOR=48mm,12pt,titlepage]{jurabook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=geschichtsfrkl]{biblatex}
\renewbibmacro*{date}{%
\printdate
\iffieldundef{origyear}{%
}{%
\setunit*{\addspace}%
\printtext[parens]{\printorigdate}%
}%
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{schaeffer1977traite,
author = {Schaeffer, Pierre},
title = {Traité des objets musicaux: essai interdisciplines},
year = {1977},
origdate = {1966},
location = {Paris},
publisher = {Editions du Seuil},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
还有谁知道得更多吗?
答案1
对于该geschichtsfrkl
样式,您需要修改location+edition+year
宏。您可以通过查看来了解这一点geschichtsfrkl.bbx
。
平均能量损失
\documentclass[a4paper,oneside,BCOR=48mm,12pt,titlepage]{jurabook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=geschichtsfrkl]{biblatex}
\newbibmacro*{location+edition+year}{%
\printlist{location}%
\iffieldundef{edition}{\setunit{\addspace}}{%
\iffieldint{edition}%
{\setunit{\addspace}%
\mkbibsuperscript{\printfield{edition}}}%
{\setunit{\addcomma\addspace}%
\printfield{edition}\addcomma\addspace}}%
\printfield{year}%
\iffieldundef{origyear}
{}
{\setunit*{\addspace}%
\printtext[parens]{\printorigdate}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{schaeffer1977traite,
author = {Schaeffer, Pierre},
title = {Traité des objets musicaux: essai interdisciplines},
year = {1977},
origdate = {1966},
location = {Paris},
publisher = {Editions du Seuil},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}