ismayc / thesisdown

An updated R Markdown thesis template using the bookdown package
Other
809 stars 357 forks source link

chapter bibliographies using thesisdown? #197

Open andreifoldes opened 1 year ago

andreifoldes commented 1 year ago

Describe the bug I was trying to force "thesisdown" to produce chapter specific references at the end of each chapter, where each chapter has its own bib file, specified on top, e.g:

bibliography: bib/chp1.bib link-citations: yes output: pdf_document

To Reproduce I tried different things, most recently using the 2nd response specified here: https://stackoverflow.com/questions/45028623/is-there-a-way-to-add-chapter-bibliographies-using-bookdown?rq=4 whereby I tried adding the following packages to the index.Rmd

Steps to reproduce the behavior:

    \usepackage[square, numbers, comma, sort&compress, sectionbib]{natbib}
    \usepackage{chapterbib}

and adding the following to the end of the chapters

    \bibliographystyle{unsrtnat}
    \bibliography{your_bib_file}

Expected behavior None of these worked, it could make the chapter specific bibs appear...

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

ismayc commented 1 year ago

Hi there. You are likely going to have to dig into the LaTeX files themselves in the package to get this to work. There are settings there that are probably overwriting what you want to do.