summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf103
1 files changed, 51 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
index 60681c5d034..acad46ca854 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
@@ -59,19 +59,26 @@
\xpg@info{Option: Russian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Russian numerals value `#1'}}
-\define@boolkey{russian}[russian@]{indentfirst}[true]{
- \ifrussian@indentfirst
- \SetLanguageKeys{russian}{indentfirst=true}
- \else
- \SetLanguageKeys{russian}{indentfirst=false}
- \fi
+\define@boolkey{russian}[russian@]{indentfirst}[true]{%
+ \ifrussian@indentfirst
+ \SetLanguageKeys{russian}{indentfirst=true}%
+ \else
+ \SetLanguageKeys{russian}{indentfirst=false}%
+ \fi%
}
\define@boolkey{russian}[russian@]{babelshorthands}[true]{}
+% Force punctuation after heading number
+\define@boolkey{russian}[russian@]{forceheadingpunctuation}[true]{}
+
% Register default options
-\xpg@initialize@gloss@options{russian}{babelshorthands=false,spelling=modern,numerals=arabic,indentfirst=false}
+\xpg@initialize@gloss@options{russian}{babelshorthands=false,
+ spelling=modern,
+ numerals=arabic,
+ indentfirst=true,
+ forceheadingpunctuation=true}
\ifsystem@babelshorthands
@@ -119,7 +126,7 @@
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
\ifx\cyrdash\undefined
- \def\cyrdash{\hbox to.8em{--\hss--}}%
+ \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}%
\fi
\declare@shorthand{russian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
@@ -216,39 +223,46 @@
\space \number\year\space г.}%
}
-% The following is based on some ideas from ruscor.sty
+% Russian needs trailing dots in all headings
+\def\xpg@save@autodot{}
+\ifdef{\KOMAScript}{%
+ \let\xpg@save@autodot\autodot%
+}
+
\def\russian@capsformat{%
+ \ifrussian@forceheadingpunctuation%
\ifdef{\KOMAScript}{%
- \ifdef{\chapterformat}{%
- \renewcommand{\chapterformat}{\prechapter\thechapter\postchapter}}{}%
- \ifdef{\sectionformat}{%
- \renewcommand{\sectionformat}{\presection\thesection\postsection}}{}%
- \ifdef{\subsectionformat}{%
- \renewcommand{\subsectionformat}{\presubsection\thesubsection\postsubsection}}{}%
- \ifdef{\subsubsectionformat}{%
- \renewcommand{\subsubsectionformat}{\presubsubsection\thesubsubsection\postsubsubsection}}{}%
- \ifdef{\paragraphformat}{%
- \renewcommand{\paragraphformat}{\preparagraph\theparagraph\postparagraph}}{}%
- \ifdef{\subparagraphformat}{%
- \renewcommand{\subparagraphformat}{\presubparagraph\thesubparagraph\postsubparagraph}}{}%
+ \renewcommand*\autodot{.}%
}{%
+ % The following is based on some ideas from ruscor.sty
\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\@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{}%
+ }%
+ \fi%
+}
+
+\def\norussian@capsformat{%
+ \ifrussian@forceheadingpunctuation%
+ \ifdef{\KOMAScript}{%
+ \let\autodot\xpg@save@autodot%
+ }{%
+ \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+ }%
+ \fi%
}
\newcommand{\russiannumerals}[2]{\russiannumber{#2}}
@@ -323,24 +337,9 @@
}
\def\noextras@russian{%
- \ifdef{\KOMAScript}{%
- \ifdef{\chapterformat}{%
- \renewcommand{\chapterformat}{\thechapter\autodot\enskip}}{}%
- \ifdef{\sectionformat}{%
- \renewcommand{\sectionformat}{\thesection\autodot\enskip}}{}%
- \ifdef{\subsectionformat}{%
- \renewcommand{\subsectionformat}{\thesubsection\autodot\enskip}}{}%
- \ifdef{\subsubsectionformat}{%
- \renewcommand{\subsubsectionformat}{\thesubsubsection\autodot\enskip}}{}%
- \ifdef{\paragraphformat}{%
- \renewcommand{\paragraphformat}{\theparagraph\autodot\enskip}}{}%
- \ifdef{\subparagraphformat}{%
- \renewcommand{\subparagraphformat}{\thesubparagraph\autodot\enskip}}{}%
- }{%
- \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
- }%
+ \norussian@capsformat%
\ifcyrillic@numerals\norussian@numbers\fi%
- \norussian@shorthands%
+ \ifrussian@babelshorthands\norussian@shorthands\fi%
}
\def\blockextras@russian{%