biblatex icon indicating copy to clipboard operation
biblatex copied to clipboard

Different order for multiple citations and references

Open polgab opened this issue 1 year ago • 2 comments

I would like to get a different order for multiple citations and references. I am using two references contexts in the following document:

\documentclass{article}

\begin{filecontents*}[force]{\jobname.bib}
@book{Alpha2000,
    Author = {Alpha, A.},
    Publisher = {One Publisher},
    Title = {Alpha Life},
    Year = {2000}}
@book{Beta1970,
    Author = {Beta, B.},
    Publisher = {Another Publisher},
    Title = {Beat Life},
    Year = {1970}}
\end{filecontents*}

\usepackage[sorting=anyt,style=authoryear,sortcites=true]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\newrefcontext[sorting=ynt]

\parencite{Alpha2000,Beta1970}

\parencite{Beta1970,Alpha2000}

% \printbibliography[type=none] % <-- ???

\newrefcontext[sorting=anyt]
\printbibliography

\end{document}

The calls to \parencite generate nothing and I have no error message!

If I uncomment the line \printbibliography[type=none], I get the expected result (but the method seems a bit surprising to me).

polgab avatar Nov 17 '24 16:11 polgab

I answered on TeX. SX (https://tex.stackexchange.com/q/731857/35864) with the "official solution" at the moment, but I think we may need to revisit this, as the current situation is a little confusing to say the least.

moewew avatar Dec 04 '24 18:12 moewew

Extract from documentation of \GenRefcontextData: [...] e.g. to sort citations with the sortcites option when the sorting of citations requires a different refcontext to that used for the actual reference list.

Thank you for this perfectly correct method!

A message (warning or error) in the absence of a call to \GenRefcontextData would seem useful.

polgab avatar Dec 04 '24 22:12 polgab