% This is the file example.tex of the T2 package. \documentclass{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The following command overrides the default T2A encoding. If you % don't have new LH fonts with X2 and T2* encodings, you have to use % this command. It will select old lh* fonts with the LCY encoding. % You may also use OT2 7-bit cyrillic encoding. % % The general rule: always call the `fontenc' package *before* the BABEL % package, and also always use encoding which contains latin letters as % a last option to the `fontenc' package (i.e., X2 or OT2 must not % appear as a last option!). % % Uncomment the following line if you don't have the new LH fonts. % %\usepackage[LCY,OT1]{fontenc} % You may specify the (default) input encoding for the Russian letters. % Some of available encodings are (see cyinpenc.dtx for a full list): % cp866 --- MS-DOS Russian codepage % cp866av Alternative Variant of cp866 % cp866mav Modified Alternative Variant of cp866 % cp866nav New Alternative Variant of cp866 % cp1251 --- MS-Windows Cyrillic codepage % cp855 --- MS-DOS Cyrillic codepage % koi8-r --- koi8-r Russian codepage (as of RFC1489) % isoir111 % koi8-ru % koi8-u koi8-u Ukrainian codepage % 8859-5 --- ISO 8859-5 Cyrillic codepage % maccyr --- Apple Macintosh Cyrillic codepage (AKA MS cp10007) % macukr --- Apple Macintosh Ukrainian codepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\usepackage[cp1251,koi8-r]{inputenc} \usepackage[OT2]{fontenc} \usepackage[english,russian]{babel} % load Babel setup for English % and Russian languages; % the latter is the default \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Here goes some text in koi8-r input encoding. %It will look as a `garbage' of cyrillic glyphs if the X2 encoding is used, %because X2 does not contain latin letters. :-) %However, it will be Ok with the T2A encoding which appeared in lhfnt v3.19. % To switch the current language (and font encoding) to English, % use \English macro (or it's synonym: \Eng) % To switch the current language (and font encoding) to Russian, % use \Russian macro (or it's synonym: \Rus) % Switching languages will, in particular, set the correct hyphenation. % IMPORTANT: % If you are using X2 encoding (which does not contain latin letters), you % have to use language-switching commands (which also select the correct fonts). % You also have to use language-switching commands to have right hyphenation % anyway (unless you're using a combined `russian-english' language). % You may use several different input encodings in one document! :-) %\inputencoding{cp1251} %Here goes some text in cp1251 input encoding % You may also use several different Cyrillic font encodings in one document! % However, it is somewhat tricky to generate *both* old and new LH fonts on-the-fly % because of filename collisions; % if you really want to use both old and new LH fonts, you should generate % necessary TFM and PK files e.g. for old LH fonts and then remove `old' MF files % from the MFINPUTS directory (leaving there `new' MF files), or vice versa. %\fontencoding{T2A}\selectfont %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\large TY I VY} \begin{verse} Pustoe \emph{vy} serdechnym \emph{ty} \\ Ona, obmolvyasp1, zamenila \\ I vse schastlivye mechty \\ V dushe vlyubl\"{e}nno\U{i} vozbudila. \\ Pred ne\U{i} zadumchivo stoyu, \\ Svesti oche\U{i} s ne\"{e} net sily; \\ I govoryu e\U{i}: kak \emph{vy} mily! \\ I myslyu: kak \emph{tebya} lyublyu! \\ \end{verse} \begin{flushright} A. S. Pushkin, 1828 \end{flushright} \end{document}