Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bibliography after each chapter #51

Closed
blazzter opened this issue Dec 24, 2015 · 6 comments
Closed

Bibliography after each chapter #51

blazzter opened this issue Dec 24, 2015 · 6 comments

Comments

@blazzter
Copy link

Is there some easy setting to have references after each chapter? thanks

@tabias
Copy link
Contributor

tabias commented Dec 24, 2015

Including the below section in each chapter.tex allowed me to include a reference chapterwise using natbib.

%********************************** % Reference Section *************************************
\setcounter{NAT@ctr}{0}
\bibliographystyle{unsrtnat}
\bibliography{References/library}

this worked for me when running latexmk -xelatex thesis.tex

@blazzter
Copy link
Author

Almost works, it creates the same bibliography section with same references, even tho there is no such citation in some chapters. Could this be bacause I use same bibliography file for all chapters? Chapters are in separate dirs.

@tabias
Copy link
Contributor

tabias commented Dec 24, 2015

I have 1 general library.bib file in References/ used for all chapters, so that can't be it.

Did you remove the bibliography from thesis.tex?
This could overwrite a whole lot.

these lines should be commented in thesis.tex

\bibliographystyle{abbrvnat} % use this to have URLs listed in References
\cleardoublepage
\bibliography{References/library} % Path to your References.bib file

\printbibliography[heading=bibintoc, title={References}]

@kks32
Copy link
Owner

kks32 commented Dec 25, 2015

Thanks for your comments @tabias I'll include it in the README docs.

@blazzter
Copy link
Author

I can get it running by using \usepackage{chapterbib} in preamble.tex
I also have to manually do bibtex chapterX.aux within all chapter dirs, but then it runs ok
// also need to use code from @tabias as was suggested, thx

@tabias
Copy link
Contributor

tabias commented Dec 27, 2015

might have forgotten to mention that, was included somewhere else in the preamble than I expected.
furthermore

latexmk -xelatex thesis.tex -jobname="thesis"

generated the chapter reference lists automatically if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants