-
Notifications
You must be signed in to change notification settings - Fork 118
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
Odd extradate behaviour in list of shorthands #1009
Comments
May be easy to fix - strange this was never noticed before - filtering for shorthand lists (and all data lists) was done after sorting/label generation which resulted in gaps in various counters. Simply switched filtering to happen before this and it looks fine now in DEV. |
Yeah, the fix helps in the MWE, but I think the issue goes deeper. Try \documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[style=authoryear-ibid]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{Author_2020_1,
title = {Title B},
shorthand = {A},
author = {Some Author},
year = {2020},
location = {Someplace}
}
@book{Author_2020_2,
title = {Title A},
shorthand = {B},
author = {Some Author},
year = {2020},
location = {Someplace}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{Author_2020_1,Author_2020_2}
\printbiblist{shorthand}
\printbibliography
\end{document} The problem is that the new refcontext for the LoS affects not just sorting, but therefore also uniqueness calculations. What people would probably expect is a LoS that only affects sorting and nothing else. Possibly in a way that the list is first sorted and processed with the global settings, where uniqueness and |
That really is hard to deal with - it's the first time I've seen a LoS containing |
I know that this would require a very different approach. But I think it could be useful. When I cite a work in a document and have it appear in a LoS and the normal bibliography I think of the work as the same in both contexts and I also expect that all label and uniqueness data is the same, the only difference I possibly expect is the sort order. It is similar in case I want to sort the bibliography differently from in-text citations. Currently we are swerving the immediate issues that would arise from switching refcontext & sorting there with refcontext assignments, but how things actually work is not quite how people would naively expect it to work. My idea roughly works like this. This scheme is not enough for all documents, but it is enough for many applications. It would essentially introduce a 'weak sorting' that does not come with a full datalist, but just a list of sorted keys.
For \documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[style=authoryear-ibid]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{Author_2020_1,
title = {Title B},
shorthand = {A},
author = {Some Author},
year = {2020},
location = {Someplace}
}
@book{Author_2020_2,
title = {Title A},
shorthand = {B},
author = {Some Author},
year = {2020},
location = {Someplace}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{Author_2020_1,Author_2020_2}
\printbiblist{shorthand}
\printbibliography
\end{document} That would mean that the Similarly in \documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, sorting=ydnt, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson,worman,geer,nussbaum,cicero,aksin}
\newrefcontext[sorting=nyt]
\printbibliography
\end{document} we don't actually need to duplicate all entry data. All we need is the datalist from Example effects on
|
For 'simulation' purposes, here is a workaround that lets entries in a biblist take their entry data from the default context for each entry, so that only the sorting is controlled by the biblist context & sorting. \documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[style=authoryear-ibid]{biblatex}
\makeatletter
\def\blx@biblistitem#1{%
\blx@getrefcontext{#1}%
\blx@ifdata{#1}
{\begingroup
\blx@getdata{#1}%
\blx@bibcheck
\iftoggle{blx@skipentry}{}{%
\blx@setdefaultrefcontext{#1}%
\global\let\blx@noitem\@empty
\blx@setoptions@type\abx@field@entrytype
\blx@setoptions@entry
\addtocounter{instcount}\@ne
\iftoggle{blx@labelnumber}
{\blx@bbl@locallabelnumberwidth}
{}%
\iftoggle{blx@labelalpha}
{\blx@bbl@locallabelalphawidth}
{}%
\nottoggle{blx@skipbiblist}
{\blx@bbl@locallabelfields}
{}%
\csuse{blx@item@\blx@theenv}\relax
\csuse{blx@hook@biblistitem@\blx@thebiblist}%
\blx@execute
\blx@initunit
\blx@beglangbib
\bibsentence
\blx@pagetracker
\blx@driver{\blx@thebiblistdriver}%
\blx@postpunct
\blx@endlangbib}%
\endgroup}
{}}
\makeatother
\begin{filecontents}{\jobname.bib}
@book{Author_2020,
title = {Some Title},
author = {Some Author},
year = {2020},
location = {Someplace}
}
@book{Author_2020_2,
title = {Some Other Title},
shorthand = {MOT},
author = {Some Author},
year = {2020},
location = {Someplace}
}
@book{Buthor_2020_1,
title = {Some Title},
author = {Some Buthor},
year = {2020},
location = {Someplace}
}
@book{Buthor_2020_2,
title = {Some Title},
shorthand = {ZOT},
author = {Some Buthor},
year = {2020},
location = {Someplace}
}
@book{Buthor_2020_3,
title = {Some Title},
author = {Some Buthor},
year = {2020},
location = {Someplace}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
I am citing \autocite{Author_2020} and \autocite{Author_2020_2}.
I am citing \autocite{Buthor_2020_1,Buthor_2020_2,Buthor_2020_3}.
\printbiblist{shorthand}
\printbibliography
\end{document} That gives the desired/expected result here. |
This needs some thinking about - I'm not sure an entry has a "primary" refcontext as there could be the same entry in multiple lists sorted differently and therefore with differing |
Oh yeah. My 'scheme' will definitely not be the right thing for all uses. I happen to think it would be useful (or at least not detrimental) for a lot of basic use cases, but there are going to be cases where you want your data to stay separate (i.e. where separate data lists are good). That's why it would have to be an option or would maybe have a slightly different name/interface than current |
From https://tex.stackexchange.com/q/547427/35864
Consider the following example
Note that the
extradate
for the entry with the shorthand is "b" in the list of shorthands and "a" in the citations and the normal bibliography.I suspect this has to do with refcontexts and sorting and might be more tricky than expected.
The text was updated successfully, but these errors were encountered: