plk/biblatex-apa

author+an:role doesnt't print chair

javrodnav opened this issue · 14 comments

I'm trying to make an inbook reference with several authors, in which the first one is a chair, but I can't print properly the role. When I put author+an:role = {1=typechair}, the output is author1 (), author2... And if I put 1=chair it prints author1 (chair),... How could I fix that, besides putting "chair"?

plk commented

Which language are you using via babel or polyglossia - it might be that the language doesn't have a localisation string for typechair defined.

Spanish. But the string is defined

plk commented

Can you put a MWE in here demonstrating the problem?

@inbook{Crisol2015, author = {Crisol, Emilio and Amber, Diana and Barrero, Beatriz and Higueras, María Lina and Hinojosa, Eva F. and Morales, Amelia and Olmo, Marta and Pedrosa, Beatriz and Quirante, María Rosa and Romero, María Asunción}, author+an:role = {1=typechair}, title = {Estrategias y métodos de enseñanza-aprendizaje}, editor = {Domingo, Jesús and Pérez, Miguel}, editortype = {chair}, address = {Madrid}, keywords = {Didáctica}, edition = {1}, publisher = {Ediciones Pirámide}, series = {Pedagogía y didáctica}, booktitle = {Aprendiendo a enseñar}, booksubtitle = {Manual Práctico de Didáctica}, year = {2015}, }

And the output is on the image
imagen

plk commented

Can you provide a full working file with all the latex and package options?

I'll try. I'm working on overleaf, so I don't have manually loaded all the biblatex-apa files, just the ones I've modified. Besides, as far as I know I only made changes in legislation entrytype. But I'll pass you a compressed file, sure.

plk commented

We just need the smallest possible main tex file and bibliography to reproduce - the example in the ZIP relies several other packages and files which aren't present - we need to run the example and see the issue in the simplest document possible.

I haven't had the time to look at the .zip, but I think I could come up with the following example that is at least related.

AFAICS the actual document language does not matter. The problems shows equally for american and spanish.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

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

\begin{filecontents}{\jobname.bib}
@inbook{Crisol2015,
  author         = {Crisol, Emilio and Amber, Diana
                    and Barrero, Beatriz and Higueras, María Lina
                    and Hinojosa, Eva F. and Morales, Amelia
                    and Olmo, Marta and Pedrosa, Beatriz
                    and Quirante, María Rosa and Romero, María Asunción}, 
  author+an:role = {1=chair},
  title          = {Estrategias y métodos de enseñanza-aprendizaje},
  editor         = {Domingo, Jesús and Pérez, Miguel},
  editortype     = {chair},
  address        = {Madrid}, 
  edition        = {1},
  publisher      = {Ediciones Pirámide},
  series         = {Pedagogía y didáctica},
  booktitle      = {Aprendiendo a enseñar},
  booksubtitle   = {Manual Práctico de Didáctica},
  year           = {2015},
}
@inbook{Crisol2023,
  author         = {Crisol, Emilio and Amber, Diana
                    and Barrero, Beatriz and Higueras, María Lina
                    and Hinojosa, Eva F. and Morales, Amelia
                    and Olmo, Marta and Pedrosa, Beatriz
                    and Quirante, María Rosa and Romero, María Asunción}, 
  author+an:role = {1=typechair},
  title          = {Estrategias y métodos de enseñanza-aprendizaje},
  editor         = {Domingo, Jesús and Pérez, Miguel},
  editortype     = {chair},
  address        = {Madrid}, 
  edition        = {2},
  publisher      = {Ediciones Pirámide},
  series         = {Pedagogía y didáctica},
  booktitle      = {Aprendiendo a enseñar},
  booksubtitle   = {Manual Práctico de Didáctica},
  year           = {2023},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,Crisol2015,Crisol2023}

\printbibliography
\end{document}

I think the problem is that while the "chair" bibstring is called typechair, all other role bibstrings don't include the type in their name. The code in apa.bbx assumes there is no type... in the bibstring name and thus works in most cases (including the test cases with director), but not here.

\newcommand*{\apabbx@ifrole@item}{%
\xifinlist{item@\currentname @role@\the\value{listcount}}%
\abx@annotation@defined}
\newtoggle{apabbx:role:item:punct}
\newcommand*{\apabbx@rolelist@item}{}
\forcsvlist{\listadd\apabbx@rolelist@item}{%
writer,director,execproducer,producer,host,chair,guestexpert}
\newcommand*{\apabbx@printrole@item@i}[1]{%
\ifitemannotation[\currentname][role]{#1}
{\iftoggle{apabbx:role:item:punct}
{\addspace\&\space}
{}%
\bibstring{#1}%
\toggletrue{apabbx:role:item:punct}}
{}%
}
\newcommand*{\apabbx@printrole@item}{%
\forlistloop{\apabbx@printrole@item@i}{\apabbx@rolelist@item}}
% Individual name roles
% takes two arguments
% {<pre punct>}{<wrapper>}
\newbibmacro*{role}[2]{%
\apabbx@ifrole@item
{#1%
#2{%
\togglefalse{apabbx:role:item:punct}%
\hasitemannotation[\currentname][role]%
{\getitemannotation[\currentname][role]}
{\apabbx@printrole@item}}}
{}%
}

\NewBibliographyString{typechair}
\NewBibliographyString{typechairs}

\NewBibliographyString{director}
\NewBibliographyString{directors}

@VIDEO{10.7:67r,
ENTRYSUBTYPE = {film},
AUTHOR = {E. Brodsky},
AUTHOR+an:role = {1=director},
TITLE = {The Year We Thought About Love},
DATE = {2016}
}

plk commented

Fixed in VC - you just need the latest .lbx and drop it over your current one to get the fix now.

That change appears to have implications for usage of chair in editortype fields.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

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

\begin{filecontents}{\jobname.bib}
@PRESENTATION{10.5:63,
  AUTHOR         = {De Boer, D. and LaFavour, T.},
  EDITORA        = {A. M. Schmidt and A. Kryvanos},
  EDITORATYPE    = {chair},
  TITLE          = {The Art and Significance of Successfully Identifying
                    Resilient Individuals},
  SUBTITLE       = {A Person-Focused Approach},
  MAINTITLE      = {Perspectives on Resilience: {Conceptualization},
                    Measurement, and Enhancement},
  MAINTITLEADDON = {Symposium},
  EVENTTITLE     = {Western Psychological Association 98th Annual Convention},
  VENUE          = {Portland, OR, United States},
  EVENTDATE      = {2018-04-26/2018-04-29}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Lorem \autocite{10.5:63}

\printbibliography
\end{document}

no longer displays "(Chairs)".

plk commented

Should be fixed.

TFM MAES.zip
Ok, now this has the bare minimum I think

plk commented

You can try with the relevant DEV .lbx from Github - I think this should be fixed.