# 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:

\usepackage{fontspec}
\newfontfamily\greekfont{Kerkis}


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\prefacename{Preface}%
\def\refname{References}%
\def\abstractname{Abstract}%
\def\bibname{Bibliography}%
\def\chaptername{Chapter}%
\def\appendixname{Appendix}%
\def\contentsname{Contents}%
\def\listfigurename{List of Figures}%
\def\listtablename{List of Tables}%
\def\indexname{Index}%
\def\figurename{Figure}%
\def\tablename{Table}%
\def\partname{Part}%
\def\enclname{Enclosed}%
%\def\ccname{Κοινοποίηση}%
\def\pagename{Page}%
\def\seename{see}%
\def\proofname{Proof}%
\def\glossaryname{Glossary}%


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!

# XeLaTeX

XeLaTeX is XeTeX with LaTeX macros. XeTeX is a useful aid in LaTeX document production as I allows you to use the systems fonts and not breaking your back while trying to make a font work in LaTeX.

To make it work in TeXMaker that I use now I simply changed the

[..]\MikTeX 2.9\miktek\bin\latex.exe option in the command options of the program with

[..]\MikTeX 2.9\miktek\bin\xelatex.exe which was already there!

Simple as pie. Other things that should be taken care off (but usually are set that way) is the character encoding set to UTF8 and the quick built should be changed manually to :

xelatex %.tex|"PDF_reader" %.pdf

Where PDF_reader is the path to the executable program that opens the .pdf files (mine was adobe reader). That is needed as the XeLaTeX does not produce .ps files but only .pdf…

Reading for it I found out that apart from MiKTeX there is an alternative compiler for windows called TeXLive. It also supports XeLaTeX so I guess the procedure to set it up is similar.