定制比布拉特克斯风格,我想确保在书名后面只使用一个空格。如果你看一下标准驱动程序之一:
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
将书名部分改为
\usebibmacro{maintitle+title}%
\setunit{\addspace}%
不起作用,因为\newunit
即使没有打印其他字段,各种指令似乎也会覆盖它。“下一个标点符号必须始终只是一个空格”的正确说法是什么?
答案1
根据手册第 4.7.3 节,\nopunct
宏“[a] 添加一个内部标记,这将导致下一个标点符号命令不打印任何内容。”以下似乎有效:
\usebibmacro{maintitle+title}%
\nopunct
答案2
您可以尝试用 替换后面的每一个\newunit
,\setunit*{\newunitpunct}
因为带星号的变体仅在执行了前一个命令( , , , , )\setunit
时才会打印标点符号。虽然我不确定这是否有效,但值得一试。\printtext
\printfield
\printlist
\printnames
\bibstring