1 %$PDFLaTeX -*- coding: utf-8 -*-
2 \documentclass{article
}
4 % ========================
6 \ifx\XeTeXinputencoding\undefined\else
8 \usepackage[EU1
]{fontenc}
10 \ifx\directlua\undefined\else
12 \usepackage[EU2
]{fontenc}
15 % ==================================
17 \ifx\XeTeXinputencoding\undefined\else
20 \setmainfont{CMU Serif
}
22 \ifx\directlua\undefined\else
23 % LuaTeX (a bit more explicit, as fontenc is not so stable as in XeTeX)
28 \usepackage{luaotfload
}
30 \DeclareFontFamily{OT1
}{cmu
}{}
31 \DeclareFontShape{OT1
}{cmu
}{m
}{n
}
34 \DeclareFontFamily{EU2
}{cmu
}{}
35 \DeclareFontShape{EU2
}{cmu
}{m
}{n
}
36 {<-> "name:CMU Serif:style=Roman"
}{}
37 \DeclareFontShape{EU2
}{cmu
}{m
}{it
}
38 {<-> "name:CMU Serif:style=Italic"
}{}
39 \DeclareFontShape{EU2
}{cmu
}{bx
}{n
}
40 {<-> "name:CMU Serif:style=Bold"
}{}
41 \DeclareFontShape{EU2
}{cmu
}{bx
}{it
}
42 {<-> "name:CMU Serif:style=BoldItalic"
}{}
44 \renewcommand{\rmdefault}{cmu
}
48 % ========================
50 % Values for strings= are unicode, generic and encoded (or no key at
51 % all, of course, but it won't work with this test file). In this
52 % document \chaptername and:
53 % - generic prints Greek chars in math mode with both EU1 and OT1
54 % (this is the fallback)
55 % - encoded prints real Greek chars with EUx, and math Greek with OT1
56 % - unicode prints real Greek chars with EUx, but nothing with OT1
57 % because it has none.
61 \usepackage[multienc,unigerman,strings=encoded
]{babel
}
63 % =============================
66 % \selectlanguage{austrian}
67 roman абвгд αβγδε
\textit{italic абвгд αβγδε
} \textbf{bold абвгд
70 % \show\captionsmultienc
71 % \show\captionsunienc
72 % \show\multiencchaptername
73 % \show\uniencchaptername
78 \fontencoding{OT1
}\fontfamily{cmr
}\selectfont
80 % \show\multiencchaptername
82 \chaptername{} {\tracingmacros2 \tracingcommands2 \today}