ethz-thesis icon indicating copy to clipboard operation
ethz-thesis copied to clipboard

Bibliography & citations fail - March 2020

Open omit45 opened this issue 5 years ago • 5 comments

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

omit45 avatar Mar 19 '20 09:03 omit45

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 https://github.com/tuxu/ethz-thesis/issues/3, which describes essentially the same problem.

tuxu avatar Mar 22 '20 15:03 tuxu

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

omit45 avatar Mar 23 '20 16:03 omit45

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

anfoss avatar Apr 15 '20 11:04 anfoss

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

tuxu avatar Apr 27 '20 00:04 tuxu

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

susierao avatar Jul 13 '23 09:07 susierao