正确处理(大写)biblatex 中的荷兰语 van

正确处理(大写)biblatex 中的荷兰语 van

我正在尝试设置处理荷兰语前缀的正确方法,到目前为止,我在 Tex.SE 上找到的解决方案均无法提供可行的答案biblatex

一般认为,荷兰语前缀在作为全名的一部分时应小写,在仅给出姓氏时应大写。在书目中,应按删除前缀的方式对名称进行排序。

这是我当前的 MWE:

\documentclass{article}

\usepackage[style=verbose]{biblatex}

\makeatletter
    \AtBeginDocument{\toggletrue{blx@useprefix}} 
    \AtBeginBibliography{\togglefalse{blx@useprefix}}
\makeatother

\begin{filecontents}{biblio.bib}
    @article{BAN1,
        title = {Gas and Smoke in Interstellar Space},
        author = {Oort, Jan and van de Hulst, Henk},
        journaltitle = {Bulletin of the Astronomical Institutes of the Netherlands},
        volume = 10,
        number = 376,
        year = 1946
    }
\end{filecontents}
\bibliography{biblio}
\begin{document}
First citation.: \cites{BAN1}

Second citation: \cites{BAN1}
\printbibliography
\end{document}

这对于第一个引文和参考书目来说是正确的,但对于第二个引文来说却不正确,因为它给出的是“Oort and van der Hulst”,而不是“Oort and Van der Hulst”

我尝试使用

\makeatletter 
     \AtBeginDocument{
         \toggletrue{blx@useprefix} 
         \renewcommand*{\mkbibnameprefix}[1]{\MakeCapital{#1}}} 
     \AtBeginBibliography{ 
         \togglefalse{blx@useprefix} 
         \renewcommand*{\mkbibnameprefix}[1]{#1}}
\makeatother

但是第一次引用时,它给出的是“Henk Van de Hulst”,而不是“Henk van de Hulst”。有没有一种解决方案,只在只给出姓氏时才将前缀大写(这基本上只适用于之前已经引用过参考文献的情况)。

答案1

如果想要完全正确地理解这一点,可能就必须检查我们处理的是荷兰名字还是德国名字(在德语中,只有在句首将“van”或“von”大写)。

不幸的是,从概念上来说,最合理的解决方案需要一些代码

\documentclass{article}

\usepackage[style=verbose]{biblatex}

\AtBeginDocument{\toggletrue{blx@useprefix}} 
\AtBeginBibliography{\togglefalse{blx@useprefix}}

\renewbibmacro*{name:family}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \mkbibcompletenamefamily{%
       \ifdefvoid{#3}
         {}
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot
          \ifprefchar{}{\bibnamedelimc}}%
       \mkbibnamefamily{#1}\isdot}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibcompletenamefamily{%
       \mkbibnamefamily{#1}\isdot}}}%

\renewbibmacro*{name:family-given}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \mkbibcompletenamefamilygiven{%
       \ifdefvoid{#3}
         {}
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot
          \ifprefchar{}{\bibnamedelimc}}%
       \mkbibnamefamily{#1}\isdot
       \ifdefvoid{#4}
         {}
         {\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
       \ifdefvoid{#2}
         {}
         {\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibcompletenamefamilygiven{%
       \mkbibnamefamily{#1}\isdot
       \ifdefvoid{#4}
         {}
         {\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
       \ifboolexpe{%
         test {\ifdefvoid{#2}}
         and
         test {\ifdefvoid{#3}}}
         {}
         {\revsdnamepunct}%
       \ifdefvoid{#2}
         {}
         {\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
       \ifdefvoid{#3}
         {}
         {\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}}


\begin{filecontents}{\jobname.bib}
@article{BAN1,
  title   = {Gas and Smoke in Interstellar Space},
  author  = {Oort, Jan and van de Hulst, Henk},
  journal = {Bulletin of the Astronomical Institutes of the Netherlands},
  volume  = 10,
  number  = 376,
  year    = 1946
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\null\vfill% just for the example
First citation: \autocite{BAN1}

Second citation: \autocite{BAN1}
\printbibliography
\end{document}

Jan Oort 和 Henk van de Hulst。//Oort 和 Van de Hulst


如果你喜欢更短的代码并且喜欢冒险,

\renewcommand{\mkbibcompletenamefamilygiven}[1]{%
  \ifcapital
    {}
    {\def\mkbibnameprefix{\MakeCapital}}%
  #1}

\let\mkbibcompletenamefamily\mkbibcompletenamefamilygiven

会工作。

请注意,这假设\mkbibnameprefix不应用任何特殊格式。这个想法是重新定义\mkbibnameprefix以将其参数(“van”)大写,如果它尚未按名称格式自动大写。

相关内容