biblatex 未将参考书目标题更改为句子大小写

biblatex 未将参考书目标题更改为句子大小写

我有一个 .bib 文件,其中的项目如下所示:

    @Article{     10.1093/imaiai/iat004,
  author    = {Javanmard, Adel and Montanari, Andrea},
  journal   = {Information and Inference: A Journal of the IMA},
  volume    = {2},
  number    = {2},
  pages     = {115-144},
  year      = {2013},
  month     = {12},
  issn      = {2049-8764},
  doi       = {10.1093/imaiai/iat004},
  url       = {https://doi.org/10.1093/imaiai/iat004},
  eprint    = {https://academic.oup.com/imaiai/article-pdf/2/2/115/1958160/iat004.pdf},
  title     = {\href{/https://doi.org/10.1093/imaiai/iat004}{State
          evolution for general approximate message passing
          algorithms with applications to spatial coupling}}
}

@Article{     8866740,
  author    = {Takeuchi, Keigo},
  journal   = {IEEE Transactions on Information Theory},
  year      = {2020},
  volume    = {66},
  number    = {1},
  pages     = {368-386},
  doi       = {10.1109/TIT.2019.2947058},
  title = {\href{https://doi.org/10.1109/TIT.2019.2947058}{Rigorous
          Dynamics of Expectation-Propagation-Based Signal Recovery
          from Unitarily Invariant Measurements}}
}

并使用:

  \usepackage[backend=biber,
              style=numeric-comp,
              maxbibnames=6,
              sorting=none,
              eprint=false,
              url=false,
              doi=false,
              hyperref=true,
              firstinits=true,
              date=year,
              natbib]{biblatex} 

我获得以下输出: 书目输出

其中参考文献的标题与 .bib 文件中的标题完全相同。为什么这是默认行为?请注意,.bib 文件中的大写字母没有用花括号括起来。如何使所有参考文献的标题一致(例如使用句子大小写或使用首字母大写)?将后端从 更改biberbibtex不会产生不同的行为。不幸的是,我在网上找不到明确的信息,我不确定如何继续。

编辑:根据 moewe 的建议(非常感谢!),我的序言如下:

  \usepackage[autostyle]{csquotes}
  \usepackage[backend=biber,
          style=ext-numeric-comp,
          maxbibnames=6,
          %block=ragged,
          sorting=none,
          eprint=false,
          url=false,
          doi=false,
          hyperref=true,
          firstinits=true,
          date=year,
          natbib]{biblatex} 
 \addbibresource{\jobname.bib}% bibliographic data base(s)
    \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{titlecase:title}{\MakeSentenceCase*{#1}}

\newbibmacro{string+doiurlisbn}[1]{%
  \iffieldundef{doi}{%
    \iffieldundef{url}{%
      \iffieldundef{isbn}{%
       \iffieldundef{issn}{%
         #1%
        }{%
          \href{http://books.google.com/books?vid=ISSN\thefield{issn}}{#1}%
        }%
      }{%
        \href{http://books.google.com/books?vid=ISBN\thefield{isbn}}{#1}%
        }%
      }{%
      \href{\thefield{url}}{#1}%
      }%
    }{%
      \href{http://doi.org/\thefield{doi}}{#1}%
    }%
  }

  \DeclareFieldFormat{title}{\usebibmacro{string+doiurlisbn}{\mkbibemph{#1}}}
  \DeclareFieldFormat[article,incollection,inbook,inproceedings]{title}{%
  \usebibmacro{string+doiurlisbn}{\mkbibquote{#1}}}

我的 BIB 文件中有以下格式的参考资料:

@Article{     8866740,
  author    = {Takeuchi, Keigo},
  journal   = {IEEE Transactions on Information Theory},
  mytit = {Rigorous Dynamics of Expectation-Propagation-Based Signal
      Recovery from Unitarily Invariant Measurements},
  year      = {2020},
  volume    = {66},
  number    = {1},
  pages     = {368-386},
  doi       = {10.1109/TIT.2019.2947058},
  title = {Rigorous
      Dynamics of Expectation-Propagation-Based Signal Recovery
      from Unitarily Invariant Measurements}
}

标题链接正确,但转换为句子大小写似乎仍然不起作用,我不明白为什么,因为现在双花括号不再存在: moewe建议修改后的输出

我使用的模板中可能存在一些设置(托普泰希使用选项tipotesi=scudo),这与 moewe 建议的宏形成对比(关于语言,我可以看到它english默认设置为,所以这应该不是问题)。

编辑2

使用未加星号的命令版本:

\DeclareFieldFormat
 [article,inbook,incollection,inproceedings,patent,thesis,unpublished]{titlecase:title}{\MakeSentenceCase{#1}}

给出了所需的输出(我不知道为什么):

使用无星号命令的输出

答案1

这里有两个问题。但在开始之前,请允许我指出,到目前为止添加到最小示例文档中的代码不会重现问题中显示的输出,因此请谨慎对待。

  1. 标准biblatex样式默认不将句子大小写应用于标题。

    因此,如果你想要句子大小写,你需要提出要求。通常,这是通过

    \DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}
    

    然而,这种方法的缺点是,它将句子大小写应用于全部类似标题的字段。这通常不是人们想要的(因为期刊和书名通常也应该保留大写)。

    如果你想要一个更细粒度的方法,你可以使用我的biblatex-ext包的样式,例如你可以使用

    \DeclareFieldFormat
      [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
      {titlecase:title}{\MakeSentenceCase*{#1}}
    

    仅对参考书目中通常用引号显示的标题应用句子大小写。

  2. 但是,在您的示例中,这还不够。括号中的括号\href{<link>}{<title text>}“保护”了<title text>大小写转换,使其符合“通常”的 BibTeX 大小写转换规则biblatex。请参阅BibTeX 在创建 .bbl 文件时丢失大写字母Bibtex 中“标题大小写”的实现在参考书目数据库中存储标题时,应使用什么大小写?

    我认为解决此问题的正确方法是删除\href标题字段并让其biblatex自动链接标题。您可以使用类似以下代码biblatex:使标题超链接到 DOI、URL 或 ISBN才能让它发挥作用。

总共你将获得

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber,
  style=ext-numeric-comp,
  sorting=none,
  maxbibnames=6,
  firstinits=true,
  date=year,
  eprint=false,
  url=false,
  doi=false,
  natbib,
]{biblatex} 
\usepackage[colorlinks]{hyperref}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {titlecase:title}{\MakeSentenceCase*{#1}}

\newbibmacro{string+doiurlisbn}[1]{%
  \iffieldundef{doi}{%
    \iffieldundef{url}{%
      \iffieldundef{isbn}{%
        \iffieldundef{issn}{%
          #1%
        }{%
          \href{http://books.google.com/books?vid=ISSN\thefield{issn}}{#1}%
        }%
      }{%
        \href{http://books.google.com/books?vid=ISBN\thefield{isbn}}{#1}%
      }%
    }{%
      \href{\thefield{url}}{#1}%
    }%
  }{%
    \href{http://doi.org/\thefield{doi}}{#1}%
  }%
}

\DeclareFieldFormat{title}{\usebibmacro{string+doiurlisbn}{\mkbibemph{#1}}}
\DeclareFieldFormat[article,incollection]{title}{%
  \usebibmacro{string+doiurlisbn}{\mkbibquote{#1}}}

\begin{filecontents}{\jobname.bib}
@article{10.1093/imaiai/iat004,
  author    = {Javanmard, Adel and Montanari, Andrea},
  journal   = {Information and Inference: A Journal of the IMA},
  volume    = {2},
  number    = {2},
  pages     = {115-144},
  year      = {2013},
  month     = {12},
  issn      = {2049-8764},
  doi       = {10.1093/imaiai/iat004},
  url       = {https://doi.org/10.1093/imaiai/iat004},
  eprint    = {https://academic.oup.com/imaiai/article-pdf/2/2/115/1958160/iat004.pdf},
  title     = {State evolution for general approximate message passing
               algorithms with applications to spatial coupling},
}
@article{8866740,
  author    = {Takeuchi, Keigo},
  journal   = {IEEE Transactions on Information Theory},
  year      = {2020},
  volume    = {66},
  number    = {1},
  pages     = {368-386},
  doi       = {10.1109/TIT.2019.2947058},
  title     = {Rigorous Dynamics of Expectation-Propagation-Based Signal Recovery
               from Unitarily Invariant Measurements},
}

\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,10.1093/imaiai/iat004,8866740,springer}

\printbibliography
\end{document}

“K. Takeuchi。‘基于期望传播的酉不变测量信号恢复的严格动力学’。在:IEEE 信息理论汇刊 66.1 (2020),第 368-386 页。”带有链接标题。

相关内容