I want to include source file using listing package. In that file there are some cyrillic symbols in comments.
I setup listings like:
\lstset{extendedchars=\true,basicstyle=\ttfamily}
And in result I get no spaces between russian words: вд
instead of desired в д
.
Not working minimal sample:
\documentclass[a4paper]{article}
\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{listings}
\lstset{extendedchars=\true,basicstyle=\ttfamily}
\setmonofont[Scale=0.8]{DejaVu Sans Mono}
\begin{document}
\begin{lstlisting}
привет мир
\end{lstlisting}
\end{document}
I'm using XeTeX.
@Micha
If I try to use libertine
package with xetex I get errors like:
Cannot use \XeTeXOTfeaturetag with nullfont; not an OpenType Layout font. [ ]{Linux Libertine O}]
Also I tried to run in pdflatex with literate setup, it works, thanks. But in xetex I get the same problem.
Is it possible to use listings in such way with xetex?
lstlisting
you want to typeset?listings
. :(