1

I use a setup in which I have a field authauthor which contains a nomralized name of an author that is supposed to show up in the author index. Getting the name from another field indexed in biblatex I want to use the value of authauthor for sorting as well. So I am looking for something that checks whether the filed sortname has a value and if it does not but authauthor has one, the value of authauthor is copied over to sortname. Can this be doen with biblatex somehow?

\documentclass{scrbook}

\usepackage[ natbib=true, style=langsci-unified, citestyle=langsci-unified, datamodel=langsci, % add authauthor and autheditor as possible fields to bibtex entries backend=biber, indexing=cite ]{biblatex}

\begin{filecontents}{bibliography.bib} @incollection{Steedman89, authauthor = {Mark Steedman}, author = {Steedman, Mark J.}, pages = {463--504}, sortname = {Mark Steedman}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1989}, title = {Grammar, Interpretation, and Processing from the Lexicon}}

@incollection{Steedman90, authauthor = {Mark Steedman}, author = {Steedman, Mark J.}, pages = {463--504}, %sortname = {Mark Steedman}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1990}, title = {Grammar, Interpretation, and Processing from the Lexicon}}

@incollection{Steedman91, authauthor = {Mark Steedman}, author = {Steedman, Mark J.}, pages = {463--504}, sortname = {Mark Steedman}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1991}, title = {Grammar, Interpretation, and Processing from the Lexicon}}

\end{filecontents}

\addbibresource{bibliography.bib}

\begin{document}

\citep{Steedman89,Steedman90,Steedman91}

\printbibliography

\end{document}

The example shows that with the field sortname commented out in the second entry, this item gets sorted wrongly. Somehow sortname should be taken over from authauthor.

Stefan Müller
  • 6,901
  • 3
  • 29
  • 61
  • Can you tell us where we can get langsci.dbx, please? (langsci-unified is installed and can be found). On my system I get file 'langsci.dbx' not found., so authauthor and friends are not known. – moewe Jan 03 '23 at 06:06
  • That said, in absence of a useful MWE I can offer the following unspecific advice: Generally, you can map fields with Biber sourcemaps. There is a function to copy the value of a field X to a field Y only if Y is empty. For this use case that may not be necessary, though, as you could change the sorting template to also take into account the authauthor field. – moewe Jan 03 '23 at 06:14
  • Thanks! Sorry, I thought that langsci.dbx would be in the texlive distro. It is here for example: https://github.com/langsci/25/blob/master/langsci.dbx – Stefan Müller Jan 03 '23 at 10:03

1 Answers1

3

You can use a Biber sourcemap to copy the value of one field into another. One such example (where the first field is also removed) is How to move the field note at the end of the reference.

In your use case that does not appear to be necessary to me, however. It might be easier to just add authauthor and autheditor to the sorting scheme. Then you no longer need to copy its value to sortname.

\documentclass{article}

\usepackage[ natbib=true, style=langsci-unified, datamodel=langsci, % add authauthor and autheditor as possible fields to bibtex entries backend=biber, indexing=cite ]{biblatex}

\DeclareSortingTemplate{nyt}{ \sort{ \field{presort} } \sort[final]{ \field{sortkey} } \sort{ \field{sortname} \field{authauthor} \field{author} \field{autheditor} \field{editor} \field{translator} \field{sorttitle} \field{title} } \sort{ \field{sortyear} \field{year} } \sort{ \field{sorttitle} \field{title} } \sort{ \field{volume} \literal{0} } }

\begin{filecontents}{\jobname.bib} @incollection{Steedman89, authauthor = {Mark Steedman}, author = {Steedman, Mark J.}, pages = {463--504}, sortname = {Mark Steedman}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1989}, title = {Grammar, Interpretation, and Processing from the Lexicon}}

@incollection{Steedman90, authauthor = {Mark Steedman}, author = {Steedman, Mark J.}, pages = {463--504}, %sortname = {Mark Steedman}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1990}, title = {Grammar, Interpretation, and Processing from the Lexicon}}

@incollection{Steedman91, authauthor = {Mark Steedman}, author = {Steedman, Mark J.}, pages = {463--504}, sortname = {Mark Steedman}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1991}, title = {Grammar, Interpretation, and Processing from the Lexicon}}

\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\citep{Steedman89,Steedman90,Steedman91}

\printbibliography

\end{document}

Steedman, Mark J. 1989. Grammar, interpretation, and processing from the lexicon. In William Marslen-Wilson (ed.), Lexical representation and process, 463–504. Cambridge: The MIT Press.
Steedman, Mark J. 1990. Grammar, interpretation, and processing from the lexicon. In William Marslen-Wilson (ed.), Lexical representation and process, 463–504. Cambridge: The MIT Press.
Steedman, Mark J. 1991. Grammar, interpretation, and processing from the lexicon. In William Marslen-Wilson (ed.), Lexical representation and process, 463–504. Cambridge: The MIT Press.

moewe
  • 175,683