lcreteig/amsterdown

References per chapter

prediction-models opened this issue · 9 comments

Hi,

I'm using your package and installed it as instructed.
I would like to have my references/bibliography per chapter, instead of 1 large bibliography at the end.
Is this possible somehow?

Best,

Ben

Hi Ben,

This should be possible; I haven't documented it because PhD theses at the University of Amsterdam (for which this template was originally designed) have to have (or at least, typically have) one bibliography at the end.

For the html output I think this is actually the default, so if you delete the 06-references.Rmd chapter, it will probably work already.

However for pdf output I think most citation packages will assume you want one bibliography at the end. Did you try any of the solutions suggested on this stackoverflow question?

Dear,

thanks for reaching out. For my medical PhD format, a bibliography is required. Unfortunately, I’m not sufficiently skilled with latex to follow the instructions. Could you perhaps supply a solution or workflow of steps to follow after installation of the amsterdown package? Where and what to edit in which of the supplied files?

many thanks,

Ben

Hi Ben,

Unfortunately I don't have time in the short term to build this for you. It's also a bit outside of the scope of the package (as it was originally intended for the UvA, and you're at a different institution).

Perhaps you can find someone who's more knowledgeable about LaTex to walk you through the steps in the link I suggest? Alternatively, if you're willing to try yourself and get stuck then I might be able to help.

-Leon

I'm so sorry, tried several times but can't get it to work.
How would I need to edit index.RMD and template.tex?

Thanks in advance

Thanks for trying; too bad it doesn't seem to work. Unfortunately, at this point I'm not sure either what you have to change exactly.

I can try to implement the solution I posted earlier to see if that works for me. I'll try to find some time later this week to give it a go.

Thank you so much for your efforts and time.

Best,

Ben

I was able to get the solution I posted earlier to work.

Here's how I changed the template files:

  1. Open up 06_references.Rmd. Copy the /backmatter command in the first line, and paste it to the first line of the chapter that comes afterwards. This should be the first chapter after the "content" of your thesis (i.e. after the chapters with your individual projects and the appendix. In the default files, this is 07-summary-Dutch.Rmd).

  2. Delete 06_references.Rmd.

  3. In index.Rmd add citation_package: biblatex under the bookdown::pdf_book: options, like so:

      bookdown::pdf_book: 
        citation_package: biblatex 
  4. Add the following two lines to index.Rmd (e.g. underneath the link-citations option):

    biblio-style: authoryear
    biblatexoptions: [refsegment=chapter]
  5. To each chapter that has citations, add the following command on a new line at the end:

    \printbibliography[segment=\therefsegment,heading=subbibliography]

Note that if you want to try this out with the default template, you'll need to re-install the {amsterdown} package, as I had to modify the example thesis.bib file to make it work (see #9). But if you want to try it out with your own thesis, this shouldn't be necessary.

Hope this helps!

For future reference: this seems to be another way to accomplish this, but I couldn't get the lua filter to run.

Thanks!