Difference between revisions of "Russian"

From Wiki
Jump to navigation Jump to search
 
(Removed old MkII instructions and copied example from mailing list)
(17 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Russian (Cyrillic) fonts and UTF ==
+
< [[Fonts]] | [[Encodings and Regimes]] >
  
It is now possible (from ConTeXt version 2005-01-27 or 2005-01-31) to type Russian (cyrillic) letters directly in your .tex file using UTF-8 encoding. I have only tested this on TeXLive 2004, but I guess it would work on any distribution as long as you have the cm-super fonts installed (On TeXLive you had to generate the tfm files needed using the <tt>afm2tfm</tt> application, or by using the fonts in LaTeX). Here is a minimal(?) working file.
+
To use Russian in ConTeXt MkIV, you need a font that has cyrillic letters, e.g. the DejaVu fonts which are shipped with the [[ConTeXt Standalone]].
  
<texcode>
+
<context source="yes" mode="mkiv">
\enableregime[utf]
+
\setupbodyfont[dejavu]
\useencoding[cyr]
 
  
\definetypeface [russian]
+
\mainlanguage[russian]
  [rm] [serif] [computer-modern] [default] [encoding=t2a]
 
  
\setupbodyfont[russian]
 
 
\starttext
 
\starttext
Мама и Папа % Some Russian characters
+
Немного русского текста для пробы.
 
\stoptext
 
\stoptext
</texcode>
+
</context>
 +
 
 +
 
 +
For more details on how to change fonts in ConTeXt, see [[Fonts in LuaTeX]]
 +
 
 +
 
 +
[[Category:Fonts]]
 +
[[Category:International]]

Revision as of 18:15, 10 December 2013

< Fonts | Encodings and Regimes >

To use Russian in ConTeXt MkIV, you need a font that has cyrillic letters, e.g. the DejaVu fonts which are shipped with the ConTeXt Standalone.

\setupbodyfont[dejavu]

\mainlanguage[russian]

\starttext
Немного русского текста для пробы.
\stoptext


For more details on how to change fonts in ConTeXt, see Fonts in LuaTeX