7

I would like to create a document with two chapters. After the first chapter there should be a bibliography. The next chapter should be able to reference items of the former chapter, but only show the new items in its bibliography, starting with the next number from the first bibliography.

Example:

Chapter 1 - The Fu
Fu has been done by Bar [1]. Early versions ...
Bibliography
[1] Bar et. al., Doning the Fu

Chapter 2 - Compining Fu with Herp
Doning Fu as described in [1] neglects the advantages of Herp pointed out by Derp [2]. Consequently ....
Bibliography
[2] Derp et. al., The Advantages of Using Herp

Please not too much discussion about if that is a friendly-to-use idea, it is not my own demand :)

5

Use of refsegment will continue label numbering for you. To print a reference in just one sub-bibliography (and completely frustrate most readers), you can track the continuation number for each refsegment and skip any items whose label is less than that number.

In the example below the default sorting scheme is used, but it could be changed. To get the label numbers right, this approach will require a couple additional passes with latex. biblatex gives you a message whenever another pass is needed.

\documentclass{report}
\usepackage[sorting=none,style=numeric,refsegment=chapter,defernumbers=true]{biblatex}
\usepackage{filecontents}

\defbibheading{subbibliography}{%
  \section*{Bibliography}}

\makeatletter

% Overall entry counter
\csnumgdef{blx@entrycount}{0}
\AtEveryBibitem{%
  \csnumgdef{blx@entrycount}{\csuse{blx@entrycount}+1}}

% Continued from this label number
\appto{\newrefsegment}{%
  \csnumgdef{blx@entrycount@\the\c@refsegment}{\csuse{blx@entrycount}+1}}

% Skip entries with label numbers less than the continued number
\defbibcheck{onlynew}{%
  \ifnumless{\thefield{labelnumber}}{\csuse{blx@entrycount@\the\c@refsegment}}
    {\skipentry}
    {}}

\makeatother

\begin{filecontents}{\jobname.bib}
@Book{companion,
  author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
  title = {The LaTeX Companion},
  edition = {1},
  publisher = {Addison-Wesley},
  location = {Reading, Mass.},
  date = {1994}}
