biblatex/iso690 (iso-authoryear):缺少相关条目(及其他字段)

biblatex/iso690 (iso-authoryear):缺少相关条目(及其他字段)

我正在使用biblatex3.16(最新版)biber(后台)和biblatex-iso690实现 biblatex 样式的包(0.4.0,最新版)iso-authoryear

我注意到各种字段,特别是参考书目 ( related=) 中相关条目的引用没有被打印出来,我不知道为什么。以下示例使用默认样式:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Keynes1936,
  author      = {John Maynard Keynes},
  date        = {1936},
  title       = {The General Theory of Employment, Interest and Money},
  location    = {London},
  pagetotal   = {403},
  publisher   = {MacMillan},
  related     = {Keynes2018},
  relatedstring = {Repr. as},
}
@Book{Keynes2018,
  author      = {John Maynard Keynes},
  date        = {2018},
  title       = {The General Theory of Employment, Interest and Money},
  isbn        = {978-3-319-70343-5},
  publisher   = {Springer},
  related     = {Keynes1936},
  relatedtype = {reprintof},
}
\end{filecontents*}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

这产生了

在此处输入图片描述

改变样式时,即使用

\usepackage[style=iso-authoryear]{biblatex}

相反,我得到

在此处输入图片描述

我查看了 和 的文档biblatex,但没有找到任何可以解释此行为的内容。或文件biblatex-iso690中没有任何内容表明存在任何问题。.log.blg

值得一提的是,我正在使用 MikTeX 和 xelatex。

编辑:这也会影响其他字段,例如volume=引用多卷书的一卷的条目,language=以及其他字段。

答案1

查看代码biblatex-iso690表明书目驱动程序不支持该related功能。

标准样式的驱动程序biblatex结束如下

  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

但那些最终iso.bbx

  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}

我不确定为什么会这样。我知道这个biblatex-iso690已经存在很长时间了,所以它可能是基于biblatex没有该related功能的标准样式版本。但也可能是related故意删除了该功能,因为 ISO 690 对这样的事情没有任何规定。

您可以尝试通过从和related复制相关代码并将驱动程序中缺少的块注入到中来恢复该功能。standard.bbxauthoryear.bbxrelatedfinentry

\documentclass{article}

\usepackage[style=iso-authoryear]{biblatex}

\providetoggle{bbx:related}
\toggletrue{bbx:related}

\makeatletter
\newbibmacro*{bbx:ifmergeddate}{\@secondoftwo}
\renewbibmacro*{date}{%
  \usebibmacro{bbx:ifmergeddate}
    {}
    {\printdate}}%

\newcounter{bbx:relatedcount}
\newcounter{bbx:relatedtotal}

\newbibmacro*{related:init}{%
  \csundef{bbx:relatedloop}}

\newbibmacro*{begrelated}{}
\newbibmacro*{endrelated}{}
\newbibmacro*{begrelatedloop}{}
\newbibmacro*{endrelatedloop}{}


\def\ifrelatedloop{%
  \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}
    or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}

\newbibmacro*{related}{%
  \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }
    {}
    {\ifcsundef{begrelateddelim\strfield{relatedtype}}
       {\printunit{\begrelateddelim}}
       {\printunit{\csuse{begrelateddelim\strfield{relatedtype}}}}%
     \usebibmacro{begrelated}%
     \def\bbx@tempa{}%
     \setcounter{bbx:relatedtotal}{0}%
     \def\do##1{%
       \entrydata{##1}{%
         \ifrelatedloop
           {}
           {\stepcounter{bbx:relatedtotal}%
            \gappto{\bbx@tempa}{##1,}}}}%
     \docsvfield{related}%
     \restorefield{related}{\bbx@tempa}%
     \ifnumgreater{\value{bbx:relatedtotal}}{0}
       {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}%
        \iffieldundef{clonesourcekey}
          {}
          {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}%
        \setcounter{bbx:relatedcount}{0}%
        \def\do{%
          \stepcounter{bbx:relatedcount}%
          \ifnumgreater{\value{bbx:relatedcount}}{1}
            {\ifcsundef{relateddelim\strfield{relatedtype}}
              {\printunit{\relateddelim}}
              {\expandafter\expandafter\expandafter\expandafter\expandafter
               \expandafter\expandafter\printunit
               \expandafter\expandafter\expandafter\expandafter\expandafter
               \expandafter\expandafter{%
                 \csuse{relateddelim\strfield{relatedtype}}}}}
            {}}%
        \ifbibmacroundef{related:\strfield{relatedtype}}
          {\appto{\do}{\usebibmacro{related:default}}}
          {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
        \iffieldformatundef{related:\strfield{relatedtype}}
          {\def\bbx@tempa{related}}
          {\def\bbx@tempa{related:\strfield{relatedtype}}}%
        \iffieldformatundef{relatedstring:\strfield{relatedtype}}
          {\def\bbx@tempb{relatedstring:default}}
          {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}%
        \printtext[\bbx@tempa]{%
          \usebibmacro{begrelatedloop}%
          \iffieldundef{relatedstring}
            {\ifboolexpr{
               test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}
               and
               test {\ifbibxstring{\thefield{relatedtype}s}}
             }
               {\printtext[\bbx@tempb]{%
                  \bibstring[\mkrelatedstringtext]{\thefield{relatedtype}s}}}
               {\iffieldbibstring{relatedtype}
                  {\printtext[\bbx@tempb]{%
                     \bibstring[\mkrelatedstringtext]{\thefield{relatedtype}}}}
                  {}}}
            {\iffieldbibstring{relatedstring}
               {\printtext[\bbx@tempb]{%
                  \bibstring[\mkrelatedstringtext]{\thefield{relatedstring}}}}
               {\printfield[\bbx@tempb]{relatedstring}}}%
          \docsvfield{related}%
          \usebibmacro{endrelatedloop}}}%
       {}%
     \usebibmacro{endrelated}}}
\makeatother

\renewbibmacro{finentry}{%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \finentry
}

\begin{filecontents*}{\jobname.bib}
@Book{Keynes1936,
  author      = {John Maynard Keynes},
  date        = {1936},
  title       = {The General Theory of Employment, Interest and Money},
  location    = {London},
  pagetotal   = {403},
  publisher   = {MacMillan},
  related     = {Keynes2018},
  relatedstring = {Repr. as},
}
@Book{Keynes2018,
  author      = {John Maynard Keynes},
  date        = {2018},
  title       = {The General Theory of Employment, Interest and Money},
  isbn        = {978-3-319-70343-5},
  publisher   = {Springer},
  related     = {Keynes1936},
  relatedtype = {reprintof},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

凯恩斯,约翰·梅纳德,1936 年。《就业、利息和货币通论》。伦敦:麦克米伦出版社,1936 年。重印版为《就业、利息和货币通论》。Springer,2018 年。isbn 978-3-319-70343-5。凯恩斯,约翰·梅纳德,2018 年。《就业、利息和货币通论》。Springer,2018 年。isbn 978-3-319-70343-5。《就业、利息和货币通论》重印版。伦敦:麦克米伦出版社,1936 年。

相关内容