EDIT:@PLK In fact, this happens only with texlive 2016 (up to date) with biblatex 3.4, and not with texlive 2015 up to date.... I forgot that I was on texlive 2016, not on the stable one.
================
EDIT:@PLK, this is the MWE. I do get the first picture, after xelatex-biber-xelatex, which is what I want, but if I compile again with xelatex only, then I lose it and get the second picture.
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\setotherlanguage{german}
%\usepackage[german]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, citetracker=true, citestyle=alphabetic, bibstyle=ieee-alphabetic, sorting=ynt,sortcites=true]{biblatex}
\addbibresource{testcite.bib}
\usepackage{filecontents} \begin{filecontents}{testcite.bib}
@book{a01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@book{a02,
author = {Author, A.},
year = {2002},
title = {Bravo},
}
@article{c01,
author = {Cuthor, C.},
year = {2003},
title = {Charlie},
}
@article{c02,
author = {Cuthor, C.},
year = {2004},
title = {Charlie},
}
@article{c03,
author = {Cuthor, C.},
year = {1978},
title = {Charlie},
}
@article{c04,
author = {Cuthor, C.},
year = {1981},
title = {Charlie},
}
@article{ac01,
author = {Cuthor, C. and Author, A.},
year = {1987},
title = {Charlie},
}
@article{ac02,
author = {Cuthor, C. and Author, A.},
year = {1973},
title = {Charlie},
}
@article{ac03,
author = {Cuthor, C. and Author, A.},
year = {1981},
title = {Charlie},
}
\end{filecontents}
\begin{document}
Refs. \cite{a01, a02, ac01, ac02, c01, c02, c03, c04, ac03}
\today
%\clearpage
\newrefcontext[sorting=nyt]
\selectlanguage{german}
\printbibliography[ heading=subbibliography,title={Journals}]
\endrefcontext
\end{document}
Edit:@PLK, you are right, but I print the bibliography with the sorting nyt
, whereas I want the cites with, like you said, ynt
...
this is the code that I use to print the bibliography (I use xelatex
)
\clearpage
\newrefcontext[sorting=nyt]
%\selectlanguage{english}
\printbibliography
\endrefcontext
When I put this newrefcontext
, the sorting of the cites changes, from ynt
to nyt
!
=============================================================
@murugan
check that you have the package filecontents
and the file the title of your personal document.bib
in the folder where you compile...
==========================================
I use the following settings and my citations are not ordered
\documentclass{article}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[citestyle=alphabetic,bibstyle=ieee-alphabetic, backend=biber,sortcites=true]{biblatex}
\renewbibmacro*{bbx:savehash}{} % Remove annoying dash
\addbibresource{\jobname.bib}
\usepackage{filecontents} \begin{filecontents}{\jobname.bib}
@book{a01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@book{a02,
author = {Author, A.},
year = {2002},
title = {Bravo},
}
@article{c01,
author = {Cuthor, C.},
year = {2003},
title = {Charlie},
}
@article{c02,
author = {Cuthor, C.},
year = {2004},
title = {Charlie},
}
@article{c03,
author = {Cuthor, C.},
year = {1978},
title = {Charlie},
}
@article{c04,
author = {Cuthor, C.},
year = {1981},
title = {Charlie},
}
@article{ac01,
author = {Cuthor, C. and Author, A.},
year = {1987},
title = {Charlie},
}
@article{ac02,
author = {Cuthor, C. and Author, A.},
year = {1973},
title = {Charlie},
}
@article{ac03,
author = {Cuthor, C. and Author, A.},
year = {1981},
title = {Charlie},
}
\end{filecontents}
\begin{document}
Refs. \cite{a01, a02, ac01, ac02, c01, c02, c03, c04, ac03}\\
\end{document}
This is the order that I seek
- first sorting is by year
- for two items of the same year, order by name of the first author
- if the items have same year and same first author, put first the items which have only 1 author, then the items with co-authors [these items with co-authors will be sorted first by year, then alphabetically by the name of the first co-author]
I think I have stated all the cases. Explicitly, I get currently,
[Aut01; Aut02; CA73; CA81; CA87; Cut03; Cut04; Cut78; Cut81]
I want
[CA73; Cut78; Cut81; CA81; CA87; Aut01; Aut02; Cut03; Cut04]