summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-russian/russianb.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/generic/babel-russian/russianb.dtx')
-rw-r--r--Master/texmf-dist/source/generic/babel-russian/russianb.dtx1570
1 files changed, 909 insertions, 661 deletions
diff --git a/Master/texmf-dist/source/generic/babel-russian/russianb.dtx b/Master/texmf-dist/source/generic/babel-russian/russianb.dtx
index 1ca27766beb..872e673eb77 100644
--- a/Master/texmf-dist/source/generic/babel-russian/russianb.dtx
+++ b/Master/texmf-dist/source/generic/babel-russian/russianb.dtx
@@ -1,64 +1,255 @@
% \iffalse meta-comment
-% !Mode:: "TEX:DTX:UNIX:UTF-8:US:RU"
-%
-% Copyright 2011-2013 Igor A. Kotelnikov.
-% Copyright 1995-2008 Olga Lapko.
-% Copyright 1989-2012 Johannes L. Braams and any individual authors
-% listed elsewhere in this file.
-% All rights reserved.
-%
-% This file is part of the Babel system.
-% --------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Igor A. Kotelnikov.
-%
-% \fi
-% \CheckSum{1947}
-%
-% \iffalse
-% Tell the \LaTeX\ system who we are and write an entry on the
-% transcript.
-%<*dtx>
-\ProvidesFile{russianb.dtx}
-%</dtx>
-%<code>\ProvidesLanguage{russian}
-%\fi
-%\ProvidesFile{russianb.dtx}
- [2014/06/02 1.3c Russian support from the babel system]
-%\iffalse
+% !TEX program = xeLaTeX
+% !Mode:: TEX:DTX:UNIX:UTF-8:US:RU
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+----------------------------------------------------------------
+
+Russian language module for Babel, v1.3f
+
+Released under the LaTeX Project Public License v1.3c or later.
+See http://www.latex-project.org/lppl.txt
+
+The package provides support for use of Babel in documents written in Russian
+(in both traditional and ancient forms). The support is adapted for use both
+under legacy TEX engines, and under X∃TEX and LuaTEX.
+
+The Current Maintainer is Igor A. Kotelnikov <kia999 at mail dot ru>.
+
+
+1. INSTALLATION
+
+- unpack babel-russian.zip
+- run "xelatex.exe russianb.dtx" (recommended)
+ or "pdflatex.exe russianb.dtx";
+ run "tex.exe russianb.dtx"
+ or "tex.exe russianb.ins", if you don't need documentation
+- move "russianb.ldf" to <textmf>/tex/generic/babel/contrib/
+- move "russianb.pdf" to <textmf>/doc/latex/russian-babel/
+- update filename base (see documentation for your TeX system)
+
+
+2. USAGE
+
+Russian language definition file can be used both with legacy 8-bit engines
+(such as latex.exe or pdflatex.exe) and Unicode compilers (xelatex.exe or
+lualatex.exe). The unicode engines can be ran either in Unicode mode or 8-bit
+compatibility mode, which emulates the legacy engines. The two modes differ by
+a set of packages loaded in the preamble of a source TeX file. It is important
+to keep recommended order of the packages loaded, especially when running
+Unicode engines in a compatibility 8-bit mode.
+
+In the examples below, it is assumed that a source file has utf8 input encoding.
+
+2.1. 8-bit mode
+
+2.1.1 PDFLATeX, LaTeX
+
+ \usepackage[T1,T2A]{fontenc}
+ \usepackage[utf8]{inputenc}
+ \usepackage[english,russian]{babel}
+
+2.1.2 LuaLaTeX
+
+ \usepackage[T1,T2A]{fontenc}
+ \usepackage[lutf8]{luainputenc}
+ \usepackage[english,russian]{babel}
+
+2.1.3 XeLaTeX
+
+ \XeTeXinputencoding "bytes"
+ \usepackage[utf8]{inputenc}
+ \usepackage[T2A]{fontenc}
+ \usepackage[english,russian]{babel}
+
+2.2 Unicode mode, LuaLaTeX or XeLaTeX
+
+ \usepackage{fontspec}
+ \defaultfontfeatures{Ligatures={TeX}}
+ \setmainfont{CMU Serif}
+ \setsansfont{CMU Sans Serif}
+ \setmonofont{CMU Typewriter Text}
+ \usepackage[english,russian]{babel}
+
+Instead of the Computer Modern Unicode (CMU) fonts loaded in this example,
+you may use any True Type or Open Type fonts installed on your computer.
+
+2.3 Typesetting ancient book
+
+ \usepackage[english,russian]{babel}
+ \languageattribute{russian}{ancient}
+or
+ \usepackage[english,russian.ancient]{babel}
+
+Using unicode mode is strongly recommended for typesetting ancient texts.
+Be sure to take X2 or OT2 font encodings when running 8-bit engine such
+as latex or pdflatex.
+
+
+3. DOCUMENTATION
+
+See russianb.pdf for more information.
+
+
+4. KNOWN PROBLEMS
+
+Before switching from a legacy 8-bit engine (tex, pdftex) to an Unicode
+engine (xetex, luatex) and vise versa delete all .aux, .toc, .lot, .lof
+files as they might have stored incompatible internal encodings.
+
+T2* font encodings do not have legacy Cyrillic letters `yat', which is
+hard-coded in ancient caption names. Be sure to use an Unicode engine
+or borrow `\cyryat` and `\CYRYAT` commands from X2 font encoding when setting
+the language attribute to "ancient", for example:
+
+ \usepackage[X2,T2A]{fontenc}
+ \usepackage[utf8]{inputenc}
+ \DeclareUnicodeCharacter{0462}{\CYRYAT}
+ \DeclareTextSymbolDefault{\CYRYAT}{X2}
+ \DeclareUnicodeCharacter{0463}{\cyryat}
+ \DeclareTextSymbolDefault{\cyryat}{X2}
+ \usepackage[english,russian.ancient]{babel}
+
+Consult your font documentation for other ancient glyphs which
+might be absent.
+
+
+5. CHANGES
+
+2014-10-21 version 1.3f
+
+ * A documentation file russianb.pdf can now be generated by
+ running pdflatex.exe over russianb.dtx although xelatex.exe
+ is still recommended.
+
+ * russianb.ins was missed in version 1.3e.
+
+2014-10-14 version 1.3e
+
+ * Generating all stuff from single dtx file.
+
+2014-10-02 version 1.3d
+
+ * Bug fix in \Proj.
+
+2014-06-02 version 1.3c
+
+ * Bug fix in \daterussian.
+
+2013-04-06 version 1.3b
+
+ * Added support for the packages \pkg{listing}, \pkg{nomencl}, and
+ \pkg{nomentbl}.
+
+2013-04-18 version 1.3a
+
+ * Added the language attribute 'ancient' for typesetting old
+ Slavonic and Church books.
+
+2013-04-08 version 1.3
+
+ * Updated for babel 3.9.
+ * \Alph and \alph commands are not redefined any more by russianb.ldf.
+
+2012-06-02 version 1.2a
+
+ * russian/russianb.dtx, v1.2a : Indentation of 1st paragraph removed;
+ use the indentfirst package to automatically indent first paragraph
+ after sectioning commands.
+
+2011-10-20 version 1.2 Igor A. Kotelnikov <kia999 at mail dot ru>
+
+ * Added support for LuaTeX and XeTeX;
+ added translation for Glossary; removed \Rus, \English,
+ \Eng, \cyrmath.., \latinencoding, \latintext;
+ \Russian is now an alias for \selectlanguage{russian}.
+
+Original source: russianb.dtx,
+ 2008/03/21 v1.1r Russian support from the babel system.
+
+----------------------------------------------------------------
+%</readme>
+%<*internal>
+\fi
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%</internal>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+----------------------------------------------------------------
+Russian Language Support for the Babel package
+E-mail: kia999@mail.ru
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+\endpreamble
+\postamble
+----------------------------------------------------------------
+Copyright 2011-2014 Igor A. Kotelnikov.
+Copyright 1995-2008 Olga Lapko.
+Copyright 1989-2012 Johannes L. Braams.
+
+This file is a part of the Russian-Babel package.
+
+It may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in the file:
+
+ http://www.latex-project.org/lppl.txt
+
+The package is "maintained" (as per LPPL maintenance status) by
+Igor A. Kotelnikov.
+
+The package consists of the file russianb.dtx
+and the derived files russianb.ins,
+ russianb.ldf,
+ russianb.pdf,
+ README.
+----------------------------------------------------------------
+\endpostamble
+\usedir{tex/generic/babel/contrib}
+\generate{
+ \file{\jobname.ldf}{\from{\jobname.dtx}{code}}
+}
+%</install>
+%<install>\endbatchfile
+%<*internal>
+\usedir{source/latex/babel-russian}
+\generate{
+ \file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\nopreamble\nopostamble
+\usedir{doc/latex/babel-russian}
+\generate{
+ \file{README.}{\from{\jobname.dtx}{readme}}
+}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</internal>
+%<*code>
+\NeedsTeXFormat{LaTeX2e}
+%\ProvidesFile{russianb.ldf}[2014/10/21 1.3f Russian support for the Babel system]
+\ProvidesLanguage{russianb}[2014/10/21 1.3f Russian support for the Babel system]
+%</code>
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
%%
-%% Babel package for LaTeX 2e
-%% Copyright (C) 1989 - 2008
-%% by Johannes Braams, TeXniek
-%
-%% Russian Language Definition File
-%% Copyright (C) 1995 - 2008
-%% by Olga Lapko cyrtug at mir.msk.su
-%% Johannes Braams, TeXniek
-%
-%% Adapted to the T2 and X2 Cyrillic encodings
-%% by Vladimir Volovich TeX at vvv.vsu.ru
-%% Werner Lemberg wl at gnu.org
-%
-%% Copyright (C) 2011 - 2014
-%% by Igor A. Kotelnikov kia999 at mail dot ru
-%% Adapted to EU1 (LuaTeX) and EU2 (XeTeX) encodings
-%
-%% Please report errors to: Igor A. Kotelnikov
-%% kia999 at mail dot ru
+%% This document should be compiled by
+%% XeLaTeX or LuaLaTex since some cyrillic
+%% glyphs are absent in T2* encodings used
+%% by LaTeX.
%%
-%<*filedriver>
-\documentclass[a4paper]{ltxdoc}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi>0
\usepackage{fontspec}
@@ -66,24 +257,42 @@
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
+ %\setmonofont[Scale=MatchLowercase]{Courier New}
+ %\setmonofont[Scale=MatchUppercase]{Courier New}
+ %\setmonofont{Courier New}
\else
- \usepackage[T1,T2A]{fontenc}
+ \usepackage[X2,T2A]{fontenc}
\usepackage[utf8]{inputenc}
+ \DeclareUnicodeCharacter{0462}{\CYRYAT}
+ \DeclareTextSymbolDefault{\CYRYAT}{X2}
+ \DeclareUnicodeCharacter{0463}{\cyryat}
+ \DeclareTextSymbolDefault{\cyryat}{X2}
+ %% serbian letter, looks as a ligature IE, not defined anywhare
+ %\DeclareUnicodeCharacter{0464}{\CYRESHRT} % no surch cmd in X2
+ %% serbian letter, looks as a ligature ie, not defined anywhare
+ %\DeclareUnicodeCharacter{0465}{\cyreshrt} % no surch cmd in X2
+ %% therefor, we substitute it with є (#0454, \cyrie)
+ \DeclareUnicodeCharacter{0464}{\CYRIE}%
+ %\DeclareTextSymbolDefault{\CYRIE}{X2}
+ \DeclareUnicodeCharacter{0465}{\cyrie}%
+ %\DeclareTextSymbolDefault{\cyrie}{X2}
\fi
-\usepackage[main=russian,english]{babel}
+\usepackage[russian.ancient,main=english]{babel}
%\languageattribute{russian}{ancient}
\usepackage[dvipsnames,usenames]{xcolor}
-\definecolor{thered} {rgb}{0.65,0.04,0.07}
-\definecolor{thegreen}{rgb}{0.06,0.44,0.08}
-\definecolor{thegrey} {gray}{0.8}
-\definecolor{theshade}{rgb}{1,1,0.97}
-\definecolor{theframe}{gray}{0.6}
-\definecolor{theblue}{cmyk}{1.00, 0.50, 0.00, 0.40}
+ \definecolor{thered} {rgb}{0.65,0.04,0.07}
+ \definecolor{thegreen}{rgb}{0.06,0.44,0.08}
+ \definecolor{thegrey} {gray}{0.8}
+ \definecolor{theshade}{rgb}{1,1,0.97}
+ \definecolor{theframe}{gray}{0.6}
+ \definecolor{theblue}{cmyk}{1.00, 0.50, 0.00, 0.40}
+%\usepackage[numbered]{hypdoc}
\usepackage[colorlinks=true
,linkcolor=violet %theblue %
,filecolor=purple %thegreen%
- ,citecolor=teal % thegreen%
+ ,citecolor=teal %thegreen%
]{hyperref}
+% ====================================
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\Babel{\textsf{Babel}}
@@ -103,32 +312,11 @@
\newcommand*\file[1]{\texttt{#1}}
\newcommand*\cls[1]{\texttt{#1}}
\newcommand*\pkg[1]{\texttt{#1}}
-\GetFileInfo{russianb.dtx}
-\EnableCrossrefs
-%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
-\RecordChanges % Gather update information
-\CodelineIndex % Index code by line number
-%\PageIndex % Index code by page number
-\AtEndDocument{\PrintChanges}
-\AtEndDocument{\PrintIndex}
-\DoNotIndex{\cyra,\cyrb,\cyrv,\cyrg,\cyrd,\cyre,\cyrz,\cyrzh%
- ,\cyri,\cyrishrt,\cyrk%
- ,\cyrl,\cyrm,\cyrn,\cyri,\cyro,\cyrp,\cyrr,\cyrs,\cyrt,\cyrf,\cyru%
- ,\cyrc,\cyrsh,\cyrch,\cyrery,\cyrya%
- ,\CYRA,\CYRB,\CYRV,\CYRG,\CYRD,\CYRE,\CYRZ,\CYRZH%
- ,\CYRI,\CYRISHRT,\CYRK%
- ,\CYRL,\CYRM,\CYRN,\CYRI,\CYRO,\CYRP,\CYRR,\CYRS,\CYRT,\CYRF,\CYRU%
- ,\CYRC,\CYRSH,\CYRCH,\CYRERY,\CYRYA%
- ,\cyrsftsn,\CYRSHCH,\cyryu,\CYREREV,\cyrerev,\CYRH,\cyrh,\cyrhrdsn%
- ,\cyrii,\cyrshch,\cyryar,\CYRYU
- ,\def,\edef%,\else,\fi,\if
-}
-
-
+% ====================================
\IfFileExists{listings.sty}{
\usepackage{listings}
\lstset{
- % gobble=1,
+ gobble=1,
columns=flexible,
keepspaces,
basicstyle=\MacroFont,
@@ -140,11 +328,14 @@
,\AddBabelHook,\SetStringLoop,\SetCase,\AfterBabelLanguage
,\defaultfontfeatures,\setmainfont,\setsansfont,\setmonofont
,\Russian,\cyrdash,\cdash
- ,\cyr,\cyrillictext,\textcyrillic
+ ,\cyr,\cyrillictext,\textcyrillic,\cyrillicencoding
,\addto,\captionsrussian,\daterussian,\noextrasrussian,\extrasrussian
,\languageattribute
- ,\Asbuk,\asbuk,\ch,\sh,\tg,\ctg,\arctg,\arcctg\,\th,\cth,\cosec,
- \nod,\nok,\prog,\NOF\,\NOK,\Prog}
+ ,\Asbuk,\asbuk,\ch,\sh,\tg,\ctg,\arctg,\arcctg\,\th,\cth,\cosec
+ ,\nod,\nok,\prog,\NOF\,\NOK,\Prog
+ ,\dq,\Proj,\nod,\NOD,\nok,\NOK,\Prob,\Variance
+ ,\XeTeXinputencoding
+ }
,keywordstyle=[0]\color{thered}
,keywords=[1]{main,russian,english,german,frenchb
,shorthands,extrasenglish
@@ -182,474 +373,414 @@
\def\bbl@tempa{#1}%
\ifx\bbl@tempa\@empty\else#1\vskip1ex\fi\ignorespaces}
\makeatother
-%\usepackage[main=russian,english]{babel}
-%\languageattribute{russian}{ancient}
-%\typein{2nd times}
+% ====================================
+\EnableCrossrefs
+%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
+\CodelineIndex % Index code by line number
+\RecordChanges % Gather update information
+%\PageIndex % Index code by page number
+% ====================================
\begin{document}
-\GetFileInfo{russianb.dtx}
-\RecordChanges
-%
-\title{The Russian Language\\
- in the \babel\ system\\[0.5em]
- \large Version \fileversion}
-
-\author{Igor A. Kotelnikov\footnote{E-mail: \href{mailto:kia999@mail.ru}{kia999 at mail dot ru}.}}
-
-\date{\filedate}
-
-\maketitle
-
-{\small\tableofcontents}
-
-\section{The Russian Language Definition File}
-
-The file \file{\filename}\footnote{The file described in this document
-has the version number \fileversion\ and was last revised on \filedate.}
-is the source file for the Russian Language Definition file
-\file{russianb.ldf} to be loaded by the \babel\ package with
-the option \Lopt{russian}. It was derived by Igor A.
-Kotelnikov from the original version of \file{\filename}, first
-released by Olga Lapko and Johannes Braam and then
-adapted to the T2* and X2 Cyrillic encodings
-by Vladimir Volovich and Werner Lemberg.
-
-Starting the version 1.2, \file{russianb.ldf} is designed to work both with
-legacy non-unicode (8-bit) and new unicode encodings of the source document
-files (input encodings) and of the font files (font encodings). This is
-achieved by excluding (bypassing) the |\cyr...| macros, which map every letter
-in a source file with given input encoding to a corresponding code point in a
-font file with a given font encoding when running modern engines, such as
-Lua\LaTeX\ or Xe\LaTeX, in native unicode mode instead of legacy engines, such
-as \LaTeX\ or PDF\LaTeX, or unicode engines in a compatibility (8-bit) mode. A
-few obsolete and controversial macros has been eliminated in first public
-release of version 1.2 of \file{russianb.ldf}.
-
-The version 1.3 of \file{russianb.ldf} has been adapted to new features
-introduced in the version 3.9 of the \pkg{babel} package. In particular, the
-language attribute \Lopt{ancient} has been introduced to support typesetting
-ancient and Church Slavonic books.
-
-
-\section{Usage}
-
-Typesetting Russian texts implies that a special input and output
-encodings should be used. Input encodings are those which are used in source
-(\texttt{.tex}) file. Output encoding is also known as the font encoding. It is
-implemented within the font files.
-
-Generally, the user may choose between different available Cyrillic
-encodings provided. The current support for Cyrillic uses LH family of
-MetaFont fonts and theirs Postscript versions such as CM-super. Lua\LaTeX\ and
-Xe\LaTeX, being the Unicode-based succeeders of \LaTeX, allow also for any
-Open Type (OTF) and True Type (TTF) fonts which has Cyrillic script, e.g.
-Computer Modern Unicode, Linux Libertine, and many other system fonts
-that came with Linux and Windows operating systems.
-
-With the advent of Unicode, \LaTeX\ community are moving towards eliminating
-all existing encodings in favor of Unicode, but nowadays one should take
-care when switching from \LaTeX\ to Lua\LaTeX\ or Xe\LaTeX\ since
-different packages should be loaded for those compilers.
-
-Since earlier versions \pkg{babel} did not
-support Xe\LaTeX\ (at least for some languages including Russian), the
-\pkg{polyglossia} package was generally recommended in the past for
-use with Xe\LaTeX\ as a replacement for \pkg{babel}. Nowadays, \pkg{babel}
-can be used with any engines, including \LaTeX, PDF\LaTeX, Lua\LaTeX, and
-Xe\LaTeX. Nevertheless some troubles may occur with some languages which
-have no promptly updated \file{.ldf} files.
-
-
-\subsection{\LaTeX}
-
-When user's document is compiled with \file{latex.exe} or \file{pdflatex.exe},
-recommended set of packages includes the \pkg{inputenc} and \pkg{fontenc}
-package. They should be loaded before \pkg{babel}, for example,
-\begin{verbatim}
- \usepackage[T1,T2A]{fontenc}
- \usepackage[utf8]{inputenc}
- \usepackage[english,russian]{babel}
-\end{verbatim}
-Some variations in the order of package loading are allowed in this case
-but it is better to follow one and the same convention at all circumstances:
-the \pkg{babel} packgage should go last, and \pkg{fontenc} must be the first.
-
-Input encoding should be declared as option to the \pkg{inputenc}
-package. Known Cyrillic encodings include \texttt{cp866} (MS DOS),
-\texttt{cp1251} (Windows), \texttt{koi8-u} (UNIX) and their variants.
-Nowadays, this list is appended with \texttt{utf8} input encoding.
-
-Output encodings (also known as font encodings) are declared as options to
-the \pkg{fontenc} package. Known Cyrillic encodings are \texttt{T2A},
-\texttt{T2B}, \texttt{T2C}, \texttt{LCY}, and \texttt{X2};
-\texttt{LWN} is excluded from Russian support stating version 1.2 of
-\file{\filename} since \texttt{LWN} is excluded from the \pkg{cyrillic}
-bundle of related files.
-
-
-\subsection{Lua\LaTeX}
-
-If Unicode fonts are not available, Lua\LaTeX\ can run in compatibility
-(8-bit) mode to use same font as \LaTeX\ does. However the package
-\pkg{inputenc} does not work with Lua\LaTeX\ and should be substituted with
-\pkg{luainputenc}. Source file is to be converted to \texttt{UTF8}
-(Unicode-8) encoding; it is the only input encoding accepted by
-Lua\LaTeX. The 8-bit mode is invoked by the following sequence of packages:
-\begin{verbatim}
- \usepackage[T1,T2A]{fontenc}
- \usepackage[lutf8]{luainputenc}
- \usepackage[english,russian]{babel}
-\end{verbatim}
-\unskip
-The order of the packages is crucial for Lua\LaTeX\ in 8-bit mode. Since both
-\pkg{luainputenc} and \pkg{babel} should know what is a selected font encoding,
-the \pkg{fontenc} package should be loaded first. Input encoding management for
-Lua\TeX\ is needed only for compatibility with old documents. For new
-documents, using UTF-8 encoding and Unicode fonts is strongly recommended.
-\emph{You've been warned!} See
-\href{http://tex.stackexchange.com/questions/31709/can-one-instruct-lualatex-to-use-t2a-encoded-fonts}%
-{tex.stackexchange.com/questions/31709/can-one-instruct-lualatex-to-use-t2a-encoded-fonts}.
-
-
-To invoke Unicode mode, one needs to load the \pkg{fontspec} package instead
-of \pkg{luainputenc} and \pkg{fontspec} and explicitly indicate
-which fonts should be used for romanic, sans-serif and monospaced
-types. Next example shows how to load Computer Modern Unicode fonts, which is a
-part of all modern \LaTeX\ distributions:
-\begin{verbatim}
-\usepackage{fontspec}
- \defaultfontfeatures{Renderer=Basic,Ligatures={TeX}}
- \setmainfont{CMU Serif}
- \setsansfont{CMU Sans Serif}
- \setmonofont{CMU Typewriter Text}
-\usepackage[english,russian]{babel}
-\end{verbatim}
-\unskip
-The |\defaultfontfeatures| declares default font features for subsequent
-|\setmainfont| (which sets romanic fonts), |\setsansfont| (sans-serif) and
-|\setmonofont| (monospaced font). Font features can be set up on per font
-bases; for example
-\begin{verbatim}
-\usepackage{fontspec}
- \setmainfont[Renderer=Basic,Ligatures={TeX}]{CMU Serif}
- \setsansfont[Renderer=Basic,Ligatures={TeX,Historic}]{CMU Sans Serif}
- \setmonofont{CMU Typewriter Text}
-\usepackage[english,russian]{babel}
-\end{verbatim}
-\unskip
-Here |Renderer=Basic,Ligatures={TeX}| activates ligatures which are existed
-in \LaTeX.
-
-Recall that the language enlisted last in the list of options of the \pkg{babel}
-package is assumed to be the main language of the document, which is also active
-language right after |\begin{document}|. As of version 3.9, the main language
-can be set as a value of the |main| option as follows
-\begin{verbatim}
-\usepackage{fontspec}
-\usepackage[english,main=russian,german]{babel}
-\end{verbatim}
-%\unskip
-
-
-
-\subsection{Xe\LaTeX}
-
-In Xe\LaTeX, there is also a special mode for 8-bit compatibility.
-One can use |\XeTeXinputencoding| to change the input encoding
-temporarily, and the \texttt{"bytes"} encoding makes Xe\LaTeX\ works
-like a 8-bit \LaTeX\ engine:
-\begin{verbatim}
-\XeTeXinputencoding "bytes"
-\usepackage[utf8]{inputenc}
-\usepackage[T2A]{fontenc}
-\usepackage[english,russian]{babel}
-\end{verbatim}
-\unskip
-Xe\TeX\ can use a different input encoding but it always uses the Unicode
-internally, so that |\XeTeXinputencoding| performs a conversion of the input
-into Unicode;
-see \href{http://tex.stackexchange.com/questions/36188/do-xetex-and-luatex-always-use-unicode}
-{tex.stackexchange.com/questions/36188/do-xetex-and-luatex-always-use-unicode}.
-
-
-Unicode mode is set up same way as for Lua\LaTeX, however the option
-|Renderer=Basic| can be dropped:
-\begin{verbatim}
-\usepackage{fontspec}
- \defaultfontfeatures{Ligatures={TeX}}
- \setmainfont{CMU Serif}
- \setsansfont{CMU Sans Serif}
- \setmonofont{CMU Typewriter Text}
-\usepackage[english,russian]{babel}
-\end{verbatim}
-%\unskip
-
-
-\subsection{Modern and Ancient spelling}
-\label{ssec:speeling}
-
-By default, a modern spelling is enabled. For Church Slavonic and other old books
-ancient spelling can be enabled by setting the attribute to \Lopt{ancient}. To set
-an attribute, put the |\languageattribute| macro within a document preamble after
-\babel, for example,
-\begin{verbatim}
-\usepackage[english,russian]{babel}
-\languageattribute{russian}{ancient}
-\end{verbatim}
-Setting the \Lopt{ancient} attribute changes the built-in strings (caption names)
-and a date format. For example, the bibliography will be entitled as
-`\textcyrillic{Литература}' by default and as `\textcyrillic{Библіографія}' if the
-Russian language attribute is set to \Lopt{ancient}.
-%Default behavior is equivalent to setting the Russian language attribute to \Lopt{modern}.
-
-
-\section{User's commands}
-
-In a multilingual document, some typographic rules are language
-dependent and should apply to the whole document.
-
-%As of version~1.2, \file{russianb.ldf} behaves differently
-%according to \babel's \emph{main language} defined as the \emph{last}
-%option. When Russian is
-%|babel|'s main language, it adjusts global layout of the document
-%according to typographical conventions of Russian language. Namely,
-%\file{russianb.ldf} makes the following changes to global layout even
-%in the parts where Russian is not current language:
-%\begin{enumerate}
-%\item
-% the first paragraph of any section becomes indented (\LaTeX{} only).
-% (this is obsolete statement starting from version 1.2a)
-%\end{enumerate}
-
-Regarding local typography, the macro |\selectlanguage{russian}|
-switches to the Russian language, with the following effects:
-\begin{enumerate}
-\item Russian hyphenation patterns are made active;
-\item |\today| prints the date in Russian;
-\item the caption names are translated into Russian
- (\LaTeX{} only);
-\item emdash typed by the ligature |---| might be 20\% shorter when Russian
-is the current language; the result depends on the current encoding; |---|
-always produce long emdash in Lua\TeX\ and Xe\TeX\ since these engines
-use same encodings for all languages;
-\item emdash typed by the ligature |"---| in Russian is 20\% shorter, however
-the ligature |"---| might not be defined in other languges; a
- shorter emdash (i.e. |\cyrdash|) can be typeset in any language using
- special macros enlisted in table \ref{tab:russian-quote}.
-\end{enumerate}
-
-By default, a modern spelling is used for built-it strings (caption names) and
-the date. The spelling can be reverted to ancient by setting the language
-attribute to \Lopt{ancient} in the document preamble as discussed in
-Sec.~\ref{ssec:speeling}.
-
-Since Russian has its own numbering system, \file{russianb.ldf} adds macros
-|\asbuk|\marg{counter} and |\Asbuk|\marg{counter} for formatting numbers appropriately the alphabetic
-sequence in the Russian alphabet. Additional commands are provided
-to typeset quotes:
-\begin{enumerate}
-\item French quotation marks can be entered using the commands
- |\guillemotleft| and |\guillemotright| which work in \LaTeXe\
- and Plain\TeX.
-\item German quotation marks can be entered using the commands
- |\glqq| and |\grqq| which work in \LaTeXe\ and Plain\TeX.
-\end{enumerate}
-
-The macro |\Russian| is now defined as an alias for
-|\selectlanguage{russian}|, and its ``opponent'' |\English|, existed
-in \file{russianb.ldf} prior to version 1.2 has been removed since the Russian
-language definition file is wrong place for definition of macros which
-switch to a distinct other language.
-
-The macro |\textcyrillic|\marg{text} is intended to typeset small chunks of text
-in Russian; it is essentially an alias for |\foreignlanguage{russian}|\marg{text}.
-
-
-\subsection{Active character}
-
-Table~\ref{tab:russian-quote} shows macros and active string which can be
-used to typeset various dashes and quotes.
-In the Russian language, the character |"| is made active. It can be
-considered as second escape character in addition to |\|. Some dashes and
-all quotes can be typed using both active character |"| and ordinary
-macros as indicated in the table. However, some shorthanded hyphenations
-have no macro counterpart.
-
-\begin{table}[ht]\centering
- \caption{Extra definitions made
- by \file{russianb.ldf}}\label{tab:russian-quote}
- \medskip
- \begin{tabular}{llp{7cm}}
- \hline\hline\\[-0.5em]
- |\glqq| & |"`| &
- German left double quotes (looks like ,\kern-0.08em,). \\
- |\grqq| & |"'| &
- German right double quotes (looks like ``). \\
- |\guillemotleft| & |"<| &
- French left double quotes (looks like $<\!\!<$). \\
- |\guillemotright| & |">| &
- French right double quotes (looks like $>\!\!>$). \\
- |\dq| & &
- Original quotes character (|"|). \\[0.5em]
- |\babelhyphen{soft}|
- & |"-| & Optional (soft) hyphen sign, similar to |\-| but allows
- hyphenation in the rest of the word;
- equivalent to |\babelhyphen{soft}| in \pkg{babel} 3.9. \\
- |\babelhyphen{empty}|
- & |""| & Similar to |"-| but does not print hyphen;
- equivalent to |\babelhyphen{empty}| in \pkg{babel} 3.9. \\
- |\babelhyphen*{nobreak}|
- & |"~| & A compound word mark without a breakpoint, prints hyphen
- prohibiting hyphenation at the point;
- equivalent to |\babelhyphen*{nobreak}| in \pkg{babel} 3.9. \\
- |\babelhyphen{hard}|
- & |"=| & A compound word mark with a breakpoint, prints hyphen
- allowing hyphenation in the composing words.
- equivalent to |\babelhyphen{hard}| in \pkg{babel} 3.9. \\
- |\babelhyphen{nobreak}|
- & \verb="|= & Disables ligature at this position;
- equivalent to |\babelhyphen{nobreak}| (??) in \pkg{babel} 3.9.
- . \\[0.5em]
- |\cyrdash| & |---| & Row Cyrillic emdash (does not care
- spaces around). \\
- |\cdash---| & |"---| &
- Cyrillic emdash in plain text. \\
- |\cdash--~| & |"--~| &
- Cyrillic emdash in compound names (as in |Mendeleev"--~Klapeiron|). \\
- |\cdash--*| & |"--*| &
- Cyrillic emdash in direct speech. \\
- & |",| & Thin space (allows further hyphenation as in |D.",Mendeleev|). \\[0.5em]
- \hline\hline
- \end{tabular}
-\end{table}
-Note that the standard soft hyphen |\-| is equivalent to |\babelhyphen*{soft}|.
-
-\medskip
-
-The quotation marks traditionally used in Russian were borrowed from
-other languages (e.g., French and German) so they keep their original
-names.
-
-The French quotes are also available as ligatures `|<<|' and `|>>|' in
-8-bit Cyrillic font encodings (\texttt{LCY}, \texttt{X2}, \texttt{T2*})
-and in unicode encodings (\texttt{EU1} and \texttt{EU2})
-and as `|<|' and `|>|' characters in 7-bit Cyrillic font encodings
-(\texttt{OT2} and \texttt{LWN}).
-
-In Unicode encodings \texttt{EU1} and \texttt{EU2} cyrdashes and quotes
-can be typed as single character if text editor makes it possible to
-insert characters which absent of standard keyboard. This method works
-as well for 8-bit fonts encoded according to \texttt{T2A} if source file
-is encoded with \texttt{cp1251} or {utf8}.
-
-By default, active double quote is switched on. It can be switched off
-any time using |\shorthandon{"}| and the switched on again using
-|\shorthandon{"}|. The aliases |\mdqoff| and |\mdqon| for these two macros
-has been removed from \file{russianb.ldf} starting from version 1.3 in favour of
-the macros |\shorthandon| and |\shorthandoff| provided in the \pkg{babel} core.
-
-
-\subsection{Math commands}
-
-\file{russianb.ldf} defines few macros than can be used independently
-of current language. These are 9 macros to be used in math mode to type
-the names of trigonometric functions common for Russian documents:
-|\sh|, |\ch|, |\tg|, |\ctg|, |\arctg|, |\arcctg|, |\th|, |\cth|, and
-|\cosec|. Cyrillic letters in math mode can be typed with the aid of
-text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
-
-
-\section{History}
-
-\subsection{Changes in version 1.3c}
-\begin{itemize}
-\item
- Bug fix in \string\daterussian.
-\end{itemize}
-
-\subsection{Changes in version 1.3b}
-\begin{itemize}
-\item
- Added support for the packages \pkg{listing}, \pkg{nomencl}, and
- \pkg{nomentbl}.
-\end{itemize}
-
-\subsection{Changes in version 1.3a}
-\begin{itemize}
-\item
- %Added the Russian language attributes \Lopt{modern} (default) and
- %\Lopt{ancient} (for typesetting ancient slavonic books).
- Added the Russian language attribute \Lopt{ancient} for typesetting
- ancient slavonic books.
-\end{itemize}
-
-\subsection{Changes in version 1.3}
-\begin{itemize}
-\item
- Updated for babel 3.9.
-\item
- The |\alph| and |\Alph| commands are not redefined any more by the
- \file{russianb.ldf}.
-\end{itemize}
-
-\subsection{Changes in version 1.2a}
-\begin{itemize}
-\item
- Indentation of the first paragraph after sectioning command has been removed.
- Use \pkg{indentfirst} to make fist paragraph indented.
-\end{itemize}
-
-\subsection{Changes in version 1.2}
-
-\begin{itemize}
-\item
- Font encoding \texttt{LWN} is not supported any more.
-\item
- Macros |\Rus|, |\English|, |\Eng| have been removed.
- |\Russian| is now alias of |\selectlanguage{russian}|.
- Former definition of |\Russian| is preserved in the macros
- |\cyrillictext| and |\cyr| which should not be used at user
- level.
-\item
- Lua\LaTeX\ and Xe\LaTeX\ are now supported;
- |\cyr...| commands are bypassed if Lua\LaTeX\ or Xe\LaTeX\ run.
-%\item
-% First paragraph after section command is indented over the entire
-% document if \Lopt{russian} is the last option of \pkg{babel} and,
-% hence, Russian is the main language.
-\item
- The shorthands |"<| and |">| are redefined; now they match
- |\guillemotleft| and |\guillemotright|, respectively, rather than
- |\flqq| and |\frqq|.
-\item
- Definitions of |\latinencoding| and |\latintext| are removed
- since these macros are defined in \file{babel.def}.
-\item
- |\cyrmathbf|, |\cyrmathsf|, |\cyrmathit|, and |\cyrmathtt| commands
- are removed; instead of them it is advised to use corresponding
- |\text..| command; they do work in math mode.
-\item
- The macro |\No| is removed since the Cyrillic number sign is available
- on keyboard and can also be typed using the |\textnumero| macro.
-\item
- Added translation for Glossary.
-\end{itemize}
-
- \DocInput{russianb.dtx}
+ \DocInput{\jobname.dtx}
\end{document}
-%</filedriver>
-%\fi
+%</driver>
+% \fi
+%
+%\GetFileInfo{russianb.dtx}
+%\GetFileInfo{russianb.ldf}
+%
+%\title{^^A
+% \textsf{Russian} --- description text\thanks{^^A
+% This file describes version \fileversion, last revised \filedate.^^A
+% }^^A
+%}
+%\author{^^A
+% You\thanks{E-mail: you@your.domain}^^A
+%}
+% \title{The Russian Language\\
+% in the \babel\ system\\[0.5em]
+% \large Version \fileversion}
+%
+% \author{Igor A. Kotelnikov\footnote{E-mail: \href{mailto:kia999@mail.ru}{kia999 at mail dot ru}.}}
+%
+% \date{Released \filedate}
+%
+% \maketitle
+%
+% {\small\tableofcontents}
+%
+%
+% \section{The Russian Language Definition File}
+%
+% The file \file{\filename}\footnote{The file described in this document
+% has the version number \fileversion\ and was last revised on \filedate.}
+% is the source file for the Russian Language Definition file
+% \file{russianb.ldf} to be loaded by the \babel\ package with
+% the option \Lopt{russian}. It was derived by Igor A.
+% Kotelnikov from the original version of \file{\filename}, first
+% released by Olga Lapko and Johannes Braams and then
+% adapted to the T2* and X2 Cyrillic encodings
+% by Vladimir Volovich and Werner Lemberg.
+%
+% Starting the version 1.2, \file{russianb.ldf} is designed to work both with
+% legacy non-unicode (8-bit) and new unicode encodings of the source document
+% files (input encodings) and of the font files (font encodings). This is
+% achieved by excluding (bypassing) the |\cyr...| macros, which map every letter
+% in a source file with given input encoding to a corresponding code point in a
+% font file with a given font encoding when running modern engines, such as
+% Lua\LaTeX\ or Xe\LaTeX, in native unicode mode instead of legacy engines, such
+% as \LaTeX\ or PDF\LaTeX, or unicode engines in a compatibility (8-bit) mode. A
+% few obsolete and controversial macros has been eliminated in first public
+% release of version 1.2 of \file{russianb.ldf}.
+%
+% The version 1.3 of \file{russianb.ldf} has been adapted to new features
+% introduced in the version 3.9 of the \pkg{babel} package. In particular, the
+% language attribute \Lopt{ancient} has been introduced to support typesetting
+% ancient and Church Slavonic books.
+%
+% \section{Usage}
+%
+% Typesetting Russian texts implies that a special input and output
+% encodings should be used. Input encodings are those which are used in source
+% (\file{.tex}) file. Output encoding is also known as the font encoding. It is
+% implemented within the font files.
+%
+% Generally, the user may choose between different available Cyrillic
+% encodings. The current support for Cyrillic uses LH family of MetaFont fonts
+% and theirs Postscript versions such as CM-super. Lua\LaTeX\ and Xe\LaTeX,
+% being the Unicode-based succeeders of \LaTeX, allow also for any Open Type
+% (OTF) and True Type (TTF) fonts which has Cyrillic script, e.g. Computer
+% Modern Unicode, Linux Libertine, and many other system fonts that came with
+% Linux, Mac and Windows operating systems.
+%
+% With the advent of Unicode, \LaTeX\ community are moving towards eliminating
+% all existing encodings in favor of Unicode, but nowadays one should take
+% care when switching from \LaTeX\ to Lua\LaTeX\ or Xe\LaTeX\ since
+% different packages should be loaded for those compilers.
+%
+% Since earlier versions \pkg{babel} did not
+% support Xe\LaTeX\ (at least for some languages including Russian), the
+% \pkg{polyglossia} package was generally recommended in the past for
+% use with Xe\LaTeX\ as a replacement for \pkg{babel}. Nowadays, \pkg{babel}
+% can be used with any engines, including \LaTeX, PDF\LaTeX, Lua\LaTeX, and
+% Xe\LaTeX. Nevertheless some troubles may occur with some languages which
+% have no promptly updated \file{.ldf} files.
+%
+%
+% \subsection{\LaTeX}
+%
+% When user's document is compiled with \file{latex.exe} or \file{pdflatex.exe},
+% recommended set of packages includes the \pkg{inputenc} and \pkg{fontenc}
+% packages. They should be loaded before \pkg{babel}, for example,
+% \begin{verbatim}
+% \usepackage[T1,T2A]{fontenc}
+% \usepackage[utf8]{inputenc}
+% \usepackage[english,russian]{babel}
+%\end{verbatim}
+% Some variations in the order of loading the packages are allowed in this case
+% but it is better to follow one and the same convention at all circumstances:
+% the \pkg{babel} package should go last, and \pkg{fontenc} must be the first.
+%
+% Input encoding should be declared as option to the \pkg{inputenc}
+% package. Known Cyrillic encodings include \texttt{cp866} (MS DOS),
+% \texttt{cp1251} (Windows), \texttt{koi8-u} (UNIX) and their variants.
+% Nowadays, this list is appended with \texttt{utf8} input encoding.
+%
+% Output encodings (also known as font encodings) are declared as options to
+% the \pkg{fontenc} package. Known Cyrillic encodings are \texttt{T2A},
+% \texttt{T2B}, \texttt{T2C}, \texttt{LCY}, and \texttt{X2};
+% \texttt{LWN} is excluded from Russian support stating version 1.2 of
+% \file{\filename} since \texttt{LWN} is excluded from the \pkg{cyrillic}
+% bundle of related files.
+%
+%
+% \subsection{Lua\LaTeX}
+%
+% If Unicode fonts are not available, Lua\LaTeX\ can run in compatibility
+% (8-bit) mode to use same font as \LaTeX\ does. However the package
+% \pkg{inputenc} does not work with Lua\LaTeX\ and should be substituted with
+% \pkg{luainputenc}. Source file is to be converted to \texttt{UTF8}
+% (Unicode-8) encoding; it is the only input encoding accepted by
+% Lua\LaTeX. The 8-bit mode is invoked by the following sequence of packages:
+%\begin{verbatim}
+%\usepackage[T1,T2A]{fontenc}
+%\usepackage[lutf8]{luainputenc}
+%\usepackage[english,russian]{babel}
+%\end{verbatim}
+% The order of the packages is crucial for Lua\LaTeX\ in 8-bit mode. Since both
+% \pkg{luainputenc} and \pkg{babel} should know what is a selected font encoding,
+% the \pkg{fontenc} package should be loaded first. Input encoding management for
+% Lua\TeX\ is needed only for compatibility with old documents. For new
+% documents, using UTF-8 encoding and Unicode fonts is strongly recommended.
+% \emph{You've been warned!} See
+% \href{http://tex.stackexchange.com/questions/31709/can-one-instruct-lualatex-to-use-t2a-encoded-fonts}%
+% {tex.stackexchange.com/questions/31709/can-one-instruct-lualatex-to-use-t2a-encoded-fonts}.
+%
+%
+% To invoke Unicode mode, one needs to load the \pkg{fontspec} package instead
+% of \pkg{luainputenc} and \pkg{fontspec} and explicitly indicate which True Type
+% or Open Type fonts should be used for romanic, sans-serif and monospaced types.
+% The following example shows how to load Computer Modern Unicode (CMU) fonts,
+% which is a part of all modern \LaTeX\ distributions:
+%\begin{verbatim}
+%\usepackage{fontspec}
+% \defaultfontfeatures{Renderer=Basic,Ligatures={TeX}}
+% \setmainfont{CMU Serif}
+% \setsansfont{CMU Sans Serif}
+% \setmonofont{CMU Typewriter Text}
+%\usepackage[english,russian]{babel}
+%\end{verbatim}
+% The |\defaultfontfeatures| declares default font features for subsequent
+% |\setmainfont| (which sets romanic fonts), |\setsansfont| (sans-serif) and
+% |\setmonofont| (monospaced font). Font features can be set up on per font
+% bases; for example
+% \begin{verbatim}
+% \usepackage{fontspec}
+% \setmainfont[Renderer=Basic,Ligatures={TeX}]{CMU Serif}
+% \setsansfont[Renderer=Basic,Ligatures={TeX,Historic}]{CMU Sans Serif}
+% \setmonofont{CMU Typewriter Text}
+% \usepackage[english,russian]{babel}
+%\end{verbatim}
+% Here |Renderer=Basic,Ligatures={TeX}| activates ligatures which are existed
+% in \LaTeX.
+%
+% Recall that the language enlisted last in the list of options of the \pkg{babel}
+% package is assumed to be the main language of the document, which is also active
+% language right after |\begin{document}|. As of version 3.9, the main language
+% can be set as a value of the |main| option as follows
+%\begin{verbatim}
+% \usepackage{fontspec}
+% \usepackage[english,main=russian,german]{babel}
+%\end{verbatim}
+% %\unskip
+%
+%
+%
+% \subsection{Xe\LaTeX}
+%
+% In Xe\LaTeX, there is also a special mode for 8-bit compatibility.
+% One can use |\XeTeXinputencoding| to change the input encoding
+% temporarily, and the \texttt{"bytes"} encoding makes Xe\LaTeX\ works
+% like a 8-bit \LaTeX\ engine:
+% \begin{verbatim}
+% \XeTeXinputencoding "bytes"
+% \usepackage[utf8]{inputenc}
+% \usepackage[T2A]{fontenc}
+% \usepackage[english,russian]{babel}
+%\end{verbatim}
+% \unskip
+% Xe\TeX\ can use a different input encoding but it always uses the Unicode
+% internally, so that |\XeTeXinputencoding| performs a conversion of the input
+% into Unicode;
+% see \href{http://tex.stackexchange.com/questions/36188/do-xetex-and-luatex-always-use-unicode}
+% {tex.stackexchange.com/questions/36188/do-xetex-and-luatex-always-use-unicode}.
+%
+%
+% Unicode mode is set up same way as for Lua\LaTeX, however the option
+% |Renderer=Basic| can be dropped:
+%\begin{verbatim}
+% \usepackage{fontspec}
+% \defaultfontfeatures{Ligatures={TeX}}
+% \setmainfont{CMU Serif}
+% \setsansfont{CMU Sans Serif}
+% \setmonofont{CMU Typewriter Text}
+% \usepackage[english,russian]{babel}
+%\end{verbatim}
+% %\unskip
+%
+%
+% \subsection{Modern and Ancient spelling}
+% \label{ssec:speeling}
+%
+% By default, a modern spelling is enabled. For Church Slavonic and other old books
+% ancient spelling can be enabled by setting the attribute to \Lopt{ancient}. To set
+% an attribute, put the |\languageattribute| macro within a document preamble after
+% \babel, for example,
+%\begin{verbatim}
+% \usepackage[english,russian]{babel}
+% \languageattribute{russian}{ancient}
+%\end{verbatim}
+% Setting the \Lopt{ancient} attribute changes the built-in strings (caption names)
+% and a date format. For example, the bibliography will be entitled as
+% `\textcyrillic{Литература}' by default and as `\textcyrillic{Библіографія}' if the
+% Russian language attribute is set to \Lopt{ancient}.
+% Same result can be achieved using a modifier as follows:
+%\begin{verbatim}
+%\usepackage[english,russian.ancient]{babel}
+%\end{verbatim}
+% Using a modifier in a package option is often better. A modifier is set after
+% the language name, and is prefixed with a dot (only when the language is set
+% as package option – neither global options nor the main key accept them).
+%
+%
+%\section{User's commands}
+%
+% In a multilingual document, some typographic rules are language
+% dependent and should apply to the whole document.
+%
+%^^AAs of version~1.2, \file{russianb.ldf} behaves differently
+%^^Aaccording to \babel's \emph{main language} defined as the \emph{last}
+%^^Aoption. When Russian is
+%^^A|babel|'s main language, it adjusts global layout of the document
+%^^Aaccording to typographical conventions of Russian language. Namely,
+%^^A\file{russianb.ldf} makes the following changes to global layout even
+%^^Ain the parts where Russian is not current language:
+%^^A\begin{enumerate}
+%^^A\item
+%^^A the first paragraph of any section becomes indented (\LaTeX{} only).
+%^^A (this is obsolete statement starting from version 1.2a)
+%^^A\end{enumerate}
+%
+% Regarding local typography, the macro |\selectlanguage{russian}|
+% switches to the Russian language, with the following effects:
+% \begin{enumerate}
+% \item Russian hyphenation patterns are made active;
+% \item |\today| prints the date in Russian;
+% \item the caption names are translated into Russian
+% (\LaTeX{} only);
+% \item emdash typed by the ligature |---| might be 20\% shorter when Russian
+% is the current language; the result depends on the current encoding; |---|
+% always produce long emdash in Lua\TeX\ and Xe\TeX\ since these engines
+% use same encodings for all languages;
+% \item emdash typed by the ligature |"---| in Russian is 20\% shorter, however
+% the ligature |"---| might not be defined in other languges; a
+% shorter emdash (i.e. |\cyrdash|) can be typeset in any language using
+% special macros enlisted in table \ref{tab:russian-quote}.
+% \end{enumerate}
+%
+% By default, a modern spelling is used for built-it strings (caption names) and
+% the date. The spelling can be reverted to ancient by setting the language
+% attribute to \Lopt{ancient} in the document preamble as discussed in
+% Sec.~\ref{ssec:speeling}.
+%
+% Since Russian has its own numbering system, \file{russianb.ldf} adds macros
+% |\asbuk|\marg{counter} and |\Asbuk|\marg{counter} for formatting numbers appropriately the alphabetic
+% sequence in the Russian alphabet. Additional commands are provided
+% to typeset quotes:
+% \begin{enumerate}
+% \item French quotation marks can be entered using the commands
+% |\guillemotleft| and |\guillemotright| which work in \LaTeXe\
+% and Plain\TeX.
+% \item German quotation marks can be entered using the commands
+% |\glqq| and |\grqq| which work in \LaTeXe\ and Plain\TeX.
+% \end{enumerate}
+%
+% The macro |\Russian| is now defined as an alias for
+% |\selectlanguage{russian}|, and its ``opponent'' |\English|, existed
+% in \file{russianb.ldf} prior to version 1.2 has been removed since the Russian
+% language definition file is wrong place for definition of macros which
+% switch to a distinct other language.
+%
+% The macro |\textcyrillic|\marg{text} is intended to typeset small chunks of text
+% in Russian; it is essentially an alias for |\foreignlanguage{russian}|\marg{text}.
+%
+%
+% \subsection{Active character}
+%
+% Table~\ref{tab:russian-quote} shows macros and active string which can be
+% used to typeset various dashes and quotes.
+% In the Russian language, the character |"| is made active. It can be
+% considered as second escape character in addition to |\|. Some dashes and
+% all quotes can be typed using both active character |"| and ordinary
+% macros as indicated in the table. However, some shorthanded hyphenations
+% have no macro counterpart.
+%
+% \begin{table}[ht]\centering
+% \caption{Extra definitions made
+% by \file{russianb.ldf}}\label{tab:russian-quote}
+% \medskip
+% \begin{tabular}{llp{7cm}}
+% \hline\hline\\[-0.5em]
+% |\glqq| & |"`| &
+% German left double quotes (looks like ,\kern-0.08em,). \\
+% |\grqq| & |"'| &
+% German right double quotes (looks like ``). \\
+% |\guillemotleft| & |"<| &
+% French left double quotes (looks like $<\!\!<$). \\
+% |\guillemotright| & |">| &
+% French right double quotes (looks like $>\!\!>$). \\
+% |\dq| & &
+% Original quotes character (|"|). \\[0.5em]
+% |\babelhyphen{soft}|
+% & |"-| & Optional (soft) hyphen sign, similar to |\-| but allows
+% hyphenation in the rest of the word;
+% equivalent to |\babelhyphen{soft}| in \pkg{babel} 3.9. \\
+% |\babelhyphen{empty}|
+% & |""| & Similar to |"-| but does not print hyphen;
+% equivalent to |\babelhyphen{empty}| in \pkg{babel} 3.9. \\
+% |\babelhyphen*{nobreak}|
+% & |"~| & A compound word mark without a breakpoint, prints hyphen
+% prohibiting hyphenation at the point;
+% equivalent to |\babelhyphen*{nobreak}| in \pkg{babel} 3.9. \\
+% |\babelhyphen{hard}|
+% & |"=| & A compound word mark with a breakpoint, prints hyphen
+% allowing hyphenation in the composing words.
+% equivalent to |\babelhyphen{hard}| in \pkg{babel} 3.9. \\
+% |\babelhyphen{nobreak}|
+% & \verb="|= & Disables ligature at this position;
+% equivalent to |\babelhyphen{nobreak}| (??) in \pkg{babel} 3.9.
+% \\[0.5em]
+% |\cyrdash| & |---| & Row Cyrillic emdash (does not care
+% spaces around). \\
+% |\cdash---| & |"---| &
+% Cyrillic emdash in plain text. \\
+% |\cdash--~| & |"--~| &
+% Cyrillic emdash in compound names (as in |Mendeleev"--~Klapeiron|). \\
+% |\cdash--*| & |"--*| &
+% Cyrillic emdash in direct speech. \\
+% & |",| & Thin space (allows further hyphenation as in |D.",Mendeleev|). \\[0.5em]
+% \hline\hline
+% \end{tabular}
+% \end{table}
+% Note that the standard soft hyphen |\-| is equivalent to |\babelhyphen*{soft}|.
+%
+% \medskip
+%
+% The quotation marks traditionally used in Russian were borrowed from
+% other languages (e.g., French and German) so they keep their original
+% names.
+%
+% The French quotes are also available as ligatures `|<<|' and `|>>|' in
+% 8-bit Cyrillic font encodings (\texttt{LCY}, \texttt{X2}, \texttt{T2*})
+% and in unicode encodings (\texttt{EU1} and \texttt{EU2})
+% and as `|<|' and `|>|' characters in 7-bit Cyrillic font encodings
+% (\texttt{OT2} and \texttt{LWN}).
+%
+% In Unicode encodings \texttt{EU1} and \texttt{EU2} cyrdashes and quotes
+% can be typed as single character if text editor makes it possible to
+% insert characters which absent of standard keyboard. This method works
+% as well for 8-bit fonts encoded according to \texttt{T2A} if source file
+% is encoded with \texttt{cp1251} or {utf8}.
+%
+% By default, active double quote is switched on. It can be switched off
+% any time using |\shorthandon{"}| and the switched on again using
+% |\shorthandon{"}|. The aliases |\mdqoff| and |\mdqon| for these two macros
+% has been removed from \file{russianb.ldf} starting from version 1.3 in favour of
+% the macros |\shorthandon| and |\shorthandoff| provided in the \pkg{babel} core.
+%
+%
+% \subsection{Math commands}
+%
+% \file{\filename} defines few macros than can be used independently
+% of current language. These are 9 macros to be used in math mode to type
+% the names of trigonometric functions common for Russian documents:
+% |\sh|, |\ch|, |\tg|, |\ctg|, |\arctg|, |\arcctg|, |\th|, |\cth|, and
+% |\cosec|. Cyrillic letters in math mode can be typed with the aid of
+% text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
+%
+% The macros |\Prob|, |\Variance|, |\NOD|, |\nod|, |\NOK|, |\nok|, |\Proj|
+% print some rare Russian mathematical symbols.
%
-% \StopEventually{}
%
% \section{\TeX{}nical details}
%
% The packages \pkg{inputenc} and \pkg{luainputenc}
-% make Cyrillic letters active so that compiler converts them into
+% make Cyrillic letters active so that a compiler converts them into
% corresponding |\cyr...| macro at compilation time.
% For example, Russian letter `a' matches
% macro |\cyra|, and capital Russian letter `A' matches |\CYRA|. The
% package \pkg{fontenc} then matches every macro |\cyr...| to corresponding
-% glyph in font file depending on declared font encoding.
+% glyph in a font file depending on a declared font encoding.
%
% Nowadays, Unicode makes |\cyr...| macros outdated since both source
% file and font file are encoded consistently. These macros
@@ -668,22 +799,159 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% conform the mechanism of language switching encoded into the
% core of \pkg{babel} and therefore can mess it.
%
+%
+% \section{Known problems}
+%
+% Before switching from a legacy 8-bit engine (tex, pdftex) to an Unicode
+% engine (xetex, luatex) and vise versa delete all |.aux|, |.toc|, |.lot|,
+% |.lof| files as they might have stored incompatible internal encodings.
+%
+% T2* font encodings do not have old Slavonic letter `yat' (Ѣ, ѣ), which is
+% hard-coded in ancient caption names. Be sure to use an Unicode engine
+% or borrow |\cyryat| and |\CYRYAT| commands from X2 font encoding when setting
+% the language attribute to ``ancient'', for example:
+%
+%\begin{verbatim}
+%\usepackage[X2,T2A]{fontenc}
+%\usepackage[utf8]{inputenc}
+%\DeclareUnicodeCharacter{0462}{\CYRYAT}
+%\DeclareTextSymbolDefault{\CYRYAT}{X2}
+%\DeclareUnicodeCharacter{0463}{\cyryat}
+%\DeclareTextSymbolDefault{\cyryat}{X2}
+%\usepackage[english,russian.ancient]{babel}
+%\end{verbatim}
+%
+% None of Cyrillic font encoding have `iotated E' (Ѥ, ѥ). When running legacy
+% engines you are advices to substitute it with |\CYRIE|, |\cyrie| (Є, є):
+%
+%\begin{verbatim}
+%\DeclareUnicodeCharacter{0464}{\CYRIE}
+%\DeclareUnicodeCharacter{0465}{\cyrie}
+%\end{verbatim}
+%
+%
+% \section{History}
+%
+% \subsection*{Changes in version 1.3f}
+% \begin{itemize}
+% \item
+% .
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.3e}
+% \begin{itemize}
+% \item
+% All stuff is now generated from single dtx file.
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.3d}
+% \begin{itemize}
+% \item
+% Bug fix in |\Proj|.
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.3c}
+% \begin{itemize}
+% \item
+% Bug fix in |\daterussian|.
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.3b}
+% \begin{itemize}
+% \item
+% Added support for the packages \pkg{listing}, \pkg{nomencl}, and
+% \pkg{nomentbl}.
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.3a}
+% \begin{itemize}
+% \item
+% ^^AAdded the Russian language attributes \Lopt{modern} (default) and
+% ^^A\Lopt{ancient} (for typesetting ancient slavonic books).
+% Added the Russian language attribute \Lopt{ancient} for typesetting
+% ancient slavonic books.
+%\end{itemize}
+%
+% \subsection*{Changes in version 1.3}
+% \begin{itemize}
+% \item
+% Updated for babel 3.9.
+% \item
+% The |\alph| and |\Alph| commands are not redefined any more by the
+% \file{russianb.ldf}.
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.2a}
+% \begin{itemize}
+% \item
+% Indentation of the first paragraph after sectioning command has been removed.
+% Use \pkg{indentfirst} to make first paragraph indented.
+% \end{itemize}
+%
+% \subsection*{Changes in version 1.2}
+%
+% \begin{itemize}
+% \item
+% Font encoding \texttt{LWN} is not supported any more.
+% \item
+% Macros |\Rus|, |\English|, |\Eng| have been removed.
+% |\Russian| is now alias of |\selectlanguage{russian}|.
+% Former definition of |\Russian| is preserved in the macros
+% |\cyrillictext| and |\cyr| which should not be used at user
+% level.
+% \item
+% Lua\LaTeX\ and Xe\LaTeX\ are now supported;
+% |\cyr...| commands are bypassed if Lua\LaTeX\ or Xe\LaTeX\ run.
+%^^A\item
+%^^A First paragraph after section command is indented over the entire
+%^^A document if \Lopt{russian} is the last option of \pkg{babel} and,
+%^^A hence, Russian is the main language.
+% \item
+% The shorthands |"<| and |">| are redefined; now they match
+% |\guillemotleft| and |\guillemotright|, respectively, rather than
+% |\flqq| and |\frqq|.
+% \item
+% Definitions of |\latinencoding| and |\latintext| are removed
+% since these macros are defined in \file{babel.def}.
+% \item
+% |\cyrmathbf|, |\cyrmathsf|, |\cyrmathit|, and |\cyrmathtt| commands
+% are removed; they do work in math mode; instead of them it is advised to use corresponding
+% |\text..| command.
+% \item
+% The macro |\No| is removed since the Cyrillic number sign is available
+% on keyboard and can also be typed using the |\textnumero| macro.
+% \item
+% Added translation for Glossary.
+% \end{itemize}
+%
+%\StopEventually{^^A
+% \PrintChanges
+% \PrintIndex
+%}
+%
+%\iffalse
+%<*code>
+%\fi
+%
+%
% \section{Implementation}
%
-% \changes{russianb-1.3c}{2014/06/02}{Fix bug in \string\daterussian}
-% \changes{russianb-1.3b}{2013/04/06}{Renamed to russianb to work with babel 3.9}
-% \changes{russianb-1.2b}{2013/01/08}{Renamed to russianu to work with babel-beta 3.9}
-% \changes{russianb-1.2a}{2012/06/06}{Indentation of 1st paragraph removed}
-% \changes{russianb-1.1c}{1996/07/11}{Replaced \cs{undefined} with
+% \changes{1.3e}{2014/10/14}{Update documentation}
+% \changes{1.3d}{2014/10/02}{Fix bug in \cs{Proj}}
+% \changes{1.3c}{2014/06/02}{Fix bug in \cs{daterussian}}
+% \changes{1.3b}{2013/04/06}{Renamed to russianb to work with babel 3.9}
+% \changes{1.2b}{2013/01/08}{Renamed to russianu to work with babel-beta 3.9}
+% \changes{1.2a}{2012/06/06}{Indentation of 1st paragraph removed}
+% \changes{1.1c}{1996/07/11}{Replaced \cs{undefined} with
% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
% with \LaTeX}
-% \changes{russianb-1.1d}{1996/10/10}{Moved the definition of
+% \changes{1.1d}{1996/10/10}{Moved the definition of
% \cs{atcatcode} right to the beginning.}
-% \changes{russianb-1.1k}{1999/08/19}{replaced all \cs{penalty}\cs{@M}
+% \changes{1.1k}{1999/08/19}{replaced all \cs{penalty}\cs{@M}
% with \cs{nobreak}}
-% \changes{russianb-1.1f}{1998/06/26}{%
+% \changes{1.1f}{1998/06/26}{%
% Added definitions of Cyrillic emdash stuff and thinspace}
-% \changes{russianb-1.1f}{1998/06/26}{%
+% \changes{1.1f}{1998/06/26}{%
% Added definitions of Cyrillic emdash stuff and thinspace}
%
%
@@ -694,12 +962,11 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% such as checking the category code of the \texttt{@}-sign, preventing
% the \file{.ldf} file from being processed twice, etc.
%
-% \changes{russianb-1.1d}{1996/11/03}{Now use \cs{LdfInit} to perform
+% \changes{1.1d}{1996/11/03}{Now use \cs{LdfInit} to perform
% initial checks}
-% \changes{russianb-1.1e}{1996/12/29}{Added closing brace to second
+% \changes{1.1e}{1996/12/29}{Added closing brace to second
% argument of \cs{LdfInit}}
% \begin{macrocode}
-%<*code>
\LdfInit{russian}{captionsrussian}
% \end{macrocode}
%
@@ -716,7 +983,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% (note that babel loads this file right when it processes its own options)
% but we borrow code from these packages.
%
-% \changes{russianb-1.2}{2011/10/20}{Check for LuaTeX}
+% \changes{1.2}{2011/10/20}{Check for LuaTeX}
% \begin{macrocode}
\ifdefined\if@uni@ode
\PackageError{babel}{if@uni@ode already defined.\MessageBreak
@@ -755,7 +1022,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% Xe\LaTeX\ and \texttt{EU2} in case of Lua\LaTeX.
%
% \begin{macro}{\latinencoding}
-% \changes{russianb-1.2}{2011/10/20}{Removed \cs{latinencoding}}
+% \changes{1.2}{2011/10/20}{Removed \cs{latinencoding}}
%
% The macro |\latinencoding| keeps the name of Latin encoding. It is
% defined in \file{babel.def} and is wrapped into |\AtBeginDocument| to allow
@@ -764,23 +1031,20 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% As of version 1.2, definition of |\latinencoding| was removed from
% \file{russianb.ldf} since it is overruled in \file{babel.def}.
% For example, after
-% \begin{verbatim}
-% \usepackage[T1,T2A]{fontenc}
-% \usepackage[english,russian]{babel}
-% \end{verbatim}%
-% \unskip
+%\begin{verbatim}
+%\usepackage[T1,T2A]{fontenc}
+%\usepackage[english,russian]{babel}
+%\end{verbatim}%
% as well as after
-% \begin{verbatim}
-% \usepackage[english,russian]{babel}
-% \usepackage[T1,T2A]{fontenc}
-% \end{verbatim}%
-% \unskip
+%\begin{verbatim}
+%\usepackage[english,russian]{babel}
+%\usepackage[T1,T2A]{fontenc}
+%\end{verbatim}%
% |\latinencoding| will be set to \texttt{T1}.
% After
-% \begin{verbatim}
-% \usepackage[english,russian]{babel}
-% \end{verbatim}%
-% \unskip
+%\begin{verbatim}
+%\usepackage[english,russian]{babel}
+%\end{verbatim}%
% |\latinencoding| will be \texttt{OT1}.
%
% In Unicode mode, the package \pkg{fontspec} should be loaded instead of
@@ -828,7 +1092,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% encodings are kept for unicode compilers (Lua\LaTeX\ and Xe\LaTeX) since
% they can run in compatibility (8-bit) mode.
%
-% \changes{russianb-1.2}{2011/10/20}{EU1 and EU2 encodings added}
+% \changes{1.2}{2011/10/20}{EU1 and EU2 encodings added}
% \begin{macrocode}
\def\@setcyrillicencoding{%
\def\sce@a##1##2{%
@@ -865,7 +1129,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% encoding definitions; we use the lowercase names (i.e.,
% \texttt{lcyenc.def} instead of \texttt{LCYenc.def}) when we do that.
%
-% \changes{russianb-1.2}{2011/10/20}{Removed test for present of
+% \changes{1.2}{2011/10/20}{Removed test for present of
% encoding files}
% \begin{macrocode}
\ifdefined\cyrillicencoding
@@ -889,7 +1153,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% As final wisdom, we repeat |\@setcyrillicencoding| at |\begin{document}|
% time. We could not avoid previous call to |\@setcyrillicencoding| since
% compiler scan \file{.aux} file before it executes delayed code, and
-% \file{.aux} may contain |\set@langauge{russian}|; the latter rises
+% \file{.aux} may contain |\set@langauge{russian}|; the latter rises an
% error if |\cyrillicencoding| would not be defined by that time.
% \begin{macrocode}
\AtBeginDocument{\@setcyrillicencoding}
@@ -944,23 +1208,18 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% in \file{russianb.ldf}'s counterpart in the package \pkg{polyglossia},
% analog of \pkg{babel} for Xe\LaTeX.
%
-% \changes{russianb-1.2}{2011/10/20}{Removed \cs{English} macro}
-% \begin{quote}
-% \begin{verbatim}
+% \changes{1.2}{2011/10/20}{Removed \cs{English} macro}
% \begin{macrocode}
-%\DeclareRobustCommand{\English}{%
-% \fontencoding\latinencoding\selectfont
-% \let\encodingdefault\latinencoding
-% \expandafter\set@hyphenmins\englishhyphenmins
-% \language\l@english}%
-%\let\Eng\English
+%%\DeclareRobustCommand{\English}{%
+%% \fontencoding\latinencoding\selectfont
+%% \let\encodingdefault\latinencoding
+%% \expandafter\set@hyphenmins\englishhyphenmins
+%% \language\l@english}%
+%%\let\Eng\English
% \end{macrocode}
-% \end{verbatim}
-% \end{quote}
%
% \textsc{Next part of code should be moved to \texttt{X2enc.def},
% \texttt{X2enc.dfu}, if needed.}
-% \begin{quote}
% Since the \texttt{X2} encoding does not contain Latin letters, we
% should make some redefinitions of \LaTeX\ macros which implicitly
% produce Latin letters.
@@ -970,7 +1229,6 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% |\r{a}|. This leads to unpredictable results when the font encoding
% does not contain the Latin letters `A' and `a' (like \texttt{X2}).
%
-% \begin{verbatim}
% \begin{macrocode}
\expandafter\ifx\csname T@X2\endcsname\relax\else
\DeclareTextSymbolDefault{\AA}{OT1}
@@ -979,8 +1237,6 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\DeclareTextCommand{\AA}{OT1}{\r A}
\fi
% \end{macrocode}
-% \end{verbatim}
-% \end{quote}
%
%
% The macro |\cyrillictext| switches current (e.g., Latin) font encoding
@@ -993,17 +1249,15 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% Since |\latintext| is defined by the core of babel we do not repeat its
% definition here.
%
-% \changes{russianb-1.1o}{2003/10/12}{\cs{latintext} is already
+% \changes{1.1o}{2003/10/12}{\cs{latintext} is already
% defined by the core of babel}
-% \changes{russianb-1.2}{2011/10/20}{\cs{lat} removed}
-% \begin{verbatim}
+% \changes{1.2}{2011/10/20}{\cs{lat} removed}
% \begin{macrocode}
%\DeclareRobustCommand{\latintext}{%
% \fontencoding{\latinencoding}\selectfont
% \def\encodingdefault{\latinencoding}}
%\let\lat\latintext
% \end{macrocode}
-% \end{verbatim}
%
% \Describe\textcyrillic{\marg{text}}
% The macros |\cyrillictext| and |\latintext| are declarations.
@@ -1013,7 +1267,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% The macro |\textcyrillic| takes an argument which is then typeset using the
% requested font encoding. It is thus an equivalent or
% |\foreignlangauge{russian}|.
-% \changes{russianb-1.1o}{2003/10/12}{\cs{textlatin} already defined
+% \changes{1.1o}{2003/10/12}{\cs{textlatin} already defined
% by the core of babel}
% \begin{macrocode}
\DeclareTextFontCommand{\textcyrillic}{\cyrillictext}
@@ -1033,10 +1287,10 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
%
% \textsc{Should we wrap this chunk into At Begin document?}
%
-% \changes{russianb-1.1l}{1999/08/27}{Made not using inputenc a
+% \changes{1.1l}{1999/08/27}{Made not using inputenc a
% warning instead of an error}
-% \changes{russianb-1.2}{2011/10/11}{Added EU1 and EU2 encodings}
-% \changes{russianb-1.2}{2011/10/11}{Removed LWN encoding}
+% \changes{1.2}{2011/10/11}{Added EU1 and EU2 encodings}
+% \changes{1.2}{2011/10/11}{Removed LWN encoding}
% \begin{macrocode}
\@ifpackageloaded{inputenc}{%
\if@uni@ode
@@ -1064,15 +1318,15 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% The double quote character \texttt{"} is declared to be active in
% Russian language.
%
-% \changes{russianb-1.1a}{1995/03/07}{Use the new mechanism for dealing
+% \changes{1.1a}{1995/03/07}{Use the new mechanism for dealing
% with active characters}
% \begin{macrocode}
\initiate@active@char{"}
% \end{macrocode}
%
-% \changes{russianb-1.1f}{1998/06/26}{Added switch for
+% \changes{1.1f}{1998/06/26}{Added switch for
% doublequote shorthands}
-% \changes{russianb-1.3}{2013/01/10}{Removed switch for
+% \changes{1.3}{2013/01/10}{Removed switch for
% doublequote shorthands}
%
% \begin{macro}{\mdqon}
@@ -1210,7 +1464,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% \texttt{T2*} switching of languages also changes the emdash length typed as
% ligature in the source file.
%
-% \changes{russianb-1.2}{2011/10/20}{Warning is added if \cs{cyrdash} defined}
+% \changes{1.2}{2011/10/20}{Warning is added if \cs{cyrdash} defined}
% \begin{macrocode}
\ifx\cyrdash\undefined
\def\cyrdash{\hbox to.8em{--\hss--}}
@@ -1218,8 +1472,8 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\fi
% \end{macrocode}
%
-% \changes{russianb-1.1f}{1998/06/26}{%
-% Add macro for thinspace between initials}
+% \changes{1.1f}{1998/06/26}{%
+% Add macro for thin space between initials}
%
% Finally, we define a shorthand thin space to be placed between initials
% as in |D.",Mendeleev|. When used instead of |\,| as in |D.\,Mendeleev|
@@ -1258,11 +1512,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% since it causes error at compilation time in case if \LaTeX\ is running
% and \texttt{utf8} input encoding is not declared.
%
-% Note that two names for the Table of Contents can be used in Russian
-% publications. For books (and reports) the second variant is
-% appropriate, but for proceedings the first variant is preferred:
-%
-% \changes{russianb-1.2}{2011/10/20}{Unicode code-points added for LuaLaTeX}
+% \changes{1.2}{2011/10/20}{Unicode code-points added for LuaLaTeX}
% \begin{macrocode}
\if@uni@ode
%\captionsrussian@modern
@@ -1273,6 +1523,11 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\bibname{Литература}% [only book, report]
\def\chaptername{Глава}% [only book, report]
\def\appendixname{Приложение}%
+% \end{macrocode}
+% Note that two names for the Table of Contents can be used in Russian
+% publications. For books (and reports) the second variant is
+% appropriate, but for proceedings the first variant is preferred:
+% \begin{macrocode}
\@ifundefined{thechapter}
{\def\contentsname{Содержание}}%
{\def\contentsname{Оглавление}}%
@@ -1297,6 +1552,9 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\lstlistlistingname{Листинги}% [listings] (the "List of") {Listings}
\def\notesname{Заметки}% [endnotes] {Notes}
}%
+% \end{macrocode}
+% Additional definitions for the package \pkg{nomencl}:
+% \begin{macrocode}
%% =========================================
%% nomencl
\ifdefined\nomname
@@ -1306,12 +1564,14 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\pagedeclaration#1{, стр.\nobreakspace#1}%
}%
\fi
+% \end{macrocode}
+% Additional captions for the \cls{revtex} class.
+% \begin{macrocode}
%% =========================================
%% RevTeX4 & RevTeX4-1
%%\@ifclassloaded{revtex4-1}
%%{<true code>}
%%{<false coode>}%
- %\ifdefined\@pacs@name
\@ifclassloaded{revtex4-1}
{%
\addto\captionsrussian{%
@@ -1330,8 +1590,10 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\Accepted@name{Принято }%{Accepted }%
\def\Published@name{Опубликовано }%{Published }%
}%
- %\fi
}{}%
+% \end{macrocode}
+% Now we proceed to the ancient version in unicode encoding.
+% \begin{macrocode}
\def\captionsrussian@ancient{%
\def\prefacename{Предисловіе}%
\def\refname{Примѣчанія}%
@@ -1362,13 +1624,13 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\lstlistingname{Листинг}%
\def\lstlistlistingname{Листинги}%
%\ifdefined\nomname
- \def\nomname{Объавлениѥ}% {Обозначенія}%
+ % see http://old_russian.academic.ru/8433/%D0%BE%D0%B1%D1%8A%CB%AB%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%A5
+ \def\nomname{Обозначенія}%{Объавлениѥ}% <-- #0465
%\fi
\def\notesname{Заметки}%
}
% =========================================
% RevTeX4 & RevTeX4-1
- %\ifdefined\@pacs@name
\@ifclassloaded{revtex4-1}
{%
\addto\captionsrussian@ancient{%
@@ -1387,7 +1649,6 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\Accepted@name{Принято }%{Accepted }%
\def\Published@name{Опубликовано }%{Published }%
}%
- %\fi
}{}%
% =========================================
\else
@@ -1460,15 +1721,18 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
{\def\contentsname{%
{\cyr\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn\cyrii\cyre}}}%
\let\tocname=\contentsname
+ % Списокъ иллюстрацій
\def\listfigurename{%
{\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk\cyrhrdsn\
- \cyri\cyrl\cyrl\cyryu\cyrs\cyrt\cyrr\cyra\cyrc\cyrii\cyrishrt}}% <-- Списокъ иллюстрацій
+ \cyri\cyrl\cyrl\cyryu\cyrs\cyrt\cyrr\cyra\cyrc\cyrii\cyrishrt}}
+ % Списокъ таблицъ
\def\listtablename{%
{\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk\cyrhrdsn\
- \cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrhrdsn}}% <-- Списокъ таблицъ
+ \cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrhrdsn}}%
+ % Предмѣтный указатель, ѣ (\cyryat) in X2 encoding only
\def\indexname{%
{\cyr\CYRP\cyrr\cyre\cyrd\cyrm\cyryat\cyrt\cyrn\cyrery\cyrishrt\space
- \cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl\cyrsftsn}}% <-- Предмѣтный указатель, есть \cyryat в кодировке X2
+ \cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl\cyrsftsn}}%
\def\authorname{%
{\cyr\CYRI\cyrm\cyre\cyrn\cyrn\cyro\cyrishrt\
\cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl\cyrsftsn}}%
@@ -1499,7 +1763,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% \Describe\daterussian{}
% The macro |\daterussian| is used to reset the macro |\today| in Russian.
%
-% \changes{russianb-1.2}{2011/10/20}{Unicode code-points added for LuaLaTeX}
+% \changes{1.2}{2011/10/20}{Unicode code-points added for LuaLaTeX}
% \begin{macrocode}
\if@uni@ode
\addto\daterussian{%
@@ -1576,11 +1840,11 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% As of v.1.2 we removed a definition for |\englishhyphenmins|. It is
% not deal of \file{russianb.ldf}.
%
-% \changes{russianb-1.1a}{1995/07/04}{use \cs{russianhyphenmins} to
+% \changes{1.1a}{1995/07/04}{use \cs{russianhyphenmins} to
% store the correct values}
-% \changes{russianb-1.1m}{2000/09/22}{Now use \cs{providehyphenmins} to
+% \changes{1.1m}{2000/09/22}{Now use \cs{providehyphenmins} to
% provide a default value}
-% \changes{russianb-1.2}{2011/10/20}{\cs{englishhyphenmins} is removed}
+% \changes{1.2}{2011/10/20}{\cs{englishhyphenmins} is removed}
% \begin{macrocode}
\providehyphenmins{\CurrentOption}{\tw@\tw@}
\providehyphenmins{russian}{\tw@\tw@}
@@ -1596,7 +1860,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% The macro |\noextrasrussian| is used to cancel the actions of
% |\extrasrussian|.
%
-% \changes{russianb-1.1b}{1996/02/20}{Added switch to \texttt{LWN}
+% \changes{1.1b}{1996/02/20}{Added switch to \texttt{LWN}
% encoding}
%
% First, we instruct \pkg{babel} to switch font encoding using earlier
@@ -1657,7 +1921,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% Resetting |\fontencoding| in |\@alph| and |\@Alph| causes an error
% if the package |smartref| is loaded and a |\sref| occurs after the
% |\appendix| declaration which resets |\thechapter| to |\@Alph\c@chapter|.
-% \changes{russianb-1.3}{2013/03/22}{Removed \cs{@alph} and \cs{@Alph}}
+% \changes{1.3}{2013/03/22}{Removed \cs{@alph} and \cs{@Alph}}
%
% \begin{macrocode}
%\def\@alph#1{{\fontencoding{\latinencoding}\selectfont
@@ -1748,12 +2012,10 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% macro. However the Russian number sign is now superseded with |\textnumero|.
% Moreover, it can be found of Russian keyboard. Therefore we discard |\No|
% since v.1.2.
-% \begin{quote}
-% \begin{verbatim}
+% \begin{macrocode}
%\DeclareRobustCommand{\No}{%
% \ifmmode{\nfss@text{\textnumero}}\else\textnumero\fi}
-% \end{verbatim}
-% \end{quote}
+% \end{macrocode}
%
%
% As of version 1.2 the macros |\cyrmath..| are not supported any more. They
@@ -1801,7 +2063,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% macro |\th| that conflicts with the text symbol |\th|
% defined in Latin~1 encoding:
%
-% \changes{russianb-1.2}{2004/05/21}{Change definition of \cs{th}
+% \changes{1.2}{2004/05/21}{Change definition of \cs{th}
% only for this language}
% \begin{macrocode}
\def\sh{\mathop{\operator@font sh}\nolimits}
@@ -1820,12 +2082,13 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\cosec{\mathop{\operator@font cosec}\nolimits}
% \end{macrocode}
%
-% \Describe\nod{}%
+% \Describe\Prob{}%
+% \DescribeOther\Variance{}%
+% \DescribeOther\nod{}%
% \DescribeOther\nok{}%
-% \DescribeOther\prog{}%
% \DescribeOther\NOD{}%
% \DescribeOther\NOK{}%
-% \DescribeOther\Prog{}%
+% \DescribeOther\Proj{}%
% Finally, we define some rare Russian mathematical symbols:
% \begin{macrocode}
\def\Prob{\mathop{\kern\z@\mathsf{P}}\nolimits}
@@ -1835,7 +2098,7 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
\def\nok{\mathop{\mathrm{н.о.к.}}\nolimits}
\def\NOD{\mathop{\mathrm{НОД}}\nolimits}
\def\NOK{\mathop{\mathrm{НОК}}\nolimits}
- \def\proj{\mathop{\mathrm{Пр}}\nolimits}
+ \def\Proj{\mathop{\mathrm{Пр}}\nolimits}
\else
\def\nod{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrd.}}\nolimits}
\def\nok{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrk.}}\nolimits}
@@ -1853,31 +2116,16 @@ text commands such as |\textbf|, |\textsf|, |\textit|, |\texttt|, e.t.c.
% loading a local configuration file, and preparing the language
% to be activated at |\begin{document}| time.
%
-% \changes{russianb-1.1d}{1996/11/03}{Now use \cs{ldf@finish} to wrap
+% \changes{1.1d}{1996/11/03}{Now use \cs{ldf@finish} to wrap
% up}
% \begin{macrocode}
\ldf@finish{russian}
% \end{macrocode}
-%</code>
%
-% \Finale
-%%
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-%%
-\endinput
-
-y
+% \begin{macrocode}
+% \end{macrocode}
+%\iffalse
+%</code>
+%\fi
+% \CheckSum{1993}
+%\Finale