% xu-ruhyphen.tex
% Wrapper for XeTeX to read Russian hyphenation patterns
% Jonathan Kew, 2006-08-19
% Public domain

\begingroup

% Please uncomment the pattern value you need before creating a new
% format file containing Russian hyphenation patterns:

\ifx\Pattern\undefined
\def\Pattern{al}
%\def\Pattern{as}
%\def\Pattern{ct}
%\def\Pattern{dv}
%\def\Pattern{mg}
%\def\Pattern{vl}
%\def\Pattern{zn}
\fi

% For non-XeTeX use, also check the encoding options in ruhyphen.tex

\expandafter\ifx\csname XeTeXrevision\endcsname\relax

  \input ruhyphen.tex

\else

  \let\PATTERNS=\patterns
  \def\patterns{%
    \XeTeXinputencoding "KOI8-R"
    \PATTERNS
  }
  
  \input ruhyph\Pattern
  \input cyryo\Pattern
  
  % additional patterns from ruhyphen.tex, converted to Unicode
  \PATTERNS{.^^^^043d^^^^04358 8^^^^043d^^^^0435.}
  \PATTERNS{8^^^^0431^^^^044a. 8^^^^0432^^^^044a. 8^^^^0433^^^^044a.
            8^^^^0434^^^^044a. 8^^^^0436^^^^044a. 8^^^^0437^^^^044a.
            8^^^^043a^^^^044a. 8^^^^043b^^^^044a. 8^^^^043c^^^^044a.
            8^^^^043d^^^^044a. 8^^^^043f^^^^044a. 8^^^^0440^^^^044a.
            8^^^^0441^^^^044a. 8^^^^0442^^^^044a. 8^^^^0444^^^^044a.
            8^^^^0445^^^^044a. 8^^^^0446^^^^044a. 8^^^^0447^^^^044a.
            8^^^^0448^^^^044a. 8^^^^0449^^^^044a.}

\fi

\endgroup

\lefthyphenmin2 % settings copied from ruhyphen.tex
\righthyphenmin2

\endinput
