[XeTeX] beginners trouble

Martin Henning martin at easy2design.de
Fri Nov 11 20:33:10 CET 2005


Hi Pavel,

On Nov 11, 2005, at 10:03 PM, Pavel Straňák wrote:

> As another beginner I would say, instead of latin1, type everything  
> in utf8. Just type the real German and cyrilic letters, not TeX  
> sequences, and don't define "inputenc" or "fontenc". Everything  
> should work then

Of course the file is uft8, i wouldn't need xetex if it wasn't,  
right? :)
The problem rather seem to be the right fontspec commands. I found  
some really ugly solution in the archiv of macosx-tex mailing list,  
but it doesn't make use of the fontspec package and only imports  
Lucida Font, which is awful for my taste. I would like to have style  
like default LaTeX font for both languages. Will read some mor einto  
the fontspec-package documentation, but it's all pretty cryptic or a  
beginner...

The working solution i have at the moment looks like that:

=== begin test.tex =====================================================

%&program=xelatex
%&encoding=UTF-8 Unicode

\documentclass[a4paper]{scrreprt}
\usepackage{ngerman}

\DeclareFontFamily{U}{lucida}{}
\DeclareFontShape{U}{lucida}{m}{n}
    {<-> "Lucida\space Grande:mapping=tex-text"}{}
\DeclareFontShape{U}{lucida}{b}{n}
    {<-> "Lucida\space Grande\space Bold:mapping=tex-text"}{}
\DeclareFontShape{U}{lucida}{bx}{n}
    {<-> ssub * lucida/b/n}{}
\renewcommand{\sfdefault}{lucida}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\encodingdefault}{U}

\begin{document}

Hallo aus Moskau

Привет из Москвы

\end{document}

=== end test.tex =====================================================

So long,

Martin



More information about the XeTeX mailing list