blob: 490693a0ae7bb785da215c370e7be6a645513554 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nccltrus}
[2005/12/27 v1.07 Russian specifics (NCC)]
%
% \changes{v1.01}{2002/03/24}{This version is uploaded to CTAN}
% \changes{v1.02}{2004/04/08}{All options are passed to babel}
% \changes{v1.03}{2004/04/24}{Protect the package from use out of NCC}
% \changes{v1.03}{2004/04/24}{Partial activation of useful CP1251 symbols}
% \changes{v1.04}{2004/09/23}{Activate the CP1251-light input encoding}
% \changes{v1.04}{2004/09/23}{Protect cyrillic alpha-numbering with \text}
% \changes{v1.05}{2005/01/09}{Improve definition of \No command}
% \changes{v1.05}{2005/04/13}{Add a small kern to \glqq shorthand}
% \changes{v1.06}{2005/07/02}{Change kern with nonbreakable hspace in \glqq}
% \changes{v1.07}{2005/12/24}{Undo Babel's ``improvements'' to \flqq, \frqq}
% \changes{v1.07}{2005/12/27}{Move Babel's customization to other packages}
%
% The trick with temporary definition of \ver@inputenc.sty command
% removes a warning from the [russian] option of the Babel package about
% undefined input encoding. We do this trick because the input encoding
% will be defined later.
%
\@ifpackageloaded{inputenc}{%
\expandafter\let\expandafter\NCC@tempa
\csname ver@inputenc.sty\endcsname
}{%
\let\NCC@tempa\relax
\expandafter\let\csname ver@inputenc.sty\endcsname\@empty
}
\RequirePackageWithOptions{babel}
\expandafter\let\csname ver@inputenc.sty\endcsname\NCC@tempa
\ifx\cyrillicencoding\undefined \endinput\fi
%
% Load cp1251-light input encoding at the beginning of document
% if no encoding was loaded at all
%
\AtBeginDocument{%
\@ifpackageloaded{inputenc}{}{\usepackage[cp1251-light]{inputenc}}%
}
\@ifundefined{ifNCC@rus}{\endinput}{\ifNCC@rus \else \endinput\fi}
%
% Redefine \alph and \Alph to russian alphabet and
% save latin versions in \alphlatin and \Alphlatin
% The redefined versions of \@alph and \@Alph commands wrap
% contents with \text to be sure that alphabetic numbers never appear
% in math mode.
%
\RequirePackage{amstext}[1995/01/25]
\let\@alphlatin\@alph
\newcommand*\alphlatin[1]{\expandafter\@alphlatin\csname c@#1\endcsname}
\def\@alph#1{\text{\cyr\@asbuk{#1}}}
\let\@Alphlatin\@Alph
\newcommand*\Alphlatin[1]{\expandafter\@Alphlatin\csname c@#1\endcsname}
\def\@Alph#1{\text{\cyr\@Asbuk{#1}}}
\endinput
|