biblatex
本问题是关于如何调整默认值以符合传统挪威语的系列问题的第三部分(在 biblatex 书目中移动编辑者姓名,在 biblatex 中将“inbook”条目的作者视为“incollection”条目的编辑者),但这个问题仍然与我之前的问题无关。
传统挪威语不使用拉丁名称来表示月份,而是使用序数词(在 \today 命令中更改月份名称)。当这些序数词在日期表达式中缩写时,我们只使用数字。例如,“i fyrste”(代表“January”)缩写为“1”。
那么,在以下 MWE 中,期望的结果将是
1961 年 9 月 4 日
而不是实际生产的
1961 年 9 月 4 日至 9 日
由于所需的字符串不仅仅是放入另一个单词sep.
,因此需要一个比仅仅设置更精致的解决方案\DefineBibliographyStrings{nynorsk}{september={<string>}}
\documentclass{article}
\usepackage[backend=biber,
style = authoryear-comp,
language = nynorsk,
sortlocale = nn_NO]{biblatex}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DefineBibliographyStrings{nynorsk}{
editor = {styr\adddot},
editors = {styr\adddot},
references = {Tilvisingar}}
\begin{filecontents*}{\jobname.bib}
@PROCEEDINGS{aalto1962,
EDITOR = "Antti Sovij{\"a}rvi and Pentti Aalto",
TITLE = "Proceedings of the fourth international congress of phonetic sciences",
YEAR = "1962",
EVENTDATE = "1961-09-04/1961-09-09",
LOCATION = "The Hague",
NUMBER = "10",
PUBLISHER = "Mouton \& Co",
SERIES = "Janua linguarum. Studia memoriae Nicolai van Wijk dedicata. Series maior",
VENUE = "University of Helsinki"}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
答案1
默认情况下biblatex
,大多数日期的格式为comp
,该格式使用长月份名称和压缩范围。对于完整的数字日期,terse
是正确的选择。然后,MWE 中的语言设置将产生
对于确切所需的格式,\mkbibdateshort
需要重新定义。
\documentclass{article}
\usepackage[backend=biber,
style = authoryear-comp,
alldates=terse, labeldate=year,
language = nynorsk,
sortlocale = nn_NO]{biblatex}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DefineBibliographyExtras{norsk}{%
\protected\def\mkbibdateshort#1#2#3{%
\iffieldundef{#3}
{}
{\thefield{#3}%
\iffieldundef{#2}{}{\slash}}%
\iffieldundef{#2}
{}
{\thefield{#2}%
\iffieldundef{#1}{}{\slash}}%
\iffieldbibstring{#1}
{\bibstring{\thefield{#1}}}
{\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
}
\DefineBibliographyStrings{nynorsk}{
editor = {styr\adddot},
editors = {styr\adddot},
references = {Tilvisingar}}
\begin{filecontents*}{\jobname.bib}
@PROCEEDINGS{aalto1962,
EDITOR = "Antti Sovij{\"a}rvi and Pentti Aalto",
TITLE = "Proceedings of the fourth international congress of phonetic sciences",
YEAR = "1962",
EVENTDATE = "1961-09-04/1961-09-09",
LOCATION = "The Hague",
NUMBER = "10",
PUBLISHER = "Mouton \& Co",
SERIES = "Janua linguarum. Studia memoriae Nicolai van Wijk dedicata. Series maior",
VENUE = "University of Helsinki"}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}