3

I am attempting to add an "illustrator" editor type to my reference with little success. I have looked at the answers at:

How to identify Illustrator in bibtex?

Create new editorial role "organizer" in biblatex

I can make my MWE work until I add style=APA to biblatex. At that point the editortype is rendered as typeillustrator. Using other predefined editor types produced similar results.

How can I make the APA bibliography style produce "illustrator" instead of "typeillustrator"?

\documentclass{article}
\usepackage[style=apa, backend=biber]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{mwe.bib}
@Book{jones1886illustrations,
    author     = {Jones, Howard},
    title      = {Illustrations of the nests and eggs of birds of Ohio with text},
    year       = {1886},
    editor     = {Jones, N. E.},
    editortype = {illustrator},
    location   = {Circleville, OH},
}
\end{filecontents}

\addbibresource{mwe.bib}

\NewBibliographyString{illustrator}
\NewBibliographyString{illustrators}
\NewBibliographyString{byillustrator}
\NewBibliographyString{cbyillustrator}

\DefineBibliographyStrings{english}{%
    illustrator    = {illustrator},
    illustrators   = {illustrators},
    byillustrator  = {illustrated by},
    cbyillustrator = {illustr\adddot},
}


\begin{document}
\nocite{*}
\printbibliography
\end{document}

Results:

MWE results

5

The bibstrings that biblatex-apa uses for editortype are called type<editortype> and type<editortype>s, so you have to define those as well.

\documentclass{article}
\usepackage[style=apa, backend=biber]{biblatex}

\NewBibliographyString{illustrator}
\NewBibliographyString{illustrators}
\NewBibliographyString{byillustrator}
\NewBibliographyString{cbyillustrator}
\NewBibliographyString{typeillustrator}
\NewBibliographyString{typeillustrators}

\DefineBibliographyStrings{english}{%
  illustrator      = {illustrator},
  illustrators     = {illustrators},
  typeillustrator  = {illustrator},
  typeillustrators = {illustrators},
  byillustrator    = {illustrated by},
  cbyillustrator   = {illustr\adddot},
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{jones1886illustrations,
  author     = {Jones, Howard},
  title      = {Illustrations of the nests and eggs of birds of {Ohio} with text},
  year       = {1886},
  editor     = {Jones, N. E.},
  editortype = {illustrator},
  location   = {Circleville, OH},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

Jones, H. (1886). Illustrations of the nests and eggs of birds of Ohio with text (N. E. Jones, Illustrator). Circleville, OH.


It is a bit unfortunate that biblatex-apa uses different bibstrings than the standard styles, but given the predefined terms I guess that was done to avoid name clashes with other standard bibstrings (there are typevolume and typeseries for volume and series editors, respectively; these can't be just volume or series because those names are already taken).

It may be a nicer solution to tell biblatex-apa to try the standard <editorype> bibstring when type<editortype> is undefined.

With

\renewbibmacro*{apaeditorstrg}[1]{%
  \iffieldundef{#1type}
    {\ifthenelse{\value{#1}>1\OR\ifandothers{#1}}
       {\bibcpstring{editors}}
       {\bibcpstring{editor}}}
    {\ifthenelse{\value{#1}>1\OR\ifandothers{#1}}
       {\ifbibstring{type\thefield{#1type}s}
          {\bibcpstring{type\thefield{#1type}s}}
          {\bibcpstring{\thefield{#1type}s}}}
       {\ifbibstring{type\thefield{#1type}}
          {\bibcpstring{type\thefield{#1type}}}
          {\bibcpstring{\thefield{#1type}}}}}}

it should not be necessary to define typeillustrator and typeillustrators.


The string cbyillustrator is not needed in the MWE since it is only used by biblatex-chicago as pointed out in How to identify Illustrator in bibtex?.


Finally, note the curly braces around Ohio to stop the sentence casing applied by biblatex-apa from wrongly converting the proper name Ohio to lower case. Cf. BibTeX loses capitals when creating .bbl file.

  • I recognize that you are the Master. But where can we ordinary mortals find such information? I have read the biblatex-apa documentation and cannot find any relevant information. – lightkeeper Dec 21 '18 at 18:15
  • @lightkeeper Things like this are indeed usually not documented in the style documentation. They have to be found in the code. From the output you got (the bold 'typeillustrator') one could guess that the style tries to use something like type\thefield{editortype}. I tried typeillustrator which worked. This is not the usual behaviour of the standard styles, which would only look for \thefield{editortype}, which means I could be pretty sure that I had to look in apa.bbx. I searched for type (there are quite a few hits) and found the bits of code to verify my guess. – moewe Dec 21 '18 at 19:47
  • I should probably revisit this - those parts of the APA style code are quite old. – PLK Jan 19 at 23:40

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.