在 biblatex 书目中移动编辑者姓名

在 biblatex 书目中移动编辑者姓名

我正在用传统挪威语写一篇论文,这种语言中不能使用带有明示施动词的被动句。这意味着参考书目中通常的字符串“Edited by X”需要更改为“X edited”。虽然我可以轻松地将字符串“Edited by”更改为正确的挪威语字符串,但似乎在某个地方硬连线了编辑器名称将跟随您提供的任何字符串。因此,它将打印出“Edited X”的等效内容。我的问题是,我该如何更改它,以便编辑器名称出现在动词之前?

\documentclass{article}

\usepackage[citestyle = authoryear-comp, bibstyle = authoryear, abbreviate = false, sorting = nyt, language = nynorsk, sortlocale = nn_NO, backend = biber]{biblatex}
\DefineBibliographyStrings{nynorsk}{%
    bibliography = {Tilvisingar},
    editor = {styrar},
    editors = {styrarar},
    founder = {grunnar},
    founders = {grunnarar},
    references = {Tilvisingar},
    byeditor ={styrde},
    byfounder ={grunnade},
    volume = {band},
    volumes = {band},
    }

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{flo1906,
    AUTHOR = "R. Flo",
    TITLE = "Midlandsmaal",
    YEAR = "1906",
    EDITOR = "Arne Garborg",
    LOCATION = "Kristiania",
    PUBLISHER = "Olaf Norli"}

@BOOK{ordbogoverdetdanskesprog,
    TITLE = "Ordbog over det danske sprog",
    YEAR = "1919--56",
    EDITOR = "H. Juul-Jensen",
    EDITORA = "Verner Dahlerup",
    EDITORATYPE = "founder",
    LOCATION = "K{\o}benhavn",
    PUBLISHER = "Gyldendalske boghandel. Nordisk forlag",
    VOLUMES = "28"}

\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}

\nocite{*}
\printbibliography

\end{document}

在此处输入图片描述

答案1

不幸的是,biblatex的本地化界面根本无法处理这种需要改变 bibstring 位置的情况。

在某些时候,我们必须考虑重新设计本地化界面,使其更加灵活,并允许它支持更多语言(尤其是非西方语言)。

目前我所能提供的只是重新定义宏来移动字符串by...。我希望我抓住了所有必要的宏。

\documentclass{article}

\usepackage[backend=biber,
  style=authoryear-comp,
  abbreviate=false,
  language=nynorsk,
  sortlocale=nn_NO]{biblatex}

\DefineBibliographyStrings{nynorsk}{
  bibliography = {Tilvisingar},
  editor       = {styrar},
  editors      = {styrarar},
  founder      = {grunnar},
  founders     = {grunnarar},
  references   = {Tilvisingar},
  byeditor     = {styrde},
  byfounder    = {grunnade},
  volume       = {band},
  volumes      = {band},
}

\renewbibmacro*{byauthor}{%
  \ifboolexpr{
    test \ifuseauthor
    or
    test {\ifnameundef{author}}
  }
    {}
    {\printnames[byauthor]{author}%
     \setunit{\addspace}%
     \usebibmacro{bytypestrg}{author}{author}}}

\newbibmacro*{byeditorx:i}[1]{%
  \ifnameundef{#1}
    {}
    {\printnames[by#1]{#1}%
     \setunit{\addspace}%
     \usebibmacro{bytypestrg}{#1}{editor}%
     \newunit}}

\renewbibmacro*{byeditor}{%
  \usebibmacro{byeditorx:i}{editor}%
  \usebibmacro{byeditorx}}

\renewbibmacro*{byeditorx}{%
  \usebibmacro{byeditorx:i}{editora}%
  \usebibmacro{byeditorx:i}{editorb}%
  \usebibmacro{byeditorx:i}{editorc}}

\renewbibmacro*{bytranslator}{%
  \ifnameundef{translator}
    {}
    {\printnames[bytranslator]{translator}%
     \setunit{\addspace}%
     \bibstring{bytranslator}}}

\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
     \setunit{\addspace}%
     \usebibmacro{byeditor+othersstrg}%
     \clearname{editor}%
     \newunit}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

\renewbibmacro*{bytranslator+others}{%
  \ifnameundef{translator}
    {}
    {\printnames[bytranslator]{translator}%
     \setunit{\addspace}%
     \usebibmacro{bytranslator+othersstrg}%
     \clearname{translator}%
     \newunit}%
  \usebibmacro{withothers}}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{flo1906,
  author    = {R. Flo},
  title     = {Midlandsmaal},
  year      = {1906},
  editor    = {Arne Garborg},
  location  = {Kristiania},
  publisher = {Olaf Norli},
}
@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}

弗洛,R.(1906 年)。米德兰兹马尔。阿恩·加博格 (Arne Garborg) 风格。克里斯蒂安尼亚:奥拉夫·诺利 (Olaf Norli)。//Juul-Jensen,H.,作家 (1919–1956)。丹麦孩子被虐待。 Verner Dahlerup 拱门。 28 乐队。哥本哈根: Gyldendalske boghandel。诺德士倒闭了。

答案2

另一种可能性:

\documentclass{article}

\usepackage[citestyle = authoryear-comp, bibstyle = authoryear, abbreviate = false, sorting = nyt, language = nynorsk, sortlocale = nn_NO, backend = biber]{biblatex}
\DefineBibliographyStrings{nynorsk}{%
    bibliography = {Tilvisingar},
    editor = {styrar},
    editors = {styrarar},
    founder = {grunnar},
    founders = {grunnarar},
    references = {Tilvisingar},
    byeditor ={styrde},
    byfounder ={grunnade},
    volume = {band},
    volumes = {band},
    }

%\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{flo1906,
    AUTHOR = "R. Flo",
    TITLE = "Midlandsmaal",
    YEAR = "1906",
    EDITOR = "Arne Garborg",
    LOCATION = "Kristiania",
    PUBLISHER = "Olaf Norli"}

@BOOK{ordbogoverdetdanskesprog,
    TITLE = "Ordbog over det danske sprog",
    YEAR = "1919--56",
    EDITOR = "H. Juul-Jensen",
    EDITORA = "Verner Dahlerup",
    EDITORATYPE = "founder",
    LOCATION = "K{\o}benhavn",
    PUBLISHER = "Gyldendalske boghandel. Nordisk forlag",
    VOLUMES = "28"}

\end{filecontents*}
\addbibresource{\jobname.bib}

\renewbibmacro*{byeditor+others}{%
 \ifnameundef{editor}
 {}
 {%
 \setunit{\addspace}%
 \printnames[byeditor]{editor}%
 \clearname{editor}%
 \addspace
 \usebibmacro{byeditor+othersstrg}
 \newunit}%
 \usebibmacro{byeditorx}%
 \usebibmacro{bytranslator+others}}

\begin{document}

\nocite{*}
\printbibliography

\end{document} 

在此处输入图片描述

相关内容