jspitz / biblatex-publist

BibLaTeX bibliography support for publication lists
40 stars 4 forks source link

Honor resetnumbers=true #11

Closed tpellard closed 6 years ago

tpellard commented 6 years ago

When you print the bibliography with the option \printbibliography[filter=mine] the numerotation of the list remains as if the references filtered out were still there. For example my list starts with number 2 instead of 1 because the first reference has been filtered out.

jspitz commented 6 years ago

Works for me, please provide an example file. Note that if you use multiple \printbibliography commands, each one needs to be wrapped in a refsection environment.

tpellard commented 6 years ago

Sorry, it seems the problem is due to multiple bibliographies and additional filtering conditions. Please see the example below.


\documentclass[a4paper,11pt]{article}

\begin{filecontents}{\jobname.bib}
@Article{ZArt,
  author       = {Author, The},
  title        = {Article},
  journaltitle = {Journal},
  date         = {2018},
  volume       = {1},
  number       = {1},
  pages        = {1--10},
}

@Article{ZArt2,
  author       = {Author, The},
  title        = {Article},
  journaltitle = {Journal},
  date         = {2018},
  volume       = {1},
  number       = {2},
  pages        = {1--10},
}

@InCollection{ZChap,
  author       = {Author, The},
  title        = {Chapter},
  pages        = {1--10},
  crossref     = {Zbook},
}

@Collection{Zbook,
  editor    = {Editor, The},
  title     = {Book},
  date      = {2018},
  publisher = {Pubs},
  location  = {Place},
}

\end{filecontents}

\usepackage[bibstyle=publist,plauthorhandling=highlight,marginyear=true,boldyear=false]{biblatex}
\plauthorname[The][]{Author}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography[filter=mine,type=article]
\printbibliography[filter=mine,type=incollection]
\end{document}
[test.pdf](https://github.com/jspitz/biblatex-publist/files/1880434/test.pdf)
jspitz commented 6 years ago

I am not sure I understand. Do you consider it as a bug that the list numbering continues in the second bibliography? This is actually intended. I don't see the bug reported here in the example file.

tpellard commented 6 years ago

Sorry for the lack of clarity. Actually there are 2 separate issues actually that got mixed in my example and in my mind:

  1. it would be nice to have an option to restart the numbering with each bibliography (that's what I want for my list)
  2. if I compile once and then reverse the order of the bibliographies, the numbering is not updated (e.g. 2 stays 2 even if it's now in first position) at the next compilation, and I have to manually delete the .aux file and recompile

test.pdf

jspitz commented 6 years ago

I don't think there's anything I can do about the second issue (this is in biblatex's/biber's scope, not ours).

The first issue is a valid feature request. I'll update the summary.

tpellard commented 6 years ago

Thanks! My own homemade publication list uses a numbered list as a bibenvironment, which makes the numbering automatic. I also use an alternative implementation with years before the counters, but the years are placed not in the margin but it within the main text block, with everything positioned with minipages.

jspitz commented 6 years ago

Fixed with 00e40503b371808. I've added an option plnumbered=reset. Note, though, that this requires the use of \refsection to work properly. This will be in v. 1.10 (on its way to CTAN).