使用 angew-chem 将多个相关条目拆分成多个段落

使用 angew-chem 将多个相关条目拆分成多个段落

这个问题与“相关字段中有多个键的条目:Biblatex 是否希望将多个相关条目拆分为多个段落?“。然而,我使用的是biblatex-chem样式chem-angew,它有不同的输出。

我正在尝试将多个相关条目添加到参考文献中。它们是相关的,因为后两篇出版物是对前两篇出版物的修正。与上述问题一样,第一个相关条目应该用分号分隔。

问题:所有后续条目仅以逗号分隔。

使用的解决方案确实会删除新行上的打印,但如果我之前有,或者类似的东西,\renewcommand*\relateddelim{}那就没关系了。\addcolon\addsemicolon\addspace

我的 MWE(参考书目数据已删除此 MWE 中不必要的信息):

\documentclass{article} 

\usepackage[backend=biber, style=chem-angew]{biblatex}

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Buntin.2008.ange,
  author = {Buntin, Kathrin},
  year = {2008},
  pages = {4671--4676},
  pagination = {page},
  volume = {120},
  journal = {Angew. Chem.},
  related = {Buntin.2008.anie,Buntin.2009.ange,Buntin.2009.anie},
  relatedtype = {translatedas}
}

@article{Buntin.2008.anie,
  author = {Buntin, Kathrin},
  year = {2008},
  pages = {4595--4599},
  pagination = {page},
  volume = {47},
  journal = {Angew. Chem. Int. Ed.},
}

@article{Buntin.2009.ange,
  author = {Buntin, Kathrin},
  year = {2009},
  pages = {9957},
  pagination = {page},
  volume = {121},
  journal = {Angew. Chem.},
}

@article{Buntin.2009.anie,
  author = {Buntin, Kathrin},
  year = {2009},
  pages = {9773},
  pagination = {page},
  volume = {48},
  journal = {Angew. Chem. Int. Ed.},
}
\end{filecontents*}

\addbibresource{\jobname.bib}

\renewcommand*\relateddelim{\addsemicolon\addspace}

\begin{document}
  Cited.\autocite{Buntin.2008.ange}

  \printbibliography
\end{document}

生成:

产生的输出的图像。

答案1

标准样式曾经存在结构上类似的问题,该问题已在 3.11 版中修复(https://github.com/plk/biblatex/pull/704/files)。\relateddelim应该打印 s\printunit因为下一个\print...命令可能不打印任何内容。

同样的修复方法chem-angew

\documentclass{article} 

\usepackage[backend=biber, style=chem-angew]{biblatex}

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
    @article{Buntin.2008.ange,
        author = {Buntin, Kathrin},
        year = {2008},
        pages = {4671--4676},
        pagination = {page},
        volume = {120},
        journal = {Angew. Chem.},
        related = {Buntin.2008.anie,Buntin.2009.ange,Buntin.2009.anie},
        relatedtype = {translatedas}
    }

    @article{Buntin.2008.anie,
        author = {Buntin, Kathrin},
        year = {2008},
        pages = {4595--4599},
        pagination = {page},
        volume = {47},
        journal = {Angew. Chem. Int. Ed.},
    }

    @article{Buntin.2009.ange,
        author = {Buntin, Kathrin},
        year = {2009},
        pages = {9957},
        pagination = {page},
        volume = {121},
        journal = {Angew. Chem.},
    }

    @article{Buntin.2009.anie,
        author = {Buntin, Kathrin},
        year = {2009},
        pages = {9773},
        pagination = {page},
        volume = {48},
        journal = {Angew. Chem. Int. Ed.},
    }
\end{filecontents*}

\addbibresource{\jobname.bib}

\renewcommand*\relateddelim{\addsemicolon\addspace}

\makeatletter
\renewbibmacro*{related}{%
  \ifboolexpr{
    not test {\iftoggle{bbx:related}}
    or
    test {\iffieldundef{related}}
  }
    {}
    {%
     \setunit{\addsemicolon\space}%
     \setcounter{bbx:relatedcount}{0}%
     \setcounter{bbx:relatedtotal}{0}%
     \def\do##1{\stepcounter{bbx:relatedtotal}}%
     \docsvfield{related}%
     \def\do{%
       \stepcounter{bbx:relatedcount}%
       \ifnumgreater{\value{bbx:relatedcount}}{1}
         {\printunit{\relateddelim}}
         {}}%
     \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}}}%
     \printtext[\bbx@tempa]{%
       \iffieldundef{relatedstring}
         {\ifboolexpr{
            test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}
            and
            test {\ifbibxstring{\thefield{relatedtype}s}}
          }
            {\printtext{\bibstring{\thefield{relatedtype}s}\relatedpunct}}
            {\iffieldbibstring{relatedtype}
               {\printtext{\bibstring{\thefield{relatedtype}}\relatedpunct}}
               {}}}
         {\iffieldbibstring{relatedstring}
            {\printtext{\bibstring{\thefield{relatedstring}}\relatedpunct}}
            {\printtext{\printfield{relatedstring}\relatedpunct}}}%
       \docsvfield{related}}}}
\makeatletter

\begin{document}
    Cited.\autocite{Buntin.2008.ange}

    \printbibliography
\end{document}

在此处输入图片描述

相关内容