# [NTG-context] Bibliography : wrong order of references when rendered by chapter

Romain Diss romain.diss at yahoo.fr
Mon Mar 18 14:14:27 CET 2019

```Hi,

I try to use multiple renderings to place a bibliography list at the end
of each chapters. I use the option 'criterium=chapter' to place the
bibliography and i also use the options 'repeat=yes,method=local'
because I want each chapter to have its own bibliography with an
independant numbering (starting from 1 for each chapter).

However, it doesn't wwork as expected. When a reference that exists in a
previous chapter appears again in another one, the ordering is broken (I tried
th option 'continue=no' but I don't know what it does).

I don't know if it's very clear so here's a minimal 'non' working example (in
the second chapter, ward reference should be numbered 1 and knuth should be 2,
following the order of appearence in the bibliography list):

% mnwe.tex
\usebtxdataset[biblio.bib]
\setupbtxrendering
[repeat=yes,
continue=no,
method=local]

\startdocument
\startchapter[title=First chapter]
\input knuth \cite[knuth]\blank
\placelistofpublications[criterium=chapter]
\stopchapter

\startchapter[title=Second chapter]
\input ward \cite[ward,knuth]\blank
\placelistofpublications[criterium=chapter]
\stopchapter
\stopdocument
% end

% biblio.bib
@book{knuth,
title = "Title",
author = "Knuth",
publisher = "Publisher",
year = "2019",
}
@book{ward,
title = "Title",
author = "Ward",
publisher = "Publisher",
year = "2019",
}
% end