diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/ncclatex/nccltrus.sty |
Initial commit
Diffstat (limited to 'macros/latex/contrib/ncclatex/nccltrus.sty')
-rw-r--r-- | macros/latex/contrib/ncclatex/nccltrus.sty | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/macros/latex/contrib/ncclatex/nccltrus.sty b/macros/latex/contrib/ncclatex/nccltrus.sty new file mode 100644 index 0000000000..490693a0ae --- /dev/null +++ b/macros/latex/contrib/ncclatex/nccltrus.sty @@ -0,0 +1,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 |