[Tex/LaTex] German APA reference: origyear field is incomplete (needs reprinttitle)

apa-stylebiblatex

I use LuaTeX, BibLaTeX and biber with APA bibliography style. The German version has the origyear field wrong.

The original english APA version wants it like this:

Author (Year). Title. Location: Publisher. (Original
work published original year)

The German version is the same, just "Original work published is replaced by "Original erschienen" which is fine. But according to the adjusted version by the German DGP the rest should look like this:

Author (Year). Title. Location: Publisher. (Original erschienen
original year: original title)

But we can't even use the origtitle field and just move it around. Because the origtitle field is a field for the title when the title field is already used for a self-made translation of the title. Imagine the following case:

Smith, A. (1990). L'amour [Die Liebe]. Paris: Alfons. (Original
erschienen 1988: Love).

So we have a French translation of an originally English book and we give a German translation so everybody understands it. title field is for our translation "Die Liebe", origtitle is for the title of the translated work "L'amour" so we need another field for the title of the original work "Love". This can't be appended to origyear because we need origyear seperately when we cite it like this: Smith (1988/1990).

We would need something like a origwork field which is appended to the origyear and also very flexible because if the original work has slightly different authors (what the heck??) DGP turns it into:

Zimbardo, P. G. & Gerrig, R. J. (2004). … (Original erschienen 2002 als Gerrig, R. J. & Zimbardo, P. G., Psychology and life)

And DGP is also a little inconsistent. There can be found:

(Original erschienen 1988: Love)

and

(Original erschienen 1988, Love)

Anyway, does anybody know how to implement this in the german-apa.lbx? I wouldn't even know where to start …

EDIT:

Thanks alot Guido, that's almost what I need.

