平均能量损失

平均能量损失

对于几乎所有的 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}

MWE 输出

相关内容