summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/cyrplain
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/plain/cyrplain')
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/README86
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyramstx.ini10
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrblue.ini3
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrcmfnt.tex82
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrecfnt.tex82
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrtex.cfg45
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrtex.ini2
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrtex.tex29
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/cyrtxinf.ini25
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/makefmts.bat4
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/makefmts.sh8
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/plainenc.tex252
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/txxdefs.tex38
-rw-r--r--Master/texmf-dist/tex/plain/cyrplain/txxextra.tex27
14 files changed, 693 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/plain/cyrplain/README b/Master/texmf-dist/tex/plain/cyrplain/README
new file mode 100644
index 00000000000..9cdbbc15ee6
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/README
@@ -0,0 +1,86 @@
+This directory contains files which can be used to make rusified
+Plain TeX and other Plain TeX based formats, such as AMS-TeX, Texinfo
+or BLUe TeX, using cyrillic fonts in LCY encoding (which is an 8-bit
+extension of OT1 similar to cp866) or T2A encoding.
+
+The file `plainenc.tex' provides a preliminary support of
+inputenc/fontenc mechanisms for Plain TeX. It uses the standard
+*unmodified* LaTeX files: inputenc.sty, font encoding definition files
+(such as lcyenc.def), and input encoding definition files (koi8-r.def,
+cp866.def, etc), so that your documents may be in any input encoding
+supported by the `cyrillic' bundle of LaTeX.
+
+The files `example4.tex' and `example2.tex' contain examples of using
+different input encodings in Plain TeX. See also a file example3.tex
+which shows another way to process Plain TeX files---using the `plain'
+package for LaTeX.
+
+To install russian support for Plain TeX, AMS-TeX, Texinfo or BLUe
+TeX, please do the following steps:
+
+1) To setup hyphenation, you will need russian hyphenation patterns
+and a file `hyphen.cfg' (either from BABEL or created manually). It is
+recommended to use russian hyphenation patterns contained in the
+`ruhyphen' package (see the README in the parent directory for more
+information). There you will find also documentation on installation
+and usage of patterns. Note, that for all Plain TeX-based formats it
+is recommended to use "combined" Russian-English patterns as a single
+language to avoid necessity to use language switching commands like
+\Russian and \English (you may use a sample "language.dat" from the
+ruhyphen package when creating format files).
+
+2) If you want to be able to use input encodings other than cp866, you
+should install the T2 package first. Then edit the file `cyrtex.cfg',
+and choose the default input encoding of your documents in the line
+"\def\definpenc{koi8-r}". In this case you must install BABEL, because
+we use some files from BABEL (e.g., plain.def, hyphen.cfg).
+
+Otherwise (if you will process only documents in cp866 encoding),
+change "\iftrue" to "\iffalse" in `cyrtex.cfg' (or put cp866 in the
+definition of \definpenc).
+
+Note that we use here the file `lcydefs.tex' which is part of the
+`cyrillic' bundle for LaTeX2e (CTAN:macros/latex/required/cyrillic).
+Note that this file should be generated as explained in `00readme.txt'
+from the `cyrillic' bundle.
+
+3) By default, we use LH fonts. You could change this to any other
+LCY- or T2A-encoded font set (e.g. to use Type1 virtual fonts like
+`C1 fonts package'), by redefining the command `\fontprefix' in
+cyrtex.cfg.
+
+We support LCY and T2A font encodings (see cyrtex.cfg). If you use
+T2A encoding, you should get EXMI fonts from CTAN:macros/ec-plain/*.mf
+and define \miprefix to `ex' in cyrtex.cfg.
+
+4) Edit the file `makefmts.sh' or `makefmts.bat' (depending on your
+platform), and (optionally) remove or comment out the lines which call
+INITEX for formats which you do not want to install.
+
+Then run the script/batch file `makefmts.sh' or `makefmts.bat'. This will
+create TeX format files: `cyrtex.fmt', `cyramstex.fmt', `cyrtexinfo.fmt'
+and `cyrblue.fmt' (maybe not all of them if you commented some lines
+in makefmts script). In case of `makefmts.bat', we use short DOSish
+filenames `cyramstx.fmt', `cyrtxinf.fmt' instead of `cyramstex.fmt',
+`cyrtexinfo.fmt'. You can rename them to long names if your OS
+supports them. ;-) Finally, install the format files as usual (maybe
+creating symlinks or scripts/batch files which call TeX with these
+formats).
+
+Note: if you are using `amsppt' with AMS-TeX, you should also patch
+the file `amsppt.sty', changing some hard-coded CM fonts to the
+corresponding cyrillic fonts. The patch `amsppt.diff' is in the `etc'
+directory of the T2 package [if you do not have a `patch' utility, you
+may do the changes manually].
+
+Please, use plain.tex version 3.1415926 or above.
+
+To make your documents encoding independent, you can use macros like
+`\inputencoding{koi8-r}' in your documents (you can even use several
+input encodings in one document, --- see the file `example4.tex' in
+the directory `../examples').
+
+Please report bugs via email addresses given in the file README in
+the parent directory.
+
+Happy TeXing!
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyramstx.ini b/Master/texmf-dist/tex/plain/cyrplain/cyramstx.ini
new file mode 100644
index 00000000000..197bc7ae530
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyramstx.ini
@@ -0,0 +1,10 @@
+\input cyrtex
+\UNPROTECT
+\input amstex
+%% Uncomment this line to include the AMSPPT preprint style in the
+%% format file:
+%%\documentstyle{amsppt}
+\input txxextra
+\makerobust\dots
+\PROTECT
+\dump
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrblue.ini b/Master/texmf-dist/tex/plain/cyrplain/cyrblue.ini
new file mode 100644
index 00000000000..5c20ae26912
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrblue.ini
@@ -0,0 +1,3 @@
+\input cyrtex
+\input blue
+\dump
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrcmfnt.tex b/Master/texmf-dist/tex/plain/cyrplain/cyrcmfnt.tex
new file mode 100644
index 00000000000..82c031f5fb8
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrcmfnt.tex
@@ -0,0 +1,82 @@
+% Definitions of fonts for `cyrillized' Plain TeX: CM-like names
+%
+% Fonts assigned to \preloaded are not part of "plain TeX",
+% but they are preloaded so that other format packages can use them.
+% For example, if another set of macros says "\font\ninerm=cmr9",
+% TeX will not have to reload the font metric information for cmr9.
+
+\message{fonts,}
+
+\font\tenrm=\fontprefix r10 % roman text
+%\font\preloaded=\fontprefix r9
+%\font\preloaded=\fontprefix r8
+\font\sevenrm=\fontprefix r7
+%\font\preloaded=\fontprefix r6
+\font\fiverm=\fontprefix r5
+
+\font\teni=\miprefix mi10 % math italic
+%\font\preloaded=\miprefix mi9
+%\font\preloaded=\miprefix mi8
+\font\seveni=\miprefix mi7
+%\font\preloaded=\miprefix mi6
+\font\fivei=\miprefix mi5
+
+\font\tensy=cmsy10 % math symbols
+%\font\preloaded=cmsy9
+%\font\preloaded=cmsy8
+\font\sevensy=cmsy7
+%\font\preloaded=cmsy6
+\font\fivesy=cmsy5
+
+\font\tenex=cmex10 % math extension
+
+%\font\preloaded=\fontprefix ss10 % sans serif
+%\font\preloaded=\fontprefix ssq8
+
+%\font\preloaded=\fontprefix ssi10 % sans serif italic
+%\font\preloaded=\fontprefix ssqi8
+
+\font\tenbf=\fontprefix bx10 % boldface extended
+%\font\preloaded=\fontprefix bx9
+%\font\preloaded=\fontprefix bx8
+\font\sevenbf=\fontprefix bx7
+%\font\preloaded=\fontprefix bx6
+\font\fivebf=\fontprefix bx5
+
+\font\tentt=\fontprefix tt10 % typewriter
+%\font\preloaded=\fontprefix tt9
+%\font\preloaded=\fontprefix tt8
+
+%\font\preloaded=\fontprefix sltt10 % slanted typewriter
+
+\font\tensl=\fontprefix sl10 % slanted roman
+%\font\preloaded=\fontprefix sl9
+%\font\preloaded=\fontprefix sl8
+
+\font\tenit=\fontprefix ti10 % text italic
+%\font\preloaded=\fontprefix ti9
+%\font\preloaded=\fontprefix ti8
+%\font\preloaded=\fontprefix ti7
+
+\message{more fonts,}
+%\font\preloaded=\fontprefix u10 % unslanted text italic
+
+%\font\preloaded=\miprefix mib10 % bold math italic
+%\font\preloaded=cmbsy10 % bold math symbols
+
+%\font\preloaded=\fontprefix csc10 % caps and small caps
+
+%\font\preloaded=\fontprefix ssbx10 % sans serif bold extended
+
+%\font\preloaded=\fontprefix dunh10 % Dunhill style
+
+%\font\preloaded=\fontprefix r7 scaled \magstep4 % for titles
+%\font\preloaded=\fontprefix tt10 scaled \magstep2
+%\font\preloaded=\fontprefix ssbx10 scaled \magstep2
+
+%\font\preloaded=manfnt % METAFONT logo and dragon curve and special symbols
+
+% Additional \preloaded fonts can be specified here.
+% (And those that were \preloaded above can be eliminated.)
+
+\let\preloaded=\undefined % preloaded fonts must be declared anew later.
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrecfnt.tex b/Master/texmf-dist/tex/plain/cyrplain/cyrecfnt.tex
new file mode 100644
index 00000000000..2920195c016
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrecfnt.tex
@@ -0,0 +1,82 @@
+% Definitions of fonts for `cyrillized' Plain TeX: EC-like names
+%
+% Fonts assigned to \preloaded are not part of "plain TeX",
+% but they are preloaded so that other format packages can use them.
+% For example, if another set of macros says "\font\ninerm=cmr9",
+% TeX will not have to reload the font metric information for cmr9.
+
+\message{fonts,}
+
+\font\tenrm=\fontprefix rm1000 % roman text
+%\font\preloaded=\fontprefix rm0900
+%\font\preloaded=\fontprefix rm0800
+\font\sevenrm=\fontprefix rm0700
+%\font\preloaded=\fontprefix rm0600
+\font\fiverm=\fontprefix rm0500
+
+\font\teni=\miprefix mi10 % math italic
+%\font\preloaded=\miprefix mi9
+%\font\preloaded=\miprefix mi8
+\font\seveni=\miprefix mi7
+%\font\preloaded=\miprefix mi6
+\font\fivei=\miprefix mi5
+
+\font\tensy=cmsy10 % math symbols
+%\font\preloaded=cmsy9
+%\font\preloaded=cmsy8
+\font\sevensy=cmsy7
+%\font\preloaded=cmsy6
+\font\fivesy=cmsy5
+
+\font\tenex=cmex10 % math extension
+
+%\font\preloaded=\fontprefix ss1000 % sans serif
+%\font\preloaded=\fontprefix sq8
+
+%\font\preloaded=\fontprefix si1000 % sans serif italic
+%\font\preloaded=\fontprefix qi8
+
+\font\tenbf=\fontprefix bx1000 % boldface extended
+%\font\preloaded=\fontprefix bx0900
+%\font\preloaded=\fontprefix bx0800
+\font\sevenbf=\fontprefix bx0700
+%\font\preloaded=\fontprefix bx0600
+\font\fivebf=\fontprefix bx0500
+
+\font\tentt=\fontprefix tt1000 % typewriter
+%\font\preloaded=\fontprefix tt0900
+%\font\preloaded=\fontprefix tt0800
+
+%\font\preloaded=\fontprefix st1000 % slanted typewriter
+
+\font\tensl=\fontprefix sl1000 % slanted roman
+%\font\preloaded=\fontprefix sl0900
+%\font\preloaded=\fontprefix sl0800
+
+\font\tenit=\fontprefix ti1000 % text italic
+%\font\preloaded=\fontprefix ti0900
+%\font\preloaded=\fontprefix ti0800
+%\font\preloaded=\fontprefix ti0700
+
+\message{more fonts,}
+%\font\preloaded=\fontprefix ui1000 % unslanted text italic
+
+%\font\preloaded=\miprefix mib10 % bold math italic
+%\font\preloaded=cmbsy10 % bold math symbols
+
+%\font\preloaded=\fontprefix cc1000 % caps and small caps
+
+%\font\preloaded=\fontprefix sx1000 % sans serif bold extended
+
+%\font\preloaded=\fontprefix dh1000 % Dunhill style
+
+%\font\preloaded=\fontprefix rm0700 scaled \magstep4 % for titles
+%\font\preloaded=\fontprefix tt1000 scaled \magstep2
+%\font\preloaded=\fontprefix sx1000 scaled \magstep2
+
+%\font\preloaded=manfnt % METAFONT logo and dragon curve and special symbols
+
+% Additional \preloaded fonts can be specified here.
+% (And those that were \preloaded above can be eliminated.)
+
+\let\preloaded=\undefined % preloaded fonts must be declared anew later.
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrtex.cfg b/Master/texmf-dist/tex/plain/cyrplain/cyrtex.cfg
new file mode 100644
index 00000000000..97963bb26d2
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrtex.cfg
@@ -0,0 +1,45 @@
+% Cyrillic TeX configuration file for Plain TeX based packages
+
+% Select text font encoding and fonts which will be used
+\c lh/lcy/lcydefs/cm/cyrcmfnt
+%\c c3/lcy/lcydefs/cm/cyrcmfnt
+%\c la/t2a/txxdefs/ex/cyrecfnt
+%\c c1/t2a/txxdefs/ex/cyrcmfnt
+%\c lb/t2b/txxdefs/ex/cyrecfnt
+%\c lc/t2c/txxdefs/ex/cyrecfnt
+%\c ld/t2d/txxdefs/ex/cyrecfnt
+% In general, latin-based setups are also supported
+%\c cm/ot1/null/cm/cyrcmfnt
+%\c ec/t1/txxdefs/ex/cyrecfnt
+%\c ae/t1/txxdefs/ex/cyrcmfnt
+
+% Which Russian hyphenation pattern to load (if not defined here,
+% the default from ruhyphen.tex will be used)
+%\def\Pattern{al}
+%\def\Pattern{as}
+%\def\Pattern{ct}
+%\def\Pattern{dv}
+%\def\Pattern{vl}
+%\def\Pattern{zn}
+
+% Whether to switch on hyphenation of words with explicit hyphens
+% (requires hyphenation patterns with hypht1.tex or hypht2.tex loaded!)
+\iftxxenc\lccode`\-=`\- \defaulthyphenchar=127 \fi
+
+% Whether to use input encoding selection (with active characters)
+\let\ifinpenc\iftrue
+%\let\ifinpenc\iffalse
+
+% Select the default input encoding (only if inputenc is activated).
+% Some possible choices for cyrillic:
+% cp1251, cp855, cp866, cp866av, cp866mav, cp866nav, cp866tat, ctt, dbk,
+% iso88595, isoir111, koi8-r, koi8-ru, koi8-u, maccyr, macukr, mik, mls,
+% mnk, mos, ncc
+%
+% Some possible choices for latin:
+% ansinew, applemac, ascii, cp1250, cp1252, cp437, cp437de, cp850,
+% cp852, cp865, decmulti, latin1, latin2, latin3, latin5, next
+% latin1jk, latin2jk, latin3jk
+% amigapl, mazovia
+% atari, isolatin, mac, pc850, roman8
+\def\definpenc{koi8-r}
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrtex.ini b/Master/texmf-dist/tex/plain/cyrplain/cyrtex.ini
new file mode 100644
index 00000000000..def81c80380
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrtex.ini
@@ -0,0 +1,2 @@
+\input cyrtex
+\dump
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrtex.tex b/Master/texmf-dist/tex/plain/cyrplain/cyrtex.tex
new file mode 100644
index 00000000000..20c3d911e79
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrtex.tex
@@ -0,0 +1,29 @@
+\catcode`\{=1
+\catcode`\}=2
+\catcode`\#=6
+\let\iftxxenc\iffalse
+\def\c#1/#2/#3/#4/#5 {\def\fontprefix{#1}\def\Encoding{#2}\input#3
+ \def\miprefix{#4}\def\fontdefs{#5}}
+\input cyrtex.cfg
+
+\let\next\font\long\def\font#1\undefined{\let\font\next\input\fontdefs
+ \let\next\lefthyphenmin\def\lefthyphenmin##1hyphen{\let\lefthyphenmin\next
+ \let\next\undefined\input hyphen.cfg}}
+\input plain
+\edef\fmtversion{\fmtversion-Cyr}
+
+\input txxextra
+
+%\input\Encoding defs
+\ifinpenc
+ \input plainenc
+ \fontencoding\Encoding
+ \inputencoding\definpenc
+\else
+ \let\PROTECT\relax\let\UNPROTECT\relax\def\makerobust#1{}
+\fi
+
+\catcode`\@=11
+\def\Russian{\set@hyphenmins22\language\l@russian}\let\Rus\Russian
+\def\English{\set@hyphenmins23\language\l@english}\let\Eng\English
+\catcode`\@=12
diff --git a/Master/texmf-dist/tex/plain/cyrplain/cyrtxinf.ini b/Master/texmf-dist/tex/plain/cyrplain/cyrtxinf.ini
new file mode 100644
index 00000000000..9f8821a6411
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/cyrtxinf.ini
@@ -0,0 +1,25 @@
+\input cyrtex
+\ifx\fontencoding\undefined\else
+ \def\putwordAppendix{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}
+ \def\putwordChapter{\CYRG\cyrl\cyra\cyrv\cyra}
+ \def\putwordfile{\cyrf\cyra\cyrishrt\cyrl}
+% \def\putwordInfo{Info}
+% \def\putwordMethodon{Method on}
+ \def\putwordon{\cyrn\cyra}
+ \def\putwordpage{\cyrs.}
+ \def\putwordsection{\cyrr\cyra\cyrz\cyrd\cyre\cyrl}
+ \def\putwordSection{\CYRR\cyra\cyrz\cyrd\cyre\cyrl}
+ \def\putwordsee{\cyrs\cyrm.}
+ \def\putwordSee{\CYRS\cyrm.}
+ \def\putwordShortContents{\CYRK\cyrr\cyra\cyrt\cyrk\cyro\cyre\ \cyrs\cyro\cyrd\cyre\cyrr\cyrzh\cyra\cyrn\cyri\cyre}
+ \def\putwordTableofContents{\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn\cyri\cyre}
+\fi
+\catcode`\@=11
+\let\org@IeC\IeC
+\def\tmp@IeC#1{\realbackslash IeC\space{\realbackslash\expandafter\@gobble\string#1 }}
+\def\newrefx#1#2{\let\IeC\tmp@IeC\edef\reserved@a{#1}\let\IeC\org@IeC\orgrefx\reserved@a{#2}}
+\catcode`\@=12
+\input texinfo
+@let@orgrefx@refx
+@let@refx@newrefx
+@dump
diff --git a/Master/texmf-dist/tex/plain/cyrplain/makefmts.bat b/Master/texmf-dist/tex/plain/cyrplain/makefmts.bat
new file mode 100644
index 00000000000..6b2dff2638d
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/makefmts.bat
@@ -0,0 +1,4 @@
+tex386.exe -i -8 -o -mt18000 cyrtex.ini
+tex386.exe -i -8 -o -mt18000 cyramstx.ini
+tex386.exe -i -8 -o -mt18000 cyrtxinf.ini
+tex386.exe -i -8 -o -mt18000 cyrblue.ini
diff --git a/Master/texmf-dist/tex/plain/cyrplain/makefmts.sh b/Master/texmf-dist/tex/plain/cyrplain/makefmts.sh
new file mode 100644
index 00000000000..05065946a88
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/makefmts.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+tex -ini -fmt=cyrtex -progname=tex cyrtex.ini
+tex -ini -fmt=cyramstex -progname=amstex cyramstx.ini
+tex -ini -fmt=cyrtexinfo -progname=texinfo cyrtxinf.ini
+tex -ini -fmt=cyrblue -progname=tex cyrblue.ini
+
+pdftex -ini -fmt=cyrpdftex -progname=pdftex cyrtex.ini
+pdftex -ini -fmt=cyrpdftexinfo -progname=pdftexinfo cyrtxinf.ini
diff --git a/Master/texmf-dist/tex/plain/cyrplain/plainenc.tex b/Master/texmf-dist/tex/plain/cyrplain/plainenc.tex
new file mode 100644
index 00000000000..c127997c0df
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/plainenc.tex
@@ -0,0 +1,252 @@
+% This is the file plainenc.tex of the T2 package.
+%
+% This file defines some commands for Plain TeX, so that it is able to
+% read (and interpret accordingly) some LaTeX files (unchanged), such as
+% inputenc.sty, font encoding definition files (lcyenc.def, t2aenc.def,
+% t1enc.def, etc.), and various input encoding definition files
+% (koi8-r.def, latin1.def, etc.).
+%
+% These definitions are the `minimal' possible. Probably, some
+% extensions will be needed.
+
+%\ProvidesFile{plainenc.tex}[1999/12/15 v0.1 inputenc support for Plain TeX]
+\ifx\inputencoding\undefined\else\expandafter\endinput\fi
+\chardef\atcatcode=\catcode`\@ \catcode`\@=11
+
+% load definitions from BABEL's plain.def (\adddialect should now be defined)
+\ifx\adddialect\undefined\let\adddialect\relax\let\protect\relax\fi
+\input plain.def
+
+\def\NeedsTeXFormat#1[#2]{}
+\def\ProvidesFile#1{%
+ \begingroup
+ \catcode`\ 10 %
+ \@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}
+\def\@providesfile#1[#2]{%
+ \wlog{File: #1 #2}%
+ \expandafter\xdef\csname ver@#1\endcsname{#2}%
+ \endgroup}
+\let\ProvidesPackage\ProvidesFile % better than #1[#2] -> {}
+%\def\DeclareOption#1#2{\def\@OptionBody{#2}}
+%\def\ProcessOptions{\@OptionBody}
+\def\DeclareOption#1#2{}
+\def\ProcessOptions{}
+\newlinechar`\^^J
+\def\MessageBreak{^^J}
+
+\let\@empty\empty
+\long\def\@gobbletwo#1#2{}
+\let\@inmathwarn\@gobble
+
+\def\PackageWarning#1#2{\immediate\write16{^^JPackage #1 Warning: #2\on@line.^^J}}
+\def\PackageWarningNoLine#1#2{\PackageWarning{#1}{#2\@gobble}}
+\def\on@line{ on input line \the\inputlineno}
+\def\PackageError#1#2#3{\begingroup\let\protect\string
+ \errmessage{Package #1 Error: #2.^^J}\endgroup}
+\def\@latex@error#1{\PackageError{plainenc}{#1}{}}
+\def\@latex@info#1{\wlog{Info: #1}}
+
+\def\DeclareFontEncoding#1#2#3{%
+ \expandafter\let\csname#1-cmd\endcsname\@current@cmd
+% \expandafter\let\csname#1-tmcmd\endcsname\@current@tmcmd
+ \def\LastDeclaredEncoding{#1}}
+% special math setup is unneeded if only one font encoding is used
+\def\@current@cmd#1{%
+ \ifx\protect\@typeset@protect
+ \else
+ \noexpand#1\expandafter\@gobble
+ \fi}
+\def\DeclareFontSubstitution#1#2#3#4{}
+\def\DeclareErrorFont#1#2#3#4#5{}
+\def\DeclareSymbolFont#1#2#3#4#5{}
+\def\SetSymbolFont#1#2#3#4#5#6{}
+\def\DeclareSymbolFontAlphabet#1#2{}
+\def\DeclareMathAlphabet#1#2#3#4#5{}
+\def\SetMathAlphabet#1#2#3#4#5#6{}
+\def\DeclareMathSymbol#1#2#3#4{% simplified definition
+ \count@=#4 \advance\count@ "7000 \mathchardef#1\count@}
+
+\def\@unexpandable@protect{\noexpand\protect\noexpand}
+%\let\protect\@typeset@protect
+
+\def\protected@edef{%
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \afterassignment\restore@protect
+ \@edef}
+\def\protected@xdef{%
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \afterassignment\restore@protect
+ \@xdef}
+\def\restore@protect{\let\protect\@@protect}
+
+\let\@edef\edef
+\let\@xdef\xdef
+
+% redefine \input to be compatible with LaTeX (for inputenc.sty)
+\ifx\@@input\@undefined\let\@@input\input\fi
+\def\input{\@ifnextchar\bgroup\@iinput\@@input}
+\def\@iinput#1{\@@input#1 } % This is a simplified definition
+
+% this is used in cyrillic encoding definition files
+\def\@ifundefined#1{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\long\def\@secondoftwo#1#2{#2}
+
+% support for uppercase/lowercase
+\let\@uppercase\uppercase
+\let\@lowercase\lowercase
+\newtoks\@uclctoks
+\DeclareRobustCommand\uppercas@{\afterassignment\upperc@se\@uclctoks}
+\DeclareRobustCommand\lowercas@{\afterassignment\lowerc@se\@uclctoks}
+\def\upperc@se{{%
+ \def\i{I}\def\j{J}%
+ \def\reserved@a##1##2{\let##1##2\reserved@a}%
+ \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
+ \protected@edef\reserved@a{\@uppercase\expandafter{\the\@uclctoks}}%
+ \reserved@a}}
+\def\lowerc@se{{%
+ \def\reserved@a##1##2{\let##2##1\reserved@a}%
+ \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
+ \protected@edef\reserved@a{\@lowercase\expandafter{\the\@uclctoks}}%
+ \reserved@a}}
+\def\@uclclist{\oe\OE\o\O\ae\AE\dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH
+\cyra\CYRA\cyrabhch\CYRABHCH\cyrabhchdsc\CYRABHCHDSC\cyrabhdze
+\CYRABHDZE\cyrabhha\CYRABHHA\cyrae\CYRAE\cyrb\CYRB\cyrbyus
+\CYRBYUS\cyrc\CYRC\cyrch\CYRCH\cyrchldsc\CYRCHLDSC\cyrchrdsc
+\CYRCHRDSC\cyrchvcrs\CYRCHVCRS\cyrd\CYRD\cyrdelta\CYRDELTA
+\cyrdje\CYRDJE\cyrdze\CYRDZE\cyrdzhe\CYRDZHE\cyre\CYRE\cyreps
+\CYREPS\cyrerev\CYREREV\cyrery\CYRERY\cyrf\CYRF\cyrfita
+\CYRFITA\cyrg\CYRG\cyrgdsc\CYRGDSC\cyrgdschcrs\CYRGDSCHCRS
+\cyrghcrs\CYRGHCRS\cyrghk\CYRGHK\cyrgup\CYRGUP\cyrh\CYRH
+\cyrhdsc\CYRHDSC\cyrhhcrs\CYRHHCRS\cyrhhk\CYRHHK\cyrhrdsn
+\CYRHRDSN\cyri\CYRI\cyrie\CYRIE\cyrii\CYRII\cyrishrt\CYRISHRT
+\cyrishrtdsc\CYRISHRTDSC\cyrizh\CYRIZH\cyrje\CYRJE\cyrk\CYRK
+\cyrkbeak\CYRKBEAK\cyrkdsc\CYRKDSC\cyrkhcrs\CYRKHCRS\cyrkhk
+\CYRKHK\cyrkvcrs\CYRKVCRS\cyrl\CYRL\cyrldsc\CYRLDSC\cyrlhk
+\CYRLHK\cyrlje\CYRLJE\cyrm\CYRM\cyrmdsc\CYRMDSC\cyrmhk\CYRMHK
+\cyrn\CYRN\cyrndsc\CYRNDSC\cyrng\CYRNG\cyrnhk\CYRNHK\cyrnje
+\CYRNJE\cyrnlhk\CYRNLHK\cyro\CYRO\cyrotld\CYROTLD\cyrp\CYRP
+\cyrphk\CYRPHK\cyrq\CYRQ\cyrr\CYRR\cyrrdsc\CYRRDSC\cyrrhk
+\CYRRHK\cyrrtick\CYRRTICK\cyrs\CYRS\cyrsacrs\CYRSACRS
+\cyrschwa\CYRSCHWA\cyrsdsc\CYRSDSC\cyrsemisftsn\CYRSEMISFTSN
+\cyrsftsn\CYRSFTSN\cyrsh\CYRSH\cyrshch\CYRSHCH\cyrshha\CYRSHHA
+\cyrt\CYRT\cyrtdsc\CYRTDSC\cyrtetse\CYRTETSE\cyrtshe\CYRTSHE
+\cyru\CYRU\cyrushrt\CYRUSHRT\cyrv\CYRV\cyrw\CYRW\cyry\CYRY
+\cyrya\CYRYA\cyryat\CYRYAT\cyryhcrs\CYRYHCRS\cyryi\CYRYI\cyryo
+\CYRYO\cyryu\CYRYU\cyrz\CYRZ\cyrzdsc\CYRZDSC\cyrzh\CYRZH
+\cyrzhdsc\CYRZHDSC}
+\def\PROTECT{%
+ \let\uppercase\uppercas@\let\lowercase\lowercas@
+ \let\edef\protected@edef\let\xdef\protected@xdef}
+\def\UNPROTECT{%
+ \let\uppercase\@uppercase\let\lowercase\@lowercase
+ \let\edef\@edef\let\xdef\@xdef}
+\PROTECT
+
+\let\org@write\write
+\let\org@immediate\immediate
+\DeclareRobustCommand\write{\afterassignment\write@a\count@}
+\def\immediate#1{\ifx#1\write\def\immediate@{\org@immediate}\fi\org@immediate#1}
+\let\immediate@\@empty
+\long\def\write@a#1{%
+ \begingroup
+ \let\thepage\relax
+ \let\protect\@unexpandable@protect
+% \@edef\reserved@a{\expandafter\noexpand\immediate@\org@write\the\count@{#1}}%
+% \reserved@a
+ \immediate@\org@write\the\count@{#1}%
+ \endgroup
+ \let\immediate@\@empty}
+
+% make handling of protected commands within whatsits correct:
+\let\org@shipout\shipout
+\def\shipout#1#2{\begingroup\setbox0=#1{#2}\let\protect\noexpand\org@shipout\box0\endgroup}
+
+% avoid problems in references with russian letters (e.g. in Texinfo)
+% (experimental code):
+%\def\DeclareTextSymbol#1#2#3{%
+% \@dec@text@cmd\chardef@hack#1{#2}#3\relax
+%}
+%\def\chardef@hack#1#2{%
+% \bgroup
+% \lccode`\0=#2
+% \lowercase{
+% \egroup
+% \let#1=0
+% }
+% \show#1
+%}
+
+% for inputenc files
+\def\makeatletter{\catcode`\@11\relax}
+\def\makeatother{\catcode`\@12\relax}
+
+\ifx\Orb\undefined
+ \message{^^J* Please get newer version of plain.tex from^^J%
+ * CTAN:systems/knuth/lib/plain.tex^^J* Aborting.^^J^^J}\end
+\fi
+\def\textcircled#1{{\ooalign{\hfil\raise.07ex\hbox{#1}\hfil\crcr\Orb}}}
+%\let\textlatin\rm
+
+\def\fontencoding#1{\makeatletter
+ \UNPROTECT % \lowercase for \DeclareTextComposite
+ \@lowercase{\input{#1enc.def}}%
+ \PROTECT
+ \@edef\cf@encoding{\@uppercase{\def\noexpand\cf@encoding{#1}}}%
+ \cf@encoding
+ \makeatother}
+\input inputenc.sty
+\let\org@inputencoding\inputencoding
+\def\inputencoding#1{\UNPROTECT % \uppercase, \edef
+ \org@inputencoding{#1}%
+ \PROTECT}
+
+% definitions of some LaTeX macros used in enc.def and .def files
+\def\sh@ft#1{\dimen@.00#1ex\multiply\dimen@\fontdimen1\font\kern-.0156\dimen@}
+\chardef\@xxxii=32
+\def\hb@xt@{\hbox to}
+\def\@tabacckludge#1{\expandafter\@changed@cmd
+ \csname\string#1\endcsname\relax}
+\DeclareRobustCommand{\ensuremath}{%
+ \ifmmode
+ \expandafter\@firstofone
+ \else
+ \expandafter\@ensuredmath
+ \fi}
+\long\def\@ensuredmath#1{$\relax#1$}
+\def\TextSymbolUnavailable#1{\@latex@error{%
+ Command \protect#1 unavailable in encoding \cf@encoding}}
+\def\textbullet{{\tensy\char15}}
+\def\textperiodcentered{{\tensy\char1}}
+%\font\tensmc=cmcsc10
+%\DeclareTextCommandDefault{\textregistered}{\textcircled{\tensmc r}}
+\DeclareTextCommandDefault{\texttrademark}{\textsuperscript{TM}}
+\DeclareTextCommandDefault{\SS}{SS}
+\DeclareTextCommandDefault{\textordfeminine}{\textsuperscript{a}}
+\DeclareTextCommandDefault{\textordmasculine}{\textsuperscript{o}}
+\DeclareRobustCommand*\textsuperscript[1]{%
+ {\m@th\ensuremath{^{\hbox{\sevenrm#1}}}}}
+\DeclareRobustCommand{\nobreakspace}{\leavevmode\nobreak\ }
+%\DeclareRobustCommand{\pounds}{%
+% \ifmmode\mathsterling\else\textsterling\fi}
+%\def\mathsterling{\mathit{\mathchar"7024}}
+%\def\mathit#1{{\it#1}}
+\def\frac#1#2{{\begingroup#1\endgroup\over#2}}
+\def\@height{height} \def\@depth{depth} \def\@width{width}
+\def\hmode@bgroup{\leavevmode\bgroup}
+
+% a helper command
+\def\makerobust#1{\expandafter\let\csname\expandafter
+ \@gobble\string#1 \endcsname#1%
+ \@edef#1{\noexpand\protect\expandafter\noexpand\csname\expandafter
+ \@gobble\string#1 \endcsname}}
+
+\catcode`\@=\atcatcode \let\atcatcode\undefined
+
+\endinput
diff --git a/Master/texmf-dist/tex/plain/cyrplain/txxdefs.tex b/Master/texmf-dist/tex/plain/cyrplain/txxdefs.tex
new file mode 100644
index 00000000000..be56c4b7570
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/txxdefs.tex
@@ -0,0 +1,38 @@
+% setup {cat,uc,lc,sf,math}code values for T* font encodings
+\expandafter\ifx\csname txxfam\endcsname\relax
+ \def\txxfam{0}
+\fi
+\def\letter#1 #2 {%
+ \ifnum\catcode#1=13\else\catcode#1=11 \catcode#2=11 \fi
+ \uccode#1=#1 \uccode#2=#1
+ \lccode#1=#2 \lccode#2=#2
+ \sfcode#1=999 \sfcode#2=1000
+ \count255=#1 \advance\count255 "7\txxfam 00 \mathcode#1=\count255
+ \count255=#2 \advance\count255 "7\txxfam 00 \mathcode#2=\count255
+}
+\letter 128 160 \letter 129 161 \letter 130 162 \letter 131 163
+\letter 132 164 \letter 133 165 \letter 134 166 \letter 135 167
+\letter 136 168 \letter 137 169 \letter 138 170 \letter 139 171
+\letter 140 172 \letter 141 173 \letter 142 174 \letter 143 175
+\letter 144 176 \letter 145 177 \letter 146 178 \letter 147 179
+\letter 148 180 \letter 149 181 \letter 150 182 \letter 151 183
+\letter 152 184 \letter 153 185 \letter 154 186 \letter 155 187
+\letter 156 188
+\letter 192 224 \letter 193 225 \letter 194 226 \letter 195 227
+\letter 196 228 \letter 197 229 \letter 198 230 \letter 199 231
+\letter 200 232 \letter 201 233 \letter 202 234 \letter 203 235
+\letter 204 236 \letter 205 237 \letter 206 238 \letter 207 239
+\letter 208 240 \letter 209 241 \letter 210 242 \letter 211 243
+\letter 212 244 \letter 213 245 \letter 214 246 \letter 215 247
+\letter 216 248 \letter 217 249 \letter 218 250 \letter 219 251
+\letter 220 252 \letter 221 253 \letter 222 254 \letter 223 255
+\let\letter\undefined
+\lccode 25=25 \uccode 25=73 \lccode 26=26 \uccode 26=74 \lccode 27=27
+\lccode 157=105 \uccode 157=157 \mathcode 157="7\txxfam 9D
+\lccode 158=158 \uccode 158=208 \mathcode 158="7\txxfam 9E
+\lccode 159=0 \uccode 159=0 \mathcode 159="7\txxfam 9F
+\lccode 189=0 \uccode 189=0 \mathcode 189="7\txxfam BD
+\lccode 190=0 \uccode 190=0 \mathcode 190="7\txxfam BE
+\lccode 191=0 \uccode 191=0 \mathcode 191="7\txxfam BF
+\let\iftxxenc\iftrue
+\endinput
diff --git a/Master/texmf-dist/tex/plain/cyrplain/txxextra.tex b/Master/texmf-dist/tex/plain/cyrplain/txxextra.tex
new file mode 100644
index 00000000000..6ce4041f5b2
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/cyrplain/txxextra.tex
@@ -0,0 +1,27 @@
+\def\next{ex}\ifx\next\miprefix
+\mathchardef\Gamma="0180
+\mathchardef\Delta="0181
+\mathchardef\Theta="0182
+\mathchardef\Lambda="0183
+\mathchardef\Xi="0184
+\mathchardef\Pi="0185
+\mathchardef\Sigma="0186
+\mathchardef\Upsilon="0187
+\mathchardef\Phi="0188
+\mathchardef\Psi="0189
+\mathchardef\Omega="018A
+\fi\let\next\undefined
+
+\iftxxenc
+\def\aa{\r a}
+\def\AA{\r A}
+\def\acute{\mathaccent"7001 }
+\def\grave{\mathaccent"7000 }
+\def\ddot{\mathaccent"7004 }
+\def\tilde{\mathaccent"7003 }
+\def\bar{\mathaccent"7009 }
+\def\breve{\mathaccent"7008 }
+\def\check{\mathaccent"7007 }
+\def\hat{\mathaccent"7002 }
+\def\dot{\mathaccent"700A }
+\fi