summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/babel-contrib/russian/README
blob: fb47e71ebd3a39e9e200fb8053b8472c8f543be5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
----------------------------------------------------------------

Russian language module for Babel, v1.3l

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";
  alternatively run "tex.exe russianb.dtx"
  or "tex.exe russianb.ins", if you don't need documentation
- Move "russianb.ldf" to <textmf>/tex/latex/babel-russian
- Move "russianb.pdf" and README 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 to be compile
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 try any True Type or Open Type fonts installed on your computer provided
that those fonts came with Russian letters.

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

2020-10-16 version 1.3l

    * Patches for Russian language from hyperref package to babel-russian module
      (thanks to Ulrike Fischer).

2020-09-06 version 1.3k

    * Bug fixed in definition of \Russian command (thanks to Javier Bezos).

2017-08-08 version 1.3j

    * TU encoding is set as default for X∃TeX and LuaTeX.

    * \cyrdash now always prints dash 20 percents shorter than emdash.

2017-01-12 version 1.3i

    * Bug fixed in \NOD, \NOK and similar log-functions (thanks to V. Vlasov).

2016-02-18 version 1.3h

    * Bugs fixed in captions for revtex4 and revtex4-1 classes.

    * \cyrdash is now faked using \ProvideTextCommandDefault rather
      than \def.

2015-05-01 version 1.3g

    * Added support for revtex4 and revtex4-1 classes.

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.

----------------------------------------------------------------
%%
%% \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        \~}
%%

%% Nonunicode Cyrillic Letters
%% \CYRA=А
%% \CYRB=Б
%% \CYRV=В
%% \CYRG=Г
%% \CYRGUP=Ґ
%% \CYRD=Д
%% \CYRE=Е
%% \CYRIE=Є
%% \CYRZH=Ж
%% \CYRZ=З
%% \CYRI=И
%% \CYRII=I
%% \CYRYI=Ї
%% \CYRISHRT=Й
%% \CYRK=К
%% \CYRL=Л
%% \CYRM=М
%% \CYRN=Н
%% \CYRO=О
%% \CYRP=П
%% \CYRR=Р
%% \CYRS=С
%% \CYRT=Т
%% \CYRU=У
%% \CYRF=Ф
%% \CYRH=Х
%% \CYRC=Ц
%% \CYRCH=Ч
%% \CYRSH=Ш
%% \CYRSHCH=Щ
%% \CYRYU=Ю
%% \CYRYA=Я
%% \CYRSFTSN=Ь
%%
%% \cyra=а
%% \cyrb=б
%% \cyrv=в
%% \cyrg=г
%% \cyrgup=ґ
%% \cyrd=д
%% \cyre=е
%% \cyrie=є
%% \cyrzh=ж
%% \cyrz=з
%% \cyri=и
%% \cyrii=i
%% \cyryi=ї
%% \cyrishrt=й
%% \cyrk=к
%% \cyrl=л
%% \cyrm=м
%% \cyrn=н
%% \cyro=о
%% \cyrp=п
%% \cyrr=р
%% \cyrs=с
%% \cyrt=т
%% \cyru=у
%% \cyrf=ф
%% \cyrh=х
%% \cyrc=ц
%% \cyrch=ч
%% \cyrsh=ш
%% \cyrshch=щ
%% \cyryu=ю
%% \cyrya=я
%% \cyrsftsn=ь