1

I am adapting biblatex to Basque. In this language, some elements need their identification string after the value of the field. For example

Ed. by Big Publisher Company

should read

Big Publisher Company-(a)k argit.

I found the way to translate Ed. by (I am creating a basque.ldx to be shared at some point), but I haven't figured out how to "reverse" the ordering of field values and strings. (Not all fields and orderings should be changed.)

  • I've taken the liberty of streamlining some of your posting. Feel free to revert. – Mico Mar 3 '17 at 9:11
  • Currently that is really hard. The .lbx and all other code (.bbx, .cbx) is set up in a way that assumes that the bibstring comes before the editor name. It would probably have been better to create the bibstrings in such a way that 'variables' (such as names) can be placed freely within them, but it seems much too late for that now, a major overhaul of all the code would be needed to get that now. So the 'best' way is to change all the relevant macros. That will involve quite bit of code and not a lot of fun. – moewe Mar 3 '17 at 13:03
1

Let's have a look at how byeditor is used. In biblatex.def we have

\newbibmacro*{byeditor}{%
  \ifnameundef{editor}
    {}
    {\usebibmacro{bytypestrg}{editor}{editor}%
     \setunit{\addspace}%
     \printnames[byeditor]{editor}%
     \newunit}%
  \usebibmacro{byeditorx}}

So \usebibmacro{bytypestrg}{editor}{editor} is called right before the actual editor name is printed with \printnames[byeditor]{editor}.

bytypestring is defined as

\newbibmacro*{bytypestrg}[2]{%
  \iffieldundef{#1type}
    {\bibstring{by#2}}
    {\ifbibxstring{by\thefield{#1type}}
       {\bibstring{by\thefield{#1type}}}
       {\printtext{\thefield{#1type}}}}}

so it just gets us the right byeditor(s) strings here (if editorytpe doesn't ask for anything else).

Since things are set up in exactly this way for all other names as well that means that with standard biblatex the by-string will always appear before the name. There is no way for the .lbx to change that with .lbx-specific methods. And all .lbx files are set up in a way that assumes that the by... strings always come directly before the name. See also BibLaTeX customisation: Pages prefix to suffix

You would have to redefine all these by... macros to move \usebibmacro{bytypestrg}{editor}{editor}:

\renewbibmacro*{byeditor}{%
  \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
     \usebibmacro{bytypestrg}{editor}{editor}%
     \newunit}%
  \usebibmacro{byeditorx}}

In principle, this can be done from within a .lbx file, but it takes many lines of code to redefine all macros involved.

In an ideal world, bibstrings would probably contain 'dummy' variables that can be placed freely within the string so as to allow any order of name and additional text. Unfortunately, the strings are not set up this way at the moment, and switching to that model would require a new implementation of bibstrings, a major overhaul of all .lbx files and all style files (standard as well as custom styles). This would probably break backwards compatibility in all ways possible.

| improve this answer | |
  • I changed all the macros with "editor" word, until changing byeditor+others worked! – TeXtnik Apr 22 '17 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.