Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
javrodnav opened this issue Jun 18, 2023 · 14 comments
Open

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

javrodnav opened this issue Jun 18, 2023 · 14 comments
Labels
fixed in dev Issue fixed in dev
Milestone

Comments

@javrodnav
Copy link

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
Copy link
Owner

plk commented Jun 18, 2023

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
Copy link
Author

Spanish. But the string is defined

@plk
Copy link
Owner

plk commented Jun 18, 2023

Can you put a MWE in here demonstrating the problem?

@javrodnav
Copy link
Author

@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
Copy link
Owner

plk commented Jun 18, 2023

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

@javrodnav
Copy link
Author

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
Copy link
Author

TFM MAES.zip

@plk
Copy link
Owner

plk commented Jun 19, 2023

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
Copy link
Contributor

moewew commented Jun 20, 2023

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 added a commit that referenced this issue Jun 20, 2023
@plk
Copy link
Owner

plk commented Jun 20, 2023

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

@moewew
Copy link
Contributor

moewew commented Jun 20, 2023

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 added a commit that referenced this issue Jun 20, 2023
@plk
Copy link
Owner

plk commented Jun 20, 2023

Should be fixed.

@javrodnav
Copy link
Author

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

@plk
Copy link
Owner

plk commented Jun 23, 2023

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

@plk plk added the fixed in dev Issue fixed in dev label Sep 2, 2023
@plk plk added this to the 9.17 milestone Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in dev Issue fixed in dev
Projects
None yet
Development

No branches or pull requests

3 participants