0

This is a follow up question to these two (similar story, just for latexmk):

Biblatex order of entries in a multi-citation

Multiple citations: citation order different to bibliography order

I have the following MWE

\documentclass{article}
\usepackage[
backend=biber, sortcites=true, 
 sorting=ynt,bibstyle=authoryear -comp, 
 citestyle=authoryear -comp
]{biblatex}

\bibliography{mybib}
\begin{document}
  \parencite{Sample:01,Sample:02}

\begin{refcontext}[sorting=nyt]
\printbibliography
\end{refcontext}
\end{document}

and a bib file that looks like this

  @Article{Sample:01,
  title                    = {Some Title},
  author                   = {Zhu, Zhang z.},
  year                     = {1900},
  pages                    = {1-2},
  journal                  = {Really Cool Journal},}

  @Article{Sample:02,
  title                    = {Different Title},
  author                   = {Abe, Alp A.},
  year                     = {2000},
  pages                    = {3-4},
  journal                  = {Other Cool Journal},}

I am using Miktex and latexmk to compile this. I want that citations are sorted withing the text using ynt in the bibliography I want nyt. I follow @Moewe in the related question. When watching pdf updates while latexmk runs, I observe the following:

  1. First run: no citations picked up
  2. Second run: intext citation order correct, no bibliography
  3. Third run: citations correct and bibliography correct
  4. Fourth run: in text citations sorted like the bibliography.

So in the end I end up with this result:

enter image description here

Why does the fourth run happen? Why is the option of refcontext applied globally rather than locally?

johaschn
  • 333
  • 1
    See also http://tex.stackexchange.com/q/344807/35864 I think that with the current system there is no good way to sort citations and bibliographies differently. Even if you manage to apply different schemes, you could end up with different extrayears if you are unlucky. – moewe Mar 19 '17 at 14:32
  • Thanks for the reference, somehow I didn't find the other question. This is a significant bug, isn't it? To me at least it seems quite natural to have chronological sorting in the text and alphabetic sorting in the bibliography. – johaschn Mar 19 '17 at 16:55
  • Sorting is hard, but I agree that it is unfortunate that this doesn't work. If no one answers your question to your satisfaction in the near future (it could just be that the other question was overlooked, or people didn't have an answer back then) you might as well open an issue at the biblatex bugtracker https://github.com/plk/biblatex/issues and mention that you asked here with no solution. – moewe Mar 19 '17 at 17:17
  • 1
    BTW: latexmk is irrelevant to the question. – moewe Mar 19 '17 at 17:17
  • @moewe: Does this mean that that your previous comment: "Even if you manage to apply different schemes, you could end up with different extrayears if you are unlucky." does not apply if I follow as suggested in your answer in tex.stackexchange.com/q/344807/35864 ? – johaschn May 17 '17 at 09:16
  • No, unfortunately that is still a known and documented issue. – moewe May 17 '17 at 09:19
  • Just checked again with your MWE. It works flawlessly for me. I get 'Zhu, Abe' citations and 'Abe, Zhu' in the bibliography. Are you running the newest versions of biblatex and Biber (2.7, 3.7 respectively)? – moewe May 23 '17 at 07:08
  • 1
    There was some misbalancing apparently in my packages. A fresh and up-to-date installation of Miktex solved problem. I removed the edit again from the question – johaschn May 24 '17 at 09:18
  • OK good to hear it works now. – moewe May 24 '17 at 09:20

0 Answers0