I'm experiencing a weird problem. After updating my MikTeX installation my thesis document no longer compiles. Compilation (with xelatex) hangs and takes up all of one of my CPU's cores.
However, if I take out one particular chapter (the chapters are in separate .tex files which I load with \input
) compilation completes without any problems.
But, when I compile that particular chapter separably compilation also completes without problems. In other words, the problem does not seem to be caused by the chapter itself, but rather by some combination of factors. Also, I must stress that things worked fine until I updated MikTex.
Does anyone have any ideas on what might be causing this? Or maybe just some pointers on how I could debug this situation?
EDIT (1)
(removed, the problem was not related to images after all)
EDIT (2)
I did more research and it turns out it has something to do with greek letters in math mode.
I have traced to problem to a few math expressions (between $
-signs) containing \mu
and \alpha
. These are in the aforementioned chapter.
If I comment out these expressions (or just remove \mu
and \alpha
from them) my whole thesis compiles without problem (so including the problematic chapter).
What makes this extra strange is that when I compile this chapter (with the \mu
and \alpha
expressions) in isolation -- by commenting out the loading of all other chapters in my master file -- everything works and the mu's and alpha's look fine in the pdf.
My guess it this might be a memory problem. Maybe some sort of font cache can not load the greek glyphs because it is already full with all the glyphs used elsewhere in my thesis. Does this make any sense?
Providing a MWE for this problem is hard because it simply does not seem to occur when the input is "minimal". However, this might be a relevant section of my preable:
\usepackage{amsmath,amsfonts,amssymb}
%MATH FONT: Iwona Light
\usepackage[light,math]{iwona} %for basic math symbols
%AMS Blackboald (mathbb) font (used for mathematical fields)
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\protected\def\mathbb#1{{\mathchar\numexpr256*\symAMSb+`#1\relax}}
\usepackage{mathspec} %Also loads fontspec(!)
\defaultfontfeatures{Ligatures=TeX,Scale=MatchUppercase,Numbers={Lining,Proportional}}
%MAIN FONT and MATH digits and latin letters: Computer Modern Unicode (CMU) Bright (loaded by filenames to force use of OpenType versions)
\setallmainfonts(Digits,Latin)[BoldFont={cmunbbx.otf},ItalicFont={cmunbmo.otf},BoldItalicFont={cmunbxo.otf}]{cmunbmr.otf}
%MATH greek letters: Greek font is Iwona Light (loaded by filenames to force use of OpenType versions)
\setmathsfont(Greek)[BoldFont={Iwona-Bold.otf},ItalicFont={IwonaLight-Italic.otf},BoldItalicFont={Iwona-BoldItalic.otf},Numbers={Lining,Proportional}]{IwonaLight-Regular.otf}
%SANS FONT: idem (no need to set it because CMU Bright already is a sans serif font)
%MONOSPACE (typewrite) FONT: CMU Typewriter Text Light
\setmonofont[Scale=MatchLowercase]{CMU Typewriter Text Light}
\usepackage{xltxtra} %also loads xunicode