[Tex/LaTex] Hyphenation of bibliographies with multiple languages using xelatex,xgreek and biblatex

biblatexhyphenationlanguagesxetex

I am trying to use XeLaTeX to produce a document written in Greek that includes both
English and Greek bibliography.

i am using for this purpose a combination of xgreek, biblatex packages and biber.

The problem that I have is that xelatex seems to ignore the hyphenation field in the bib.
Here is an example of the style file i am using:

\RequirePackage{xltxtra}  % loads fixltx2e, etex, xunicode, fontspec
\RequirePackage{xgreek}   % for greek documents
\RequirePackage[language=greek,backend=biber,
bibencoding=utf8,natbib=true,bibstyle=authoryear,
citestyle=authoryear,babel=hyphen]{biblatex}

and here is an example of the bibliography:

@article{Ritchie_07,
Author = {Bob Ritchie and Esamaddin Khorwatt},
Journal = {The English Accounting Review},
Hyphenation = {english},
Language = {english},
Pages = {39--59},
Title = {The attitude of Libyan auditors to inherent control risk assessment},
Volume = {39},
Year = {2007}}

The problem is that I can have either hyphenation of greek bibliographies and not english,
or vice-versa. I can't have both.

I am using MikTeX 2.8. Any feedback will be greatly appreciated

Best Answer

To switch between different languages in the bibliography, biblatex uses babel's or polyglossia's macro \selectlanguage. xgreek seems to be similar to babel and polyglossia, but it doesn't define \selectlanguage.

You can try to put

\RequirePackage{polyglossia}
\newfontfamily\greekfont[Script=Greek]{Gentium} % or other font with support for greek
\setmainlanguage[variant=monotonic]{greek} % variant can be polytonic, monotonic, or ancient 
\setotherlanguage{english} % you need to put here \setotherlanguage for each language that you are using in the bibliography

to your style file instead of xgreek. Study polyglossia manual for more details.


maybe try to remove some unnecessary options of biblatex:

\RequirePackage[
  backend=biber
 ,bibencoding=utf8
 ,natbib=true
 ,style=authoryear
 ,babel=hyphen
]{biblatex}

part of problem was, that you have explicitly set bibliography language to greek.