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
Explicit citations take precedence over \nocite{*} when sorting=none #404
Comments
Yes, this was done as there needed to be some determinism. |
It is a problem in my use case, where I want bibliography entries to appear in the same order as in the bib file, but I can fix that by adding a custom sorting key, so it is not a big deal. However it is inconsistent with the biblatex documentation; version 3.17 section 3.9.6 says that "For the purposes of ordering citations by appearance \nocite will behave like all other cite commands" (or perhaps I misunderstood that line and it was only meant to apply to \nocite{key}). |
The problem here is that the current behaviour was designed to cope with the situation where someone does:
and where |
I would expect your example to produce (b,a), no matter where a and b appear in the
to produce (a,b) if a comes before b in the |
|
I'm not a fan of trying to force |
I think the 2.14 behaviour was only partially correct.
and
result in the same cite order attribute in the |
I see, I guess the |
Please try biblatex and biber DEV versions on Sourceforge. Note that:
Won't do the same as:
as |
That means that \documentclass{article}
\begin{filecontents}{\jobname.bib}
@misc{ref1,
author = {Author1},
title = {Title1},
}
@misc{ref2,
author = {Author2},
title = {Title2},
}
\end{filecontents}
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Hello~\cite{ref2,ref1}.
%\nocite{*}
\printbibliography
\end{document} and \documentclass{article}
\begin{filecontents}{\jobname.bib}
@misc{ref1,
author = {Author1},
title = {Title1},
}
@misc{ref2,
author = {Author2},
title = {Title2},
}
\end{filecontents}
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Hello~\cite{ref2,ref1}.
\nocite{*}
\printbibliography
\end{document} produce different results. Which is pretty counter-intuitive to me. I think if there is nothing else to go by
and
should result in the same sort order, because citation order is determined first and foremost by cite order (where the second case is "stronger" than the first, but both would still result in b < a) and only then by a fallback such as bib file order. |
I'm not sure about this, it is by design that |
Lost track of this - is there still something to do here? |
That depends on your feelings towards the example in #404 (comment). I find it extremely confusing that a |
I'm really not sure about this. I do like the idea of the semantic difference between |
I agree that it is nice to have a difference between In principle I'm OK with not resolving this now and leaving it for a future release. But there is the slight risk of annoying users by changing things now and then possibly changing them again in the short or medium term. I guess we have to live with that. It would be unreasonable to put off the release until we've figured this one out. And you are right, it is a fairly niche case anyway. |
I see what you mean. I had a look at this and I think I have a general solution now. To make this work properly, we now track the internal order within cite commands as well as the cite order in the refsection. This is output to the |
Looks good to me. |
Anything else to do for release of 2.18/3.18 on your end? |
I think we're good to go from my side. |
Very good, I'll start the process and then afterwards have a look at the multiscript thing. |
I am using biblatex with the
none
sorting option, and a document that starts with a\nocite{*}
command and contains a few explicit citations using\cite
later on. With biber <= 2.14 later explicit citations do not affect the bibliography order, however with biber >= 2.15 explicit citations always appear before implicit citations. Here is a MWE:This results in
with biber <= 2.14 but
with biber >= 2.15. In case it helps, using git bisect I was able to trace this back to commit afa8173, and indeed this seems to be related to the discussion about the order of
\cite
andnocite{*}
in #319.The text was updated successfully, but these errors were encountered: