summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-13 22:15:54 +0000
committerKarl Berry <karl@freefriends.org>2013-05-13 22:15:54 +0000
commit1ff28b17fa5479687257ee4525e3a06c8aa0a2c7 (patch)
tree22d0f15f3680a26ce6a158e96b25bf1908471b9e /Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
parente26fdd32ad8dc28823e2f351c31afa0dad690da9 (diff)
polyglossia (13may13)
git-svn-id: svn://tug.org/texlive/trunk@30442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf253
1 files changed, 253 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
new file mode 100644
index 00000000000..78c984afc89
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
@@ -0,0 +1,253 @@
+\ProvidesFile{gloss-russian.ldf}[polyglossia: module for russian]
+\PolyglossiaSetup{russian}{
+ script=Cyrillic,
+ scripttag=cyrl,
+ langtag=RUS,
+ hyphennames={russian},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup
+ %TODO localalph={russian@alph,russian@Alph}
+}
+
+\define@key{russian}{spelling}[modern]{%
+ \ifstrequal{#1}{old}%
+ {\def\captionsrussian{\captionsrussian@old}%
+ \def\daterussian{\daterussian@old}}%
+ {\def\captionsrussian{\captionsrussian@modern}%
+ \def\daterussian{\daterussian@modern}}%
+}
+
+\newif\ifcyrillic@numerals
+\define@key{russian}{numerals}[latin]{%
+ \ifstrequal{#1}{cyrillic}%
+ {\cyrillic@numeralstrue}
+ {\cyrillic@numeralsfalse}
+}
+
+\define@boolkey{russian}[russian@]{babelshorthands}[false]{}
+
+\setkeys{russian}{spelling,numerals}
+
+\ifsystem@babelshorthands
+ \setkeys{russian}{babelshorthands=true}
+\else
+ \setkeys{russian}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+ \input{babelsh.def}%
+ \initiate@active@char{"}%
+}{}
+
+\def\russian@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{russian}%
+% \declare@shorthand{russian}{"`}{„}%
+% \declare@shorthand{russian}{"'}{“}%
+% \declare@shorthand{russian}{"<}{«}%
+% \declare@shorthand{russian}{">}{»}%
+ \declare@shorthand{russian}{""}{\hskip\z@skip}%
+ \declare@shorthand{russian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{russian}{"=}{\nobreak-\hskip\z@skip}%
+ \declare@shorthand{russian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+ \declare@shorthand{russian}{"-}{%
+ \def\russian@sh@tmp{%
+ \if\russian@sh@next-\expandafter\russian@sh@emdash
+ \else\expandafter\russian@sh@hyphen\fi
+ }%
+ \futurelet\russian@sh@next\russian@sh@tmp}%
+ \def\russian@sh@hyphen{%
+ \nobreak\-\bbl@allowhyphens}%
+ \def\russian@sh@emdash##1##2{\cdash-##1##2}%
+ \def\cdash##1##2##3{\def\tempx@{##3}%
+ \def\tempa@{-}\def\tempb@{~}\def\tempc@{*}%
+ \ifx\tempx@\tempa@\@Acdash\else
+ \ifx\tempx@\tempb@\@Bcdash\else
+ \ifx\tempx@\tempc@\@Ccdash\else
+ \errmessage{Wrong usage of cdash}\fi\fi\fi}
+ \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi
+ \cyrdash\hskip.2em\ignorespaces}%
+ \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi
+ \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}%
+ \def\@Ccdash{\leavevmode
+ \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+ \ifx\cyrdash\undefined
+ \def\cyrdash{\hbox to.8em{--\hss--}}
+ \fi
+ \declare@shorthand{russian}{",}{\nobreak\hskip.2em\ignorespaces}%
+}
+
+\def\norussian@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+
+
+\def\captionsrussian@modern{%
+ \def\prefacename{Предисловие}%
+ \def\refname{Список литературы}%
+ \def\abstractname{Аннотация}%
+ \def\bibname{Литература}%
+ \def\chaptername{Глава}%
+ \def\appendixname{Приложение}%
+ \ifcsundef{thechapter}%
+ {\def\contentsname{Содержание}}%
+ {\def\contentsname{Оглавление}}%
+ \def\listfigurename{Список иллюстраций}%
+ \def\listtablename{Список таблиц}%
+ \def\indexname{Предметный указатель}%
+ \def\authorname{Именной указатель}%
+ \def\figurename{Рис.}%
+ \def\tablename{Таблица}%
+ \def\partname{Часть}%
+ \def\enclname{вкл.}%
+ \def\ccname{исх.}%
+ \def\headtoname{вх.}%
+ \def\pagename{с.}%
+ \def\seename{см.}%
+ \def\alsoname{см.~также}%
+ \def\proofname{Доказательство}%
+}
+\def\daterussian@modern{%
+ \def\today{\number\day%
+ \space\ifcase\month\or%
+ января\or
+ февраля\or
+ марта\or
+ апреля\or
+ мая\or
+ июня\or
+ июля\or
+ августа\or
+ сентября\or
+ октября\or
+ ноября\or
+ декабря\fi%
+ \space \number\year\space г.}}
+
+\def\captionsrussian@old{%
+ \def\prefacename{Предисловіе}%
+ \def\refname{Примѣчанія}%
+ \def\abstractname{Аннотація}%
+ \def\bibname{Библіографія}%
+ \def\chaptername{Глава}%
+ \def\appendixname{Приложеніе}%
+ \ifcsundef{thechapter}%
+ {\def\contentsname{Содержаніе}}%
+ {\def\contentsname{Оглавленіе}}%
+ \def\listfigurename{Списокъ иллюстрацій}%
+ \def\listtablename{Списокъ таблицъ}%
+ \def\indexname{Предмѣтный указатель}%
+ \def\authorname{Именной указатель}%
+ \def\figurename{Рис.}%
+ \def\tablename{Таблица}%
+ \def\partname{Часть}%
+ \def\enclname{вкл.}%
+ \def\ccname{исх.}%
+ \def\headtoname{вх.}%
+ \def\pagename{с.}%
+ \def\seename{см.}%
+ \def\alsoname{см.~также}%
+ \def\proofname{Доказательство}%
+}
+\def\daterussian@old{%
+ \def\today{\number\day%
+ \space\ifcase\month\or%
+ января\or
+ февраля\or
+ марта\or
+ апреля\or
+ мая\or
+ іюня\or
+ іюля\or
+ августа\or
+ сентября\or
+ октября\or
+ ноября\or
+ декабря\fi%
+ \space \number\year\space г.}}
+
+% The following is based on some ideas from ruscor.sty
+\def\russian@capsformat{%
+ \def\@seccntformat##1{\csname pre##1\endcsname%
+ \csname the##1\endcsname%
+ \csname post##1\endcsname}%
+ \def\@aftersepkern{\hspace{0.5em}}%
+ \def\postchapter{.\@aftersepkern}%
+ \def\postsection{.\@aftersepkern}%
+ \def\postsubsection{.\@aftersepkern}%
+ \def\postsubsubsection{.\@aftersepkern}%
+ \def\postparagraph{.\@aftersepkern}%
+ \def\postsubparagraph{.\@aftersepkern}%
+ \def\prechapter{}%
+ \def\presection{}%
+ \def\presubsection{}%
+ \def\presubsubsection{}%
+ \def\preparagraph{}%
+ \def\presubparagraph{}}
+
+\def\Asbuk#1{\expandafter\russian@Alph\csname c@#1\endcsname}
+\def\russian@Alph#1{\ifcase#1\or
+ А\or Б\or В\or Г\or Д\or Е\or Ж\or
+ З\or И\or К\or Л\or М\or Н\or О\or
+ П\or Р\or С\or Т\or У\or Ф\or Х\or
+ Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я\else\xpg@ill@value{#1}{russian@Alph}\fi}
+\def\asbuk#1{\expandafter\russian@alph\csname c@#1\endcsname}
+\def\russian@alph#1{\ifcase#1\or
+ а\or б\or в\or г\or д\or е\or ж\or
+ з\or и\or к\or л\or м\or н\or о\or
+ п\or р\or с\or т\or у\or ф\or х\or
+ ц\or ч\or ш\or щ\or э\or ю\or я\else\xpg@ill@value{#1}{russian@alph}\fi}
+
+\def\russian@numbers{%
+ \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \ifcyrillic@numerals
+ \let\@alph\russian@alph%
+ \let\@Alph\russian@Alph%
+ \fi
+}
+
+\def\norussian@numbers{%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
+}
+
+\def\noextras@russian{%
+ \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+ \ifcyrillic@numerals\norussian@numbers\fi
+ \norussian@shorthands%
+}
+
+\def\blockextras@russian{%
+ \russian@capsformat%
+ \ifcyrillic@numerals\russian@numbers\fi
+ \ifrussian@babelshorthands\russian@shorthands\fi
+}
+
+\def\inlineextras@russian{%
+ \ifrussian@babelshorthands\russian@shorthands\fi%
+}
+
+%%% These lines taken from russianb.ldf, part of babel package.
+% make it optional?
+\def\sh {\mathop{\operator@font sh}\nolimits}
+\def\ch {\mathop{\operator@font ch}\nolimits}
+\def\tg {\mathop{\operator@font tg}\nolimits}
+\def\arctg {\mathop{\operator@font arctg}\nolimits}
+\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
+\def\th {\mathop{\operator@font th}\nolimits}
+\def\ctg {\mathop{\operator@font ctg}\nolimits}
+\def\cth {\mathop{\operator@font cth}\nolimits}
+\def\cosec {\mathop{\operator@font cosec}\nolimits}
+\def\Prob {\mathop{\kern\z@\mathsf{P}}\nolimits}
+\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
+\def\nod {\mathop{\mathrm{н.о.д.}}\nolimits}
+\def\nok {\mathop{\mathrm{н.о.к.}}\nolimits}
+\def\NOD {\mathop{\mathrm{НОД}}\nolimits}
+\def\NOK {\mathop{\mathrm{НОК}}\nolimits}
+\def\Proj {\mathop{\mathrm{Пр}}\nolimits}
+%\DeclareRobustCommand{\No}{№}
+
+\endinput
+