0

This question might have a really simple answer that I don't see or it might be multiple stuff that I miss cause of my limited experience in TeX.

I am writing my thesis (my first and quite large project). My setup is MacTex '14 + Texmaker + subfiles package.

After quite a lot of effort this ecosystem used to work perfectly, but now that I wanted to add bibliography (package + addbibresouce+ printbibliography commands) the compilation fails with weird errors like the ones in the attached screenshot. Once I comment those lines, the first compilation fails again and after the second compilation and then, everything is back to normal.

Same thing happens when I try to add an appendix, with a slight difference that the first time after I add the \appendix command, pdf is produced. After one more compilation, chaos.

My build in Texmaker is Xelatex+ View pdf

%--------------------------------- Preamble for XelaTeX---------------------------------
\documentclass{report}

% Main Packages
%\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{subfiles}

%Bibliography
%\usepackage[backend=biber]{biblatex}
\usepackage{biblatex}
\addbibresource{bibliography.bib}

\usepackage{polyglossia} 
\setmainlanguage{greek} 
\setotherlanguage{english}

%--------------------------------- Main Document----------------------------
\begin{document}
\chapter{foo}
\subfile{chapters/ch1}

\chapter{foo1}
\subfile{chapters/ch2}

\chapter{foo2}
\subfile{chapters/ch3}

\printbibliography

%\appendix
\end{document}

enter image description here

a OS
  • 73
  • We can't run the code because of the missing files, but my current best guess is that the temporary files are not quite what you want. Delete the temporary files .aux & .bbl. – moewe Sep 13 '15 at 13:20
  • The behaviour you describe is exactly what I would expect if you switch the bibliography compiler Biber/BibTeX from one run to the other. The next run will be done with old temporary files while biblatex expects the other format, then after a run of the bibliography backend the temporary files are back to what biblatex expects. – moewe Sep 13 '15 at 13:22
  • Have a look at Biblatex with Biber: Configuring my editor to avoid undefined citations for the correct editor setup if you use Biber. Incidental with non-ancient versions of biblatex the lines \usepackage[backend=biber]{biblatex} and \usepackage{biblatex} should be equivalent, but the former is preferred. Which version does MacTex 2014 ship with? – moewe Sep 13 '15 at 13:25
  • I guess what i miss is that in the compilation Bibtex must also be included. But how do I set this up in Texmaker which is (Xelatex+Biblatex). There is no such option in the quick build default commands. I tried replacing the pdflatex build path with the xelatex's one and the choose the quick build command (pdflatex+biblatex+...) But no luck so far. I also tried to remove the aux files in the meantime. – a OS Sep 13 '15 at 14:06
  • It is either Biber you have to run or BibTeX. With \usepackage[backend=biber]{biblatex} you need to run Biber. (If you use \usepackage[backend=bibtex]{biblatex} you need BibTeX). It is better to specify the backend at loading time, so we don't get confused. You can see the link above for a integration of Biber into your editor. – moewe Sep 13 '15 at 14:13
  • I checked the link and did the specified change choosing to try biber. So (for mac) i changed the word bibtex with biber. But it did't work. Tried with bibtex as backend...same. – a OS Sep 13 '15 at 14:29
  • Yes, the trouble is that the XeLaTeX setting does not come with BibTeX in the settings. If you change the path to pdflatex to xelatex and then use the pdflatex preset it should work. – moewe Sep 13 '15 at 15:03
  • 1
    Dear @moewe, i hope u are sitting down... I change the package loading order by placing bibliography after polyglossia. And it makes sense in a way, cause polyglossia interferes with ALL packages to make them appear in Greek (as my main language is greek). No I also figured out the solution to appendix problem as well. Thank you very much for yr assistance! – a OS Sep 13 '15 at 15:22
  • Mhhh, that is interesting.... I also think that that is the natural order. I can erproduce the problem in a much shorter example and indeed it goes away after moving polyglossia to a more sensible place. With babel the order does not seem to matter greatly. Since you solved your problem, why don't you write up a short answer yourself? – moewe Sep 13 '15 at 15:29
  • You are probably right. The problem is solved for bibliography but not with the appendix. So something else is wrong. – a OS Sep 13 '15 at 15:33
  • I feel the appendix thingy is unrelated. So it would be a good idea to ask that in a new separate question, maybe you can make your MWE shorter and compilable for the new question. See http://meta.tex.stackexchange.com/q/228/35864 – moewe Sep 13 '15 at 15:43

1 Answers1

1

It seems that the problem can be dealt with by changing the order of package loading and placing polyglossia before biblatex. As the main language of the document is greek, my guess is that it has to do with polyglossia (everything is supposed to appear in greek, like Βιβλιογραφία instead of Bibliography).

The same solution does not seem to apply to the \appendix issue which I mentioned earlier.


Update: The appendix problem is caused by polyglossia too and can be dealt with by changing \setmainlanguage{greek} to \setmainlanguage[numerals=arabic]{greek} .

a OS
  • 73