It's a little bit messed up though. This shifts everything around. There is no need for that. title, subtitle and origtitle should stay in place. We just need an additional field. We can't use titleaddon for that because this is put in square brackets (we couldn't use title/subtitle either because it's in italics but shouldn't be if used as title of an original work). We would just need another field origwork.

Here is what I got so far:

\documentclass{scrbook}
\usepackage[american,english,ngerman]{babel}
\usepackage[style=apa,backend=biber,bibencoding=utf8,babel=other]{biblatex}
\usepackage[autopunct=true,autostyle=true,german=guillemets,english=american]{csquotes}
\bibliography{test.bib}        
\DeclareLanguageMapping{american}{american-apa}
\DeclareLanguageMapping{ngerman}{ngerman-apa}

\begin{filecontents}{biblatex-dm.cfg}
    \DeclareDatamodelFields[type=list, datatype=name,skipout=false]{origauthor}
    \DeclareDatamodelEntryfields{origauthor}
    \DeclareDatamodelFields[type=field, datatype=literal,skipout=false]{origwork}
    \DeclareDatamodelEntryfields{origwork} 
    \end{filecontents}

    \DeclareFieldFormat{origyear}{%
     \mkbibparens{\bibcpstring{origyear}~\thefield{origyear}%
     \ifnameundef{origauthor}
       {}
       {\addspace als \printnames[author]{origauthor}}%
     \iffieldundef{origwork}
       {}%
       {\ifnameundef{origauthor}
         {\setunit{\addcolon\addspace}}
         {\setunit{\addcomma\addspace}}%
         \printfield{origwork}}}%
     }

    \renewbibmacro*{origyear}{%
      \ifthenelse{
          \NOT\iffieldsequal{labelyear}{origdateyear}
        \OR
          \NOT\iffieldsequal{title}{origwork}
        \OR
          \NOT\ifnamesequal{author}{origauthor}
        }
        {\printfield{origyear}}
        {}%
    }

\begin{document}
\textcite{testentry}
\printbibliography 
\end{document}

test.bib:

@BOOK{testentry,
  author = {Adam Smith},
  title = {Die Liebe},
  origtitle = {L'amour},
  location = {Paris},
  publisher = {Alfons},
  date = {1994},
  origdate = {1988},
  origauthor = {Adam Smith-Degen},
  origwork = {Love},
  hyphenation = {ngerman},
}

EDIT 2:

I see now, you have turned everything upside down so it fits its semantic purpose. And biblatex-apa is a little inconsistent using title for title but using origtitle for title if there is a selfmade translation which is filled in as title. Anyway this is what everyone is using right now. We can just add up missing pieces using unused fields. Here is my try with reprinttitle:

\documentclass{scrbook}
\usepackage[american,english,ngerman]{babel}
\usepackage[style=apa,backend=biber,bibencoding=utf8,babel=other]{biblatex}
\usepackage[autopunct=true,autostyle=true,german=guillemets,english=american]{csquotes}
\bibliography{test.bib}        
\DeclareLanguageMapping{american}{american-apa}
\DeclareLanguageMapping{ngerman}{ngerman-apa}

\DeclareFieldFormat{origyear}{%
 \mkbibparens{\bibcpstring{origyear}~\thefield{origyear}%
 \ifnameundef{origauthor}
   {}
   {\addspace als \printnames[author]{origauthor}}%
 \iffieldundef{reprinttitle}
   {}%
   {\ifnameundef{origauthor}
     {\setunit{\addcolon\addspace}}
     {\setunit{\addcomma\addspace}}%
     \printfield{reprinttitle}}}%
 }

\renewbibmacro*{origyear}{%
  \ifthenelse{
      \NOT\iffieldsequal{labelyear}{origdateyear}
    \OR
      \NOT\iffieldsequal{title}{reprinttitle}
    \OR
      \NOT\ifnamesequal{author}{origauthor}
    }
    {\printfield{origyear}}
    {}%
}

\begin{document}
\textcite{testentry}
\printbibliography 
\end{document}

test.bib:

@BOOK{testentry,
  author = {Adam Smith},
  title = {Die Liebe},
  subtitle = {in all ihren Formen},
  origtitle = {L'amour},
  location = {Paris},
  publisher = {Alfons},
  date = {1994},
  origdate = {1988},
  origauthor = {Adam Smith},
  titleaddon = {Special issue},
  reprinttitle = {Love},
  hyphenation = {ngerman},
}

Now it looks like:

Smith, A. (1994). L'amour [Die Liebe: in all ihren Formen] [Special
issue]. Paris: Alfons. (Original erschienen 1988 als Smith, A., Love).

Things to do: "als" would also need to be a key that is "als" in a German bibliography and "as" in an English bibliography. The author's name is Surname, F. but should be F. Surname. I would be glad if you could elaborate on that.

Best Answer

For the original question, the modification required is:

\renewbibmacro*{title}{%
  \ifthenelse{\iffieldundef{title}\AND\iffieldundef{subtitle}}
    {}
    {\printtext[title]{%
        \printfield[apacase]{title}%
        \setunit{\subtitlepunct}%
        \printfield[apacase]{subtitle}}%
     \setunit{\addspace}%
     \printfield{titleaddon}%
     \iffieldequalstr{entrytype}{book}%
       {\setunit{\addspace}\usebibmacro{bookaddinfo}}%
       {}%
     \ifthenelse{%
       \ifnameundef{author}\AND%
       \(\ifnameundef{editor}\AND\NOT\boolean{bbx:editorinauthpos}\)\AND%
       \ifnameundef{producer}\AND%
       \ifnameundef{director}\AND%
       \ifnameundef{writer}}
        {\newunit\newblock
         \usebibmacro{labelyear+extrayear}}
        {}}}

\DeclareFieldFormat{origyear}{%
 \mkbibparenss{\bibcpstring{origyear}~\thefield{origyear}%
 \iffieldundef{origtitle}
   {}%
   {\addcolon\addspace\printfield{origtitle}}}%
 }

\newbibmacro*{origyear}{%
  \ifthenelse{
      \NOT\iffieldundef{labelyear}
      \AND\NOT\iffieldsequal{labelyear}{origyear}
    \OR
      \NOT\iffieldsequal{title}{origtitle}}
    {\printfield{origyear}}
    {}%
}

\DefineBibliographyStrings{german}{%
   origyear = {Original erschienen}
} 

This can be inserted in the preamble of your document.

For the extended version one has either to introduce new fields (this can be done,by modifying the data model, or by using the BibLaTeX facilities for related).

EDIT 1 and EDIT 2 To accommodate the case where the author of the original publication is different the first step is to modify the data model, this can be done with:

\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=list, datatype=name,skipout=false]{origauthor}
\DeclareDatamodelEntryfields{origauthor}  
\end{filecontents}

This generates a file called biblatex-dm.cfg in the current directory with the instruction about how to extend BibLaTeX data model.

Notice that BibLaTeX provides a titleaddon field and this could be used to the extra information for the title ("Die Liebe" in the OP).

Eventually, one could add a field titletranslation for the selfmade translation, i.e., one can include the following two lines in the datamodel file.

\DeclareDatamodelField[type=field, datatype=literal,skipout=false]{titletranslation}
\DeclareDatamodelEntryfields{titletranslation}

Another possibility is to use an "unused" field, for example, reprinttitle. In what follow I'm going to use this option.

The next step is to modify the appropriate bibmacros. In this case, title and origyear for the formatting of the title (and related information about the original publication)

\renewbibmacro*{title}{%
  \ifthenelse{\iffieldundef{title}\AND\iffieldundef{subtitle}}
    {}
    {\printtext[title]{%
        \printfield[apacase]{title}%
        \setunit{\subtitlepunct}%
        \printfield[apacase]{subtitle}}%
     \setunit{\addspace}%
     \printfield{titleaddon}%
     \setunit{\addspace}%
     \printfield{reprinttitle}%
     \iffieldequalstr{entrytype}{book}%
       {\setunit{\addspace}\usebibmacro{bookaddinfo}}%
       {}%
     \ifthenelse{%
       \ifnameundef{author}\AND%
       \(\ifnameundef{editor}\AND\NOT\boolean{bbx:editorinauthpos}\)\AND%
       \ifnameundef{producer}\AND%
       \ifnameundef{director}\AND%
       \ifnameundef{writer}}
        {\newunit\newblock
         \usebibmacro{labelyear+extrayear}}
        {}}}

For originyear the first thing to do is to define the format. To this we check that originauthor is defined, and we set the punctuation accordingly:

\DeclareFieldFormat{origyear}{%
 \mkbibparens{\bibcpstring{origyear}~\thefield{origyear}%
 \ifnameundef{origauthor}
   {}
   {\addspace\bibstring{as}\addspace\printnames[FirstLast]{origauthor}}%
 \iffieldundef{origtitle}
   {}%
   {\ifnameundef{origauthor}
     {\setunit{\addcolon\addspace}}
     {\setunit{\addcomma\addspace}}%
     \printfield{origtitle}}}%
 }

Then we have to consider the cases when we have to output the information about the original publication (here the condition is that either the year, or the title, or the author(s) is different).

\renewbibmacro*{origyear}{%
  \ifthenelse{
      \NOT\iffieldsequal{labelyear}{origdateyear}
    \OR
      \NOT\iffieldsequal{title}{origtitle}
    \OR
      \NOT\ifnamesequal{author}{origauthor}
    }
    {\printfield{origyear}}
    {}%
}

Caveat A problem with the above solution is that not all bib entry types include instructions to format the information about the original publication using the above method. A more robust technique would be to use the facilities provided by BibLaTeX to handle related publications.

The last step is to use the appropriate value for the localisation strings origyear and as.

\NewBibliographyString{origyear,as}
\DefineBibliographyStrings{ngerman}{%
   origyear = {Original erschienen},
   as = {als}
} 

\DefineBibliographyStrings{american}{%
   as = {as} 
}  

Finally, to change the rendering of names, we have to modify the formatting instructions for apaauthor

\DeclareNameFormat{FirstLast}{%
 \ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
    {\addcomma\addspace\ldots}
    {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
      {}
      {\iffirstinits
        {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
        {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}}
  \ifmorenames{\andothersdelim\bibstring{andothers}}{}}
Related Question