修复使用相关字段时 biblatex/biber 中的非大写问题

修复使用相关字段时 biblatex/biber 中的非大写问题

以下代码正确使用了相关字段,但从相关 bib-item 中获取的标题并未像原始标题那样大写。

在此处输入图片描述

我猜这与 langsci 数据模型文件有关,但我不知道在哪里解决这个问题。

\documentclass{article}

\begin{filecontents}{\jobname.bib}

@incollection{Montague73a,
        author = {Richard Montague},
        checked = {stmue 2021},
        crossref = {HMS73a-ed},
        pages = {221--242},
        related = {Montague74b-u},
        relatedstring = {Reprint as},
        title = {The Proper Treatment of Quantification in Ordinary {English}}}


@book{HMS73a-ed,
        address = {Dordrecht},
        booktitle = {Approaches to Natural Language. {Proceedings} of the 1970 {Stanford Workshop on Grammar and Semantics}},
        editor = {Jaakko Hintikka and Julian Moravcsik and Patrick Suppes},
        number = {49},
        publisher = {Reidel},
        series = {Synthese Library},
        title = {Approaches to Natural Language. {Proceedings} of the 1970 {Stanford Workshop on Grammar and Semantics}},
        year = 1973}


@incollection{Montague74b-u,
        author = {Richard Montague},
        crossref = {Montague74a-ed},
        pages = {247--270},
        title = {The Proper Treatment of Quantification in Ordinary {English}}}



@book{Montague74a-ed,
        address = {New Haven, CT},
        author = {Richard Montague},
        booktitle = {Formal Philosophy: {Selected} Papers of {Richard Montague}},
        editor = {Richmond H. Thomason},
        ids = {Montague1974},
        publisher = {Yale University Press},
        title = {Formal Philosophy: {Selected} Papers of {Richard Montague}},
        year = {1974}}




\end{filecontents}

\usepackage[
        natbib=true,
        style=langsci-unified,
        citestyle=langsci-unified,
        datamodel=langsci,   % add authauthor and autheditor as possible fields to bibtex entries
        backend=biber,
        indexing=cite,
]{biblatex}

\usepackage{xcolor}
\definecolor{lsDOIGray}{cmyk}{0,0,0,0.45}


\addbibresource{\jobname.bib}

\begin{document}

\cite{Montague73a}

    \printbibliography

\end{document}

答案1

更新

此问题已在 3.17 中修复 biblatex


这是大约一周前报告的标准样式中的一个错误biblatex。它将在即将发布的版本中修复。请参阅https://github.com/plk/biblatex/issues/1149(和https://github.com/moewew/biblatex-ext/issues/22) 了解详情。

如果您现在需要解决方案,以下 MWE 包含related:default将在biblatexv3.17 中出现的固定定义。请记住在更新时删除此代码块,这样您就可以从该宏的未来改进中受益。

\documentclass{article}
\usepackage[
  backend=biber,
  style=langsci-unified,
  datamodel=langsci,
]{biblatex}

\makeatletter
% fix for https://github.com/plk/biblatex/issues/1149
% https://tex.stackexchange.com/q/600943/35864
% remove this when biblatex is updated to v3.17
\renewbibmacro*{related:default}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \DeclareNameAlias{sortname}{default}%
       % from authortitle and authoryear
       \ifbibmacroundef{bbx:dashcheck}
         {}
         {\renewbibmacro*{bbx:dashcheck}[2]{##2}}%
       % authoryear
       \ifbibmacroundef{labeltitle}
         {}
         {\renewbibmacro*{labeltitle}{}}%
       \ifbibmacroundef{date+extradate}
         {}
         {\renewbibmacro*{date+extradate}{}%
          \renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}}%
       \renewbibmacro*{pageref}{}%
       \renewbibmacro*{related:init}{}}
      {\thefield{entrytype}}}}
\makeatother

\begin{filecontents}{\jobname.bib}
@inproceedings{Montague73a,
  author        = {Richard Montague},
  checked       = {stmue 2021},
  crossref      = {HMS73a-ed},
  pages         = {221--242},
  related       = {Montague74b-u},
  relatedstring = {Reprint as},
  title         = {The Proper Treatment of Quantification in Ordinary {English}},
}
@proceedings{HMS73a-ed,
  address    = {Dordrecht},
  editor     = {Jaakko Hintikka and Julian Moravcsik and Patrick Suppes},
  number     = {49},
  publisher  = {Reidel},
  series     = {Synthese Library},
  title      = {Approaches to Natural Language},
  titleaddon = {Proceedings of the 1970 {Stanford Workshop on Grammar and Semantics}},
  year       = 1973,
}
@incollection{Montague74b-u,
  author   = {Richard Montague},
  crossref = {Montague74a-ed},
  pages    = {247--270},
  title    = {The Proper Treatment of Quantification in Ordinary {English}},
}
@book{Montague74a-ed,
  address   = {New Haven, CT},
  author    = {Richard Montague},
  editor    = {Richmond H. Thomason},
  ids       = {Montague1974},
  publisher = {Yale University Press},
  title     = {Formal Philosophy: {Selected} Papers of {Richard Montague}},
  year      = {1974},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  \autocite{Montague73a}

  \printbibliography
\end{document}

Montague, Richard。1973 年。《普通英语中量化的正确处理》。载于 Jaakko Hintikka、Julian Moravcsik 和 Patrick Suppes(编),《自然语言方法》。1970 年斯坦福语法和语义学研讨会论文集(Synthese Library 49),第 221-242 页。Dordrecht:Reidel。重印版为《普通英语中量化的正确处理》。载于 Richmond H. Thomason(编),第 247-270 页。康涅狄格州纽黑文:耶鲁大学出版社,1974 年。

  • 请注意,style=langsci-unified, citestyle=langsci-unified,相当于style=langsci-unified,,因为style=<style>刚好设置bibstyle=<style>citestyle=<style>
  • @books 没有booktitle,它们只有titlebackend=bibtex,您必须包含 的副本title才能booktitle使用 crossref 功能,但biblatex不再需要这样做。
  • 从标题来看HMS73a-ed,它似乎是@proceedings(至少它是一个@collection,因为它没有作者,而@books 通常有作者,而且子条目HMS73a-ed已经是@incollection)。如果HMS73a-ed改为@proceedingsMontague73a应该是@inproceedings

相关内容