% \iffalse meta-comment
%
% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2008 2009
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the Standard LaTeX `Cyrillic Bundle'.
% ----------------------------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3b
% of this license or (at your option) any later version.
% The latest version of this license is in
%    https://www.latex-project.org/lppl.txt
% and version 1.3b or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% The list of all files belonging to the `Cyrillic Bundle' is
% given in the file `manifest.txt'.
%
% \fi
% \iffalse
% This is the file |ot2.dtx| of the cyrillic bundle for LaTeX2e.
%
% Copyright (C) 1996 Sebastian Rahtz, M. Ellert, F. Widmann
% Copyright (C) 1995-1997 Olga Lapko, Johannes L. Braams
% Copyright (C) 1998-2001 Werner Lemberg, Vladimir Volovich
%
%<*driver>
\documentclass{ltxdoc}
\begin{document}
\DocInput{ot2.dtx}
\end{document}
%</driver>
% \fi
%
%    \begin{macrocode}
%<*OT2>
\NeedsTeXFormat{LaTeX2e}[1998/12/01]
\ProvidesFile{ot2enc.def}
  [2001/08/11 v3.3a Cyrillic encoding definition file]
%    \end{macrocode}
%
% \section{Definitions for the \texttt{OT2} encoding}
%
%    \begin{macrocode}
\DeclareFontEncoding{OT2}{}{}
\DeclareFontSubstitution{OT2}{cmr}{m}{n}
%    \end{macrocode}
% Accents:
%    \begin{macrocode}
\DeclareTextAccent{\"}{OT2}{32}
\DeclareTextAccent{\'}{OT2}{38}
%    \end{macrocode}
% There is a |\U| accent for the wide Cyrillic breve in addition to the
% |\u| accent used for the smaller breve.  It is recommended to use |\U|
% accent for |\U{i}| and |\U{u}|.  |\U{i}| has a composite declared below.
%    \begin{macrocode}
\DeclareTextAccent{\u}{OT2}{64}
\DeclareTextAccent{\U}{OT2}{36}
\DeclareTextCommand{\d}{OT2}[1]
   {\hmode@bgroup
    \o@lign{\relax#1\crcr\hidewidth\sh@ft{10}.\hidewidth}\egroup}
\DeclareTextCommand{\.}{OT2}[1]{\TextSymbolUnavailable{\.{#1}}#1}
%    \end{macrocode}
% Letters.  We declare all letters here, including the ones which are
% accessible either directly or via ligatures from Latin letters, because we
% can use an encoding-independent notation in \textsf{Babel} support files,
% shareable for all font encodings.  It is even possible to use 7-bit |OT2|
% font encoding with 8-bit input encodings; all letters become accessible
% for accents (there is a problem when putting an accent on letters treated
% as ligatures: E.g., in ordinary text `yu' and `ya' are rendered as soft `u'
% and soft `a', but |\'{yu}| does not produce a soft `u' with an accent, but
% a `y' with an accent followed by an `u').  We use an approach based on
% standard \LaTeX\ encoding-dependent symbols (but not definitions like
% |\def\CYRA{A}|) which allows one to use several Cyrillic font encodings in
% one document.
%    \begin{macrocode}
\DeclareTextSymbol{\CYRNJE}{OT2}{0}
\DeclareTextSymbol{\CYRLJE}{OT2}{1}
\DeclareTextSymbol{\CYRDZHE}{OT2}{2}
\DeclareTextSymbol{\CYREREV}{OT2}{3}
\DeclareTextSymbol{\CYRII}{OT2}{4}
\DeclareTextSymbol{\CYRIE}{OT2}{5}
\DeclareTextSymbol{\CYRDJE}{OT2}{6}
\DeclareTextSymbol{\CYRTSHE}{OT2}{7}
\DeclareTextSymbol{\cyrnje}{OT2}{8}
\DeclareTextSymbol{\cyrlje}{OT2}{9}
\DeclareTextSymbol{\cyrdzhe}{OT2}{10}
\DeclareTextSymbol{\cyrerev}{OT2}{11}
\DeclareTextSymbol{\cyrii}{OT2}{12}
\DeclareTextSymbol{\cyrie}{OT2}{13}
\DeclareTextSymbol{\cyrdje}{OT2}{14}
\DeclareTextSymbol{\cyrtshe}{OT2}{15}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareTextSymbol{\CYRYU}{OT2}{16}
\DeclareTextSymbol{\CYRZH}{OT2}{17}
\DeclareTextSymbol{\CYRISHRT}{OT2}{18}
\DeclareTextSymbol{\CYRYO}{OT2}{19}
\DeclareTextSymbol{\CYRIZH}{OT2}{20}
\DeclareTextSymbol{\CYRFITA}{OT2}{21}
\DeclareTextSymbol{\CYRDZE}{OT2}{22}
\DeclareTextSymbol{\CYRYA}{OT2}{23}
\DeclareTextSymbol{\cyryu}{OT2}{24}
\DeclareTextSymbol{\cyrzh}{OT2}{25}
\DeclareTextSymbol{\cyrishrt}{OT2}{26}
\DeclareTextSymbol{\cyryo}{OT2}{27}
\DeclareTextSymbol{\cyrizh}{OT2}{28}
\DeclareTextSymbol{\cyrfita}{OT2}{29}
\DeclareTextSymbol{\cyrdze}{OT2}{30}
\DeclareTextSymbol{\cyrya}{OT2}{31}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareTextSymbol{\CYRYAT}{OT2}{35}
\DeclareTextSymbol{\cyryat}{OT2}{43}
%    \end{macrocode}
% We use the same command for the dotless `i' letter as in other encodings.
%    \begin{macrocode}
\DeclareTextSymbol{\i}{OT2}{61}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareTextSymbol{\CYRA}{OT2}{65}
\DeclareTextSymbol{\CYRB}{OT2}{66}
\DeclareTextSymbol{\CYRC}{OT2}{67}
\DeclareTextSymbol{\CYRD}{OT2}{68}
\DeclareTextSymbol{\CYRE}{OT2}{69}
\DeclareTextSymbol{\CYRF}{OT2}{70}
\DeclareTextSymbol{\CYRG}{OT2}{71}
\DeclareTextSymbol{\CYRH}{OT2}{72}
\DeclareTextSymbol{\CYRI}{OT2}{73}
\DeclareTextSymbol{\CYRJE}{OT2}{74}
\DeclareTextSymbol{\CYRK}{OT2}{75}
\DeclareTextSymbol{\CYRL}{OT2}{76}
\DeclareTextSymbol{\CYRM}{OT2}{77}
\DeclareTextSymbol{\CYRN}{OT2}{78}
\DeclareTextSymbol{\CYRO}{OT2}{79}
\DeclareTextSymbol{\CYRP}{OT2}{80}
\DeclareTextSymbol{\CYRCH}{OT2}{81}
\DeclareTextSymbol{\CYRR}{OT2}{82}
\DeclareTextSymbol{\CYRS}{OT2}{83}
\DeclareTextSymbol{\CYRT}{OT2}{84}
\DeclareTextSymbol{\CYRU}{OT2}{85}
\DeclareTextSymbol{\CYRV}{OT2}{86}
\DeclareTextSymbol{\CYRSHCH}{OT2}{87}
\DeclareTextSymbol{\CYRSH}{OT2}{88}
\DeclareTextSymbol{\CYRERY}{OT2}{89}
\DeclareTextSymbol{\CYRZ}{OT2}{90}
\DeclareTextSymbol{\CYRSFTSN}{OT2}{94}
\DeclareTextSymbol{\CYRHRDSN}{OT2}{95}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareTextSymbol{\cyra}{OT2}{97}
\DeclareTextSymbol{\cyrb}{OT2}{98}
\DeclareTextSymbol{\cyrc}{OT2}{99}
\DeclareTextSymbol{\cyrd}{OT2}{100}
\DeclareTextSymbol{\cyre}{OT2}{101}
\DeclareTextSymbol{\cyrf}{OT2}{102}
\DeclareTextSymbol{\cyrg}{OT2}{103}
\DeclareTextSymbol{\cyrh}{OT2}{104}
\DeclareTextSymbol{\cyri}{OT2}{105}
\DeclareTextSymbol{\cyrje}{OT2}{106}
\DeclareTextSymbol{\cyrk}{OT2}{107}
\DeclareTextSymbol{\cyrl}{OT2}{108}
\DeclareTextSymbol{\cyrm}{OT2}{109}
\DeclareTextSymbol{\cyrn}{OT2}{110}
\DeclareTextSymbol{\cyro}{OT2}{111}
\DeclareTextSymbol{\cyrp}{OT2}{112}
\DeclareTextSymbol{\cyrch}{OT2}{113}
\DeclareTextSymbol{\cyrr}{OT2}{114}
\DeclareTextSymbol{\cyrs}{OT2}{115}
\DeclareTextSymbol{\cyrt}{OT2}{116}
\DeclareTextSymbol{\cyru}{OT2}{117}
\DeclareTextSymbol{\cyrv}{OT2}{118}
\DeclareTextSymbol{\cyrshch}{OT2}{119}
\DeclareTextSymbol{\cyrsh}{OT2}{120}
\DeclareTextSymbol{\cyrery}{OT2}{121}
\DeclareTextSymbol{\cyrz}{OT2}{122}
\DeclareTextSymbol{\cyrsftsn}{OT2}{126}
\DeclareTextSymbol{\cyrhrdsn}{OT2}{127}
%    \end{macrocode}
% Other symbols:
%    \begin{macrocode}
%\DeclareTextSymbol{\texthyphenchar}{OT2}{45}
%\DeclareTextSymbol{\texthyphen}{OT2}{45}
\DeclareTextSymbol{\textquoteleft}{OT2}{96}
\DeclareTextSymbol{\textquoteright}{OT2}{39}
\DeclareTextSymbol{\textquotedblleft}{OT2}{92}
\DeclareTextSymbol{\textquotedblright}{OT2}{34}
\DeclareTextSymbol{\guillemotleft}{OT2}{60}
\DeclareTextSymbol{\guillemotright}{OT2}{62}
\DeclareTextSymbol{\textendash}{OT2}{123}
\DeclareTextSymbol{\cyrdash}{OT2}{124}
\DeclareTextSymbol{\textemdash}{OT2}{124}
\DeclareTextSymbol{\textnumero}{OT2}{125}
%    \end{macrocode}
% Some `obvious' composites:
%    \begin{macrocode}
\DeclareTextComposite{\U}{OT2}{I}{18}
\DeclareTextComposite{\U}{OT2}{i}{26}
\DeclareTextComposite{\"}{OT2}{E}{19}
\DeclareTextComposite{\"}{OT2}{e}{27}
\DeclareTextComposite{\.}{OT2}{\i}{12}
%    \end{macrocode}
% The following declarations will not work for 8-bit chars generated via
% |inputenc| unless a |dblaccnt| package is used.
%    \begin{macrocode}
\DeclareTextComposite{\U}{OT2}{\CYRI}{18}
\DeclareTextComposite{\U}{OT2}{\cyri}{26}
\DeclareTextComposite{\"}{OT2}{\CYRE}{19}
\DeclareTextComposite{\"}{OT2}{\cyre}{27}
%</OT2>
%    \end{macrocode}
\endinput
