5

I'm writing a paper in traditional Norwegian, in which language you can't have a passive sentence with an expressed agent. This means that the usual string "Edited by X" in the bibliography needs to be changed into "X edited". Although I can easily change the string "Edited by" into the proper Norwegian string, it seems to be hardwired somewhere that the editor name will follow whatever string you give it. As a result, it will print the equivalent of "Edited X". My question is, how can I change this so that the editor name appears before the verb?

\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}

enter image description here

Sverre
  • 20,729

2 Answers2

3

Unfortunately, biblatex's localisation interface is simply not equipped to deal with situations like this where the location of the bibstring needs to change.

At some point we will have to think about reworking the localisation interface to be more flexible and to allow it to support more languages (especially those of a non-Western variety).

For now all I can offer are redefinitions of the macros to move around the by... strings. I hope I caught all necessary macros.

\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}

Flo, R. (1906). Midlandsmaal. Arne Garborg styrde. Kristiania: Olaf Norli.//Juul-Jensen, H., styrar (1919–1956). Ordbog over det danske sprog. Verner Dahlerup grunnade. 28 band. København: Gyldendalske boghandel. Nordisk forlag.

moewe
  • 175,683
  • I have a follow-up question at https://tex.stackexchange.com/questions/511429/treat-author-of-inbook-entry-as-editor-of-incollection-entry-in-biblatex – Sverre Oct 08 '19 at 14:53
1

Another possibility:

\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} 

enter image description here

moewe
  • 175,683
Bernard
  • 271,350
  • 1
    Note that this does not catch editora and friends (see Verner Dahlerup; that's why my answer is so much longer: it tries to account for all similar cases). It is also not recommended to have bare \addspaces without an enclosing \setunit in a bibmacro. The \setunit{\addspace} before the \printnames[byeditor]{editor} seems unnecessary. – moewe Oct 05 '19 at 19:29
  • Yes, I made my answer as short as possible, as I don't really master all details of biblatexI didn't know about \addspace. I added it after I noted there was no space between the editor name and the norwegian version of ‘edited by’. Thanks for the information anyway! – Bernard Oct 05 '19 at 20:34