plk / biblatex-apa

APA style for BibLaTeX
91 stars 48 forks source link

author+an:role doesnt't print chair #211

Open javrodnav opened 1 year ago

javrodnav commented 1 year ago

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 1 year ago

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

javrodnav commented 1 year ago

Spanish. But the string is defined

plk commented 1 year ago

Can you put a MWE in here demonstrating the problem?

javrodnav commented 1 year ago

@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 1 year ago

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

javrodnav commented 1 year ago

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.

javrodnav commented 1 year ago

TFM MAES.zip

plk commented 1 year ago

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.

moewew commented 1 year ago

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.

https://github.com/plk/biblatex-apa/blob/2262d29bfaad2a66af28db5eb814643e873e2224/tex/latex/biblatex-apa/bbx/apa.bbx#L909-L944

https://github.com/plk/biblatex-apa/blob/2262d29bfaad2a66af28db5eb814643e873e2224/tex/latex/biblatex-apa/lbx/american-apa.lbx#L7-L8

https://github.com/plk/biblatex-apa/blob/2262d29bfaad2a66af28db5eb814643e873e2224/tex/latex/biblatex-apa/lbx/american-apa.lbx#L32-L33

https://github.com/plk/biblatex-apa/blob/2262d29bfaad2a66af28db5eb814643e873e2224/bibtex/bib/biblatex-apa-test-references.bib#L1644-L1650

plk commented 1 year ago

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

moewew commented 1 year ago

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 1 year ago

Should be fixed.

javrodnav commented 1 year ago

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

plk commented 1 year ago

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