在 biblatex 中,将标题句改为大写,但不将期刊名称改为大写

在 biblatex 中,将标题句改为大写,但不将期刊名称改为大写

为了强制参考标题采用句子大小写,我在.bbx样式文件中使用了以下行:

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

但这也会导致期刊名称以句子大小写形式显示,这是不受欢迎的。
为什么会这样?我该如何避免这种情况?

一个简单的例子:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{ref1,
  author = {Doe, J. and Dane, D., and Dewy, R.},
  year = {2000},
  title = {This and That},
  journal = {Journal of Deep Understanding of Things},
}

@article{ref2,
  author = {Doe, J. and Dewy, D., and Dane, R.},
  year = {2000},
  title = {The Other},
  journal = {Journal of deep understanding of things},
}
\end{filecontents}

\usepackage[style=authoryear-comp,natbib=true, 
    maxcitenames = 2, 
    mincitenames = 1, 
    firstinits = true,
    labelyear=true,  
    uniquename=false, 
    uniquelist=false,
    terseinits = false,
    backend=biber]{biblatex}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{titlecase}{\MakeSentenceCase*{#1}}
\addbibresource{\jobname.bib}

\begin{document}

Some text and a ref \citep{ref1}.
Then another ref with same first author and year \citep{ref2}

\printbibliography

\end{document}

给出:

是

代替:

在此处输入图片描述

答案1

用于打印期刊信息的 bibmacro 的原始定义是

\newbibmacro*{journal}{%
  \iffieldundef{journaltitle}
    {}
    {\printtext[journaltitle]{%
       \printfield[titlecase]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{journalsubtitle}}}}

因此该指令也会影响期刊标题。解决方案是修改bib 宏\DeclareFieldFormat[article]{titlecase}{\MakeSentenceCase*{#1}}的定义journal

\newbibmacro*{journal}{%
  \iffieldundef{journaltitle}
    {}
    {\printtext[journaltitle]{%
       \printfield[myplain]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[myplain]{journalsubtitle}}}}

我们可以在其中定义myplain仅产生未格式化的值的字段格式。

\DeclareFieldFormat{myplain}{#1}

在此处输入图片描述

答案2

如果您尝试获取 IEEE 样式,则可能需要使用以下设置(细节):

\usepackage[
bibstyle=ieee,% IEEE citation style
citestyle=numeric-comp,% citing multiple papers will produce format similar to [2,4-8,12] instead of [2,4,5,6,7,8,12] (optional) 
sorting=none,
backend=biber,
maxnames=100,% show up to 100 authors per author in the bibliography (optional)
isbn=false,url=false,doi=false% remove extra info (optional)
] {biblatex}

它会产生预期的结果,但也可能会修改其他事物。

答案3

如图所示biblatex 中标题的句子大小写我的包中的样式biblatex-ext可以更精细地控制特定字段的标题大小写。如果您只想对大小写titles 进行句子处理,而不想journal(title)booktitles @article@inbooks、@incollections 及其同类进行句子处理,则可以使用字段格式titlecase:title

\documentclass{article}

\usepackage[style=ext-authoryear-comp,
    backend=biber]{biblatex}

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

\begin{filecontents}[force]{\jobname.bib}
@article{ref1,
  author  = {Doe, J. and Dane, D. and Dewy, R.},
  year    = {2000},
  title   = {This and That},
  journal = {Journal of Deep Understanding of Things},
}
@article{ref2,
  author  = {Doe, J. and Dewy, D. and Dane, R.},
  year    = {2000},
  title   = {The Other},
  journal = {Journal of deep understanding of things},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Some text and a ref \autocite{ref1}.
Then another ref with same first author and year \autocite{ref2}

\printbibliography

\end{document}

Doe, J.、D. Dewy 和 R. Dane (2000)。“这和那”。刊于:《深层理解事物杂志》。//Doe, J.、D. Dewy 和 R. Dane (2000)。“其他”。刊于:《深层理解事物杂志》。

相关内容