[XeTeX] Having correct hyphenation for multiple languages in the same document

Gildas Hamel gweltaz at ucsc.edu
Tue Jul 20 06:48:06 CEST 2010


* Gildas Hamel (gweltaz at ucsc.edu) wrote:
  |>  * George (pinkisntwell at gmail.com) wrote:
  |>    |>  I'm trying to compile a document that has both English and Greek text.
  |>    |>  I tried with polyglossia which uses the correct hyphenation for each
  |>    |>  language but ignores my selection for the English font (and not for
  |>    |>  the Greek for some reason). I try with plain xelatex and it uses the
  |>    
 I just realized it might be simpler with the following:

==========================
\documentclass[12pt]{article} 
\usepackage{fontspec} 
\usepackage{polyglossia} 
\setdefaultlanguage{greek} 
\setotherlanguage{english} 
\pagestyle {empty} 
\usepackage[a4paper,margin=1.2in]{geometry} 
\setmainfont[Mapping=tex-text,
		Numbers=OldStyle]
			{Linux Libertine O} % the only font needed
%\newfontfamily\greekfont{Linux Libertine O} 
%\newfontfamily\englishfont[Numbers=OldStyle]{Linux Libertine O} 

\begin {document}
\section* {Εκπαίδευση} 
\begin {description} \parindent=20pt 
\item \textenglish{[2003--2009:] Τ.Ε.Ι.} Πειραιά, Πτυχίο Ηλεκτρολογίας με βαθμό ``Λίαν Καλώς'', 6.74/10. O τίτλος της Πτυχιακής μου Εργασίας ήταν ``Ανάλυση Μη Γραμμικών Κυκλωμάτων'' και παρουσίαζε μεθόδους ανάλυσης κυρίως ηλεκτρονικών κυκλωμάτων σε ηλεκτρονικό υπολογιστή. 
\end {description}
\end {document}
========================



More information about the XeTeX mailing list