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 & citations fail - March 2020 #4

Open
omit45 opened this issue Mar 19, 2020 · 5 comments
Open

Bibliography & citations fail - March 2020 #4

omit45 opened this issue Mar 19, 2020 · 5 comments

Comments

@omit45
Copy link

omit45 commented Mar 19, 2020

Hi,

First of all thank you for the great template!
When I run your original thesis.tex file with TeXShop (4.44), everything works except the bibliography. Citations are not shown correctly, e.g. [codata] instead [1] and the bibliography is not printed at all.

Do you have any solution to this problem?

Cheers

@tuxu
Copy link
Owner

tuxu commented Mar 22, 2020

Just tested with MacTeX 2019 and the TeXShop 4.44. The problem is with the commands for compiling the TeX files and bibliography, which default to pdflatex and bibtex.

Change it to pdflatexmk and everything works as expected:
texshop

See also more details in #3, which describes essentially the same problem.

@omit45
Copy link
Author

omit45 commented Mar 23, 2020

Hello,
Thank you for your help, with pdflatexmk it works for me as well!
Another question: for my thesis I would like to have separated references for every chapter. How would you implement that?
I already tried the following within the main.tex file of individual chapters:
\begin{refsection}[bibliography]
\printbibliography[heading=none]
\end{refsection}[bibliography]
Unfortunately this was not successful. Somehow it creates a bibliography of all references from the whole document (after the first chapter) and the subsequent bibliographies+citations do not work..
I would appreciate any hint!
Cheers

@anfoss
Copy link

anfoss commented Apr 15, 2020

One solution is to copy compile the chapters separately, and copy paste the .bbl file content into the chapter. A bit hacky but does the trick

@tuxu
Copy link
Owner

tuxu commented Apr 27, 2020

Seems like the most elegant way is with biblatex' refsection environment. Did you try without the [bibliography]?

There's a complete example on Overleaf:
https://de.overleaf.com/latex/examples/per-chapter-bibliographies-with-biblatex/yhdqvxtftwxf

@susierao
Copy link

susierao commented Jul 13, 2023

Thank you very much @tuxu for this amazing template.

One glitch I spent quite some time fixing is the biblatex to natbib, when using authoryear style, which is the required style of ETHZ dissertation nowadays.
The former will be outdated quite soon, so the standard bibliography package is natbib.

One needs to only change the following lines.

  1. In preamble/general.txt,

% % Biblatex
% \input{preamble/biblatex} % do not use this
\usepackage[sort]{natbib}
\setcitestyle{authoryear}
\bibliographystyle{plainnat}

  1. In thesis.tex,

% \cleardoublepage\include{frontbackmatter/bibliography}

\bibliographystyle{plainnat} % Specify the bibliography style
\bibliography{bibliography} % Specify the name of your .bib file

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

4 participants