biblatex
这也许是一个肮脏的黑客行为,但我用 手动重新定义了“编辑器”字符串\DefineBibliographyStrings{nynorsk}{editor = {(styr\adddot)}}
,这将为我提供“编辑器”的挪威语单词和该单词周围的括号。
不过,有了括号,我觉得编辑器名称后面就没有必要加逗号了。同样的问题之前也问过,但是接受的解决方案对我来说没有任何改变(请参阅下面的 MWE)。
我的问题是,如何删除编辑器名称后的逗号?
\documentclass{article}
\usepackage[style = authoryear-comp, sorting = nyt, language = nynorsk, sortlocale = nn_NO, backend = biber]{biblatex}
\usepackage{xpatch}
\xpatchbibmacro{date+extradate}{\printtext[parens]}{\setunit*{\addperiod\space}\printtext}{}{} % remove parenthesis around year in bibliography
\xpatchbibmacro{bbx:editor}{\addcomma\space}{\addspace}{}{} % <- this doesn't change anything
\DefineBibliographyStrings{nynorsk}{editor = {(styr\adddot)}}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{ordbogoverdetdanskesprog,
TITLE = "Ordbog over det danske sprog",
YEAR = "1919--56",
EDITOR = "H. Juul-Jensen",
LOCATION = "K{\o}benhavn",
PUBLISHER = "Gyldendal"}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
答案1
编辑器名称和类型字符串之间的标点符号由上下文相关的分隔符控制editortypedelim
。
用字段格式在编辑器类型字符串两边添加括号更加符合习惯editortype
。
MWE还重新定义了“翻译”的对应词。
\documentclass{article}
\usepackage[backend = biber,
style = authoryear-comp,
language = nynorsk, sortlocale = nn_NO]{biblatex}
\DefineBibliographyStrings{nynorsk}{editor = {styr\adddot}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\usepackage{xpatch}
\xpatchbibmacro{date+extradate}
{\printtext[parens]}
{\setunit*{\addperiod\space}\printtext}
{}{}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{ordbogoverdetdanskesprog,
title = {Ordbog over det danske sprog},
date = {1919/1956},
editor = {H. Juul-Jensen},
editora = {Verner Dahlerup},
editoratype = {founder},
location = {København},
publisher = {Gyldendalske boghandel. Nordisk forlag},
volumes = {28},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
有biblatex-ext
一种更简单的方法可以去掉年份周围的括号,请参见如何(正确地)删除 authoryear 样式中年份周围的括号?(v3)。