1

My university has provided a template for writing the thesis. However, it only prints the bibliography in the end of the thesis.

I would like to print bibliography per chapter. Can you please help?

Thanks a lot. Regards

8
  • You might be interested in § 3.7.4 Bibliography sections, pp. 85-86 in the documentation of biblatex.
    – Bernard
    Sep 28 '18 at 14:32
  • 1
    gist.github.com/moewew/13a85c603df482d03a456827b247aaa9 shows how one could turn the four-step instruction which included downloading files from elsewhere and unpacking them into a short MWE. Please try to show minimal example documents like this in the future. It is more time consuming to come up with short examples than just dumping all your code on people, but you will get better help much quicker if you don't smother people with walls of code.
    – moewe
    Sep 28 '18 at 16:12
  • 3
    @Rouge No one is being unfriendly of bullying anyone. Then thing is that when it comes to LaTeX, it's really hard to give a useful answer without seeing the preamble of your document. People are here to help you, otherwise they would be doing other things in their spare time. moewe is an expert in bibliographies, his answer will most certainly point you in the right way. I'll roll back your edit so people who see this question in the future might benefit from it. Sep 28 '18 at 16:52
  • 1
    I'm sorry that I upset you. I didn't expect that those two phrases would offend you (or indeed anyone else), but I'm not a native English speaker, so I do not necessarily know all the connotations that they entail. I hoped that the comment could help you improve your questions in the future: It is a simple matter of fact that people are more inclined (and able) to help you if your code example are compact. If they don't feel like unloading a lot of code. If they don't require visiting other webpages and downloading and unpacking .zip files. ...
    – moewe
    Sep 28 '18 at 20:58
  • 1
    ... For the people trying to help you, questions with just a link to "the code" and a huge number of lines of code can act as a deterrent.
    – moewe
    Sep 28 '18 at 21:04
5

Your document class is based on report, so I assume your highest level of sectioning is \chapter. If you use the option refsection=chapter and add a \printbibliography at the end of each chapter you get a bibliography for each chapter separately.

\documentclass[british]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber, refsection=chapter]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\chapter{Lorem}
Lorem ipsum \autocite{sigfridsson} dolor \autocite{geer,worman}
\printbibliography[heading=subbibliography, title=\bibname\ for \chaptername~\thechapter]

\chapter{Dolor}
Lorem ipsum \autocite{sigfridsson} dolor \autocite{knuth:ct:a,pines}
\printbibliography[heading=subbibliography, title=\bibname\ for \chaptername~\thechapter]

\chapter{Sit}
Lorem ipsum \autocite{sigfridsson} dolor \autocite{geer,cicero,companion}
\printbibliography[heading=subbibliography, title=\bibname\ for \chaptername~\thechapter]
\end{document}

The MWE uses heading=subbibliography so that the heading is typeset as a \section subordinate to the current \chapter.

The first chapter cites <code>sigfridsson</code>, <code>worman</code> and <code>geer</code>. The bibliography shows these three entries.

The second chapter cites <code>sigfridsson</code>, <code>knuth:ct:a</code> and <code>pines</code>. The bibliography shows these three entries.


Edit your MWE shows at least one problem: You have refsegment=chapter. But you should be using refsection=chapter.

refsections keep their contents completely local and completely independent of other refsections, which means that the numbers in the bibliography restart for each chapter. refsegments basically only add an attribute to entries and are usually only used to filter bibliographies: If you use refsegments, all entries still belong to one global list.

You can find a bit about the differences between refsection and refsegment in the biblatex documentation (§3.7.4 and §3.7.5), in Reset the counter of references in each chapter and Multiple bibliographies, multiple styles, discontiguous regions.

0

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.