[XeTeX] Listings and XeLaTeX
Nikos Platis
nplatis at uop.gr
Tue Sep 23 22:13:10 CEST 2008
I have been experimenting with the listings package in a XeLaTeX
document and I found an incompatibility when greek is used.
Here is a minimal test case:
---------------------
\documentclass{article}
\newcommand{\MainFont}{Cambria}
\newcommand{\MonoFont}{Consolas}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{\MainFont}
\setmonofont{\MonoFont}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{listings}
\begin{document}
\lstset{
language=C,
basicstyle=\ttfamily
}
{\itshape\ttfamily Καλημέρα Goodmorning}
\begin{lstlisting}
// Comment in english 123 456
// Σχόλιο στα ελληνικά 123 456
\end{lstlisting}
\end{document}
---------------------
In the resulting pdf, the comment in greek do not appear in italics as
are the english comment, and the spaces between words also disappear.
Any ideas?
Thanks in advance,
Nikos Platis
--
-----------------------------------------------------------------------
Nikos Platis
Lecturer http://www.uop.gr/~nplatis/
University of Peloponnese email: nplatis at uop.gr
Department of Computer Science and Technology tel: +30 2710 372264
-----------------------------------------------------------------------
"The empires of the future are the empires of the mind." - W. Churchill
-----------------------------------------------------------------------
New Textbook: Graphics & Visualization
http://www.akpeters.com/product.asp?ProdCode=2744
-----------------------------------------------------------------------
More information about the XeTeX
mailing list