I am trying to set a specific font for polutonikogreek. To make it easy to switch to that language, I defined the following command:
\newfontfamily{\Vusillus}[]{Vusillus Old Face}
\newcommand{\greek}[1]{{%
\Vusillus\selectlanguage{polutonikogreek}#1%
}}
But when I try something like this:
\greek{>erot'aw}
the font Vusillus Old Face isn't used, while this:
\Vusillus Something without a meaning
works well. Am I missing something?
Here an working example:
\documentclass[10pt,twoside]{memoir}
\usepackage[english,greek,polutonikogreek,ngerman,german]{babel}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage{scrpage2}
% rubber: set program xelatex
\usepackage{fontspec}
\usepackage{xltxtra}
\setmainfont[Numbers={OldStyle},Ligatures={Common, Historic}]{Adobe Garamond Pro}
\newfontfamily{\Vusillus}[]{Vusillus Old Face}
\newcommand{\greek}[1]{{%
\Vusillus\selectlanguage{polutonikogreek}#1%
}}
\begin{document}
Das ist nur ein Flie{\ss}text, sonst nichts: {\greek{>erot'aw}} und {\greek{>'erowc}}.
As you may have noticed the greek words are not in Vusillus, but \Vusillus this text actually is.
\end{document}
Best Answer
You can't do that way. With
babel
, the\greek
command switches to an internal font encoding that's not understood by OpenType fonts (see later for more information).With Polyglossia you can define a
\greekfont
that will do as you want, provided you input the Greek text using the actual characters.Note that
inputenc
must not be used with XeLaTeX. I simplified the language calls and used fonts I have on my system.What about entering Greek text with the old transliteration scheme? See How to insert Greek with "ascii keyboard" and XeTeX, Polyglossia
After building the
asciitogreek.tec
file following the instructions, the input can becomeOf course also text after
\greekfont
will be transliterated (I left it just by way of example). You can also use direct input of Greek characters.Actually there is a problem with
~
, see the linked answer for a workaround.