@Article{gillies,
  author = {Gillies, Alexander},
  title = {Herder and the Preparation of Goethe's Idea of World Literature},
  journaltitle = {Publications of the English Goethe Society},
  volume = {9},
  date = {1933},
  pages = {46--67}}
@Article{bertram,
  author = {Bertram, Aaron and Wentworth, Richard},
  title = {Gromov invariants for holomorphic maps on Riemann surfaces},
  journaltitle = {J.~Amer. Math. Soc.},
  volume = {9},
  number = {2},
  date = {1996},
  pages = {529--571}}
@Book{poetics,
  author = {Aristotle},
  editor = {Lucas, D. W.},
  title = {Poetics},
  series = {Clarendon Aristotle},
  publisher = {Clarendon Press},
  location = {Oxford},
  date = {1968}}
@Book{rhetoric,
  author = {Aristotle},
  editor = {Cope, Edward Meredith},
  commentator = {Cope, Edward Meredith},
  title = {The Rhetoric of Aristotle with a commentary by the late Edward Meredith Cope},
  volumes = {3},
  publisher = {Cambridge University Press},
  date = {1877}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\chapter{First}
  \cites{companion}{rhetoric}
  \printbibliography[segment=\therefsegment,check=onlynew,heading=subbibliography]
\chapter{Second}
  \cites{companion}{bertram}{poetics}
  \printbibliography[segment=\therefsegment,check=onlynew,heading=subbibliography]
\chapter{Third}
  \cites{companion}{bertram}{gillies}{rhetoric}
  \printbibliography[segment=\therefsegment,check=onlynew,heading=subbibliography]
\end{document}

Results for the first chapter:

enter image description here

And the second:

enter image description here

And the third:

enter image description here

  • I've edited to add sorting=none to the biblatex option, necessary for this to work on TexLive 2013. It would be nice to get an example that did not rely on chapters. Simply each time \printbibliography is called, only new bib items are printed. I'm working on that change, but I am not proficient in TeX. – mankoff Apr 30 '14 at 12:55
1

Since the code in the accepted answer stopped working with more recent versions of biblatex (as discussed in biblatex: continuous reference numbering without duplication), here is an updated version that should work again.

The answer is copied verbatim from my answer to the linked question.


I suggest the following hopefully more stable solution. For each entry it records the first refsegment in which it was cited. The filter onlynew then only needs to check if this refsegment has a number smaller than the current refsegment.

\documentclass{article}
\usepackage[defernumbers=true]{biblatex}

\makeatletter
\AtEveryCitekey{%
  \ifcsundef{blx@entry@refsegment@\the\c@refsection @\thefield{entrykey}}
    {\csnumgdef{blx@entry@refsegment@\the\c@refsection @\thefield{entrykey}}{\the\c@refsegment}}
    {}}
\defbibcheck{onlynew}{%
  \ifnumless{0\csuse{blx@entry@refsegment@\the\c@refsection @\thefield{entrykey}}}{\the\c@refsegment}
    {\skipentry}
    {}}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
\newrefsegment
refsegment \therefsegment:
\cite{sigfridsson,worman}
\printbibliography[segment=\therefsegment,check=onlynew]

\newrefsegment
refsegment \therefsegment:
\cite{sigfridsson,geer,nussbaum}
\printbibliography[segment=\therefsegment,check=onlynew]

\newrefsegment
refsegment \therefsegment:
\cite{sigfridsson,geer,pines,worman}
\printbibliography[segment=\therefsegment,check=onlynew]
\end{document}

Bibliography with only new entries: 1,2//3,4//5


Here is a solution that also works for \nocite. Since there is no \AtEveryCitekey-equivalent for \nocite we have to hook into internal commands.

\documentclass{article}
\usepackage[defernumbers=true]{biblatex}

\makeatletter
\def\blx@citation@entry#1#2{%
  \blx@bibreq{#1}%
  \ifinlist{#1}\blx@cites
    {}
    {\listgadd{\blx@cites}{#1}}%
  \blx@auxwrite\@mainaux{}{\string\abx@aux@cite{#1}}%
  \ifinlistcs{#1}{blx@segm@\the\c@refsection @\the\c@refsegment}
    {}
    {\listcsgadd{blx@segm@\the\c@refsection @\the\c@refsegment}{#1}}%
  \blx@auxwrite\@mainaux{}{\string\abx@aux@segm{\the\c@refsection}%
                                               {\the\c@refsegment}%
                                               {\detokenize{#1}}}%
  \ifcsundef{blx@entry@refsegment@\the\c@refsection @#1}
    {\csnumgdef{blx@entry@refsegment@\the\c@refsection @#1}{\the\c@refsegment}}
    {}%
  \blx@ifdata{#1}
    {}
    {\ifcsdef{blx@miss@\the\c@refsection}
       {\ifinlistcs{#1}{blx@miss@\the\c@refsection}
          {}
          {\blx@logreq@active{#2{#1}}}}
       {\blx@logreq@active{#2{#1}}}}}

\defbibcheck{onlynew}{%
  \ifnumless{0\csuse{blx@entry@refsegment@\the\c@refsection @\thefield{entrykey}}}{\the\c@refsegment}
    {\skipentry}
    {}}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
\newrefsegment
refsegment \therefsegment:
\cite{sigfridsson,worman}
\printbibliography[segment=\therefsegment,check=onlynew]

\newrefsegment
refsegment \therefsegment:
\cite{sigfridsson,geer,nussbaum}\nocite{knuth:ct:a}
\printbibliography[segment=\therefsegment,check=onlynew]

\newrefsegment
refsegment \therefsegment:
\cite{sigfridsson,geer,pines,worman}\nocite{knuth:ct:a,knuth:ct:b}
\printbibliography[segment=\therefsegment,check=onlynew]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.