如何关闭 bibstyle 'univie-ling' 的句子大小写

如何关闭 bibstyle 'univie-ling' 的句子大小写

我想使用biblatexstyle univie-ling,它会自动将标题设置为句子大小写。但是,由于我已经使用 JabRef 在外部管理条目的大小写一段时间了,所以我通常希望保留 bibstyles 来设置大小写。手动保护所有标题{}不是一个选择,因为 (a) 它也会阻止 JabRef 执行其操作,并且 (b) 我的 .bib 此时太大了。

正如其他帖子所建议的那样(例如这里),我尝试使用关闭该功能\DeclareFieldFormat{titlecase}{#1},但这并没有改变输出:

在此处输入图片描述

我不太熟悉 bibstyles 使用的语法,但我需要推翻的似乎是第 582 行univie-ling.bbx

\DeclareFieldFormat[article,book,mvbook,inbook,collection,mvcollection,incollection,inproceedings,thesis,unpublished]{titlecase}{\MakeSentenceCase*{#1}}%

通过注释此行,我能够实现所需的结果,并且保持 .bib 文件中的案例不变,

在此处输入图片描述

但除了创建我自己的风格之外,我还在尝试寻找一种侵入性较小(并且抗更新)的解决方案来解决这个问题。

平均能量损失

\documentclass{scrbook}
\begin{filecontents}{test.bib}
    @BOOK{colu92,
        AUTHOR = {Christopher Columbus},
        TITLE = {How I Discovered {America}},
        YEAR = {1492},
        PUBLISHER = {Hispanic Press},
        ADDRESS = {Barcelona}
    }
    @ARTICLE{gree00,
        AUTHOR = {R. J. Green and U. P. Fred and W. P. Norbert},
        TITLE = {Things that Go Bump in the Night},
        YEAR = {1900},
        JOURNAL = {Psych. Today},
        VOLUME = {46},
        PAGES = {345-678}
    }
    @ARTICLE{phil99,
        AUTHOR = {T. P. Phillips},
        TITLE = {Possible Influence of the Magnetosphere on {American} History},
        YEAR = {1999},
        JOURNAL = {J. Oddball Res.},
        VOLUME = {98},
        PAGES = {1000-1003}
    }
    @ARTICLE{jame76,
        AUTHOR = {Kelly James and Harris, Jr., George and Wilby Wollops},
        TITLE = {{American} Independence and Magnetism},
        YEAR = {1776},
        JOURNAL = {Revol. Tracts},
        VOLUME = {32},
        PAGES = {34-55}
    }
\end{filecontents}

\usepackage[%
    backend=biber,%
    style=univie-ling,%
]{biblatex}

\addbibresource{test.bib}

\DeclareFieldFormat{titlecase}{#1} % should turn-off sentence casing
% but here this line doesn't change the result

\begin{document}
    \nocite{*}
    \printbibliography
\end{document}

答案1

univie-ling使用特定类型的字段格式进行句子大小写

\DeclareFieldFormat[article,book,mvbook,inbook,collection,mvcollection,incollection,inproceedings,thesis,unpublished]{titlecase}{\MakeSentenceCase*{#1}}%

(尽管这适用于几乎所有常见的条目类型,除了@online)。

这意味着你需要用你自己的特定类型的定义来反驳这个定义

\DeclareFieldFormat[article,book,mvbook,inbook,collection,mvcollection,incollection,inproceedings,thesis,unpublished]{titlecase}{#1}%

univie-ling如果改变其类型列表,这会变得很长并且可能容易出错。

一个更简单的替代方法是使用带星号的版本,它会先清除所有特定于类型的设置

\DeclareFieldFormat*{titlecase}{#1}

有关类型特定格式的更多详细信息,请参阅从样式中删除引号

\documentclass{scrbook}
\usepackage[
  backend=biber,
  style=univie-ling,
]{biblatex}

\DeclareFieldFormat*{titlecase}{#1}

\begin{filecontents}{\jobname.bib}
@BOOK{colu92,
  AUTHOR    = {Christopher Columbus},
  TITLE     = {How {I} Discovered {America}},
  YEAR      = {1492},
  PUBLISHER = {Hispanic Press},
  ADDRESS   = {Barcelona},
}
@ARTICLE{gree00,
  AUTHOR  = {R. J. Green and U. P. Fred and W. P. Norbert},
  TITLE   = {Things that Go Bump in the Night},
  YEAR    = {1900},
  JOURNAL = {Psych. Today},
  VOLUME  = {46},
  PAGES   = {345-678},
}
@ARTICLE{phil99,
  AUTHOR  = {T. P. Phillips},
  TITLE   = {Possible Influence of the Magnetosphere on {American} History},
  YEAR    = {1999},
  JOURNAL = {J. Oddball Res.},
  VOLUME  = {98},
  PAGES   = {1000-1003},
}
@ARTICLE{jame76,
  AUTHOR  = {Kelly James and Harris, Jr., George and Wilby Wollops},
  TITLE   = {{American} Independence and Magnetism},
  YEAR    = {1776},
  JOURNAL = {Revol. Tracts},
  VOLUME  = {32},
  PAGES   = {34-55},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

我如何发现美洲。

相关内容