Greek in XeLaTeX Part 2

As I was to finish my master thesis I came across a small problem. I had to insert a chapter of around 10 pages describing the whole thesis in Greek. At first I was thinking just to use the xgreek package along with the xltxtra and I’d be fine. But with two problem emerged: First the xgreek package overrides all definitions on e.g. chaptername and bibname variables. This means that in the English text instead of “Chapter” I would get “Κεφάλαιο” instead. The second problem is that the font that I was using for the Thesis did not support unicode.
Starting from the latter I used:


in order to make a \greekfont family that I could use to make the text appear. I did that and avoided using chapters (only sections and subsections) and everything was good because I did not needed to use the xgreek package. Then I realized that a new problem emerged. The words in Greek would not be split in the end of sentences. Instead they would go over the margin! This could easily be solved with the xgreek package. In order to make it easy for me I used the package eventually and redefined everything (below is the code for everyone to copy)

% Partially negating xgreek package 
\def\listfigurename{List of Figures}%
\def\listtablename{List of Tables}%
\def\alsoname{see also}%

And then I realized what a fool I have been! With the use of the xgreek package the words in English would not break at the end of the sentences! That was the rest of the thesis… Thus the problem with the words not breaking could not be solved and I ended up breaking the Greek sections painfully manually. If there is any way to do it please tell me!


Greek in LaTeX

It was obvious tha sooner or later I would be in need to use greek in my LaTeX texts. To use them the Babel package is needed so (here in use with English):


then by choosing \foreignlanguage{greek} or \selectlanguage{english} you switch between languages. However you cannot use greek letters but latin ones to write in Greeks. so writing: Kalhm’era would yield: Καλημέρα.

If you need to use the Greek characters then the:


is necessary. While using that you can switch between the encodings (latin and greek) using \latintext and \greektext.

For more information on the babel package here.

For more international LaTeX here.