summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-12-21 17:18:31 +0000
committerKarl Berry <karl@freefriends.org>2012-12-21 17:18:31 +0000
commit1b512e2a067c98afcd3edcbdfe2743953ddd337d (patch)
tree581c5b6baf825a2d9789259d2a857c38cafb7224 /Master
parent55f452fc0f663684549d2d2d603fb5ac7320f45a (diff)
csplain (20dec12)
git-svn-id: svn://tug.org/texlive/trunk@28597 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/csplain/base/cavantga.tex41
-rw-r--r--Master/texmf-dist/tex/csplain/base/cbookman.tex39
-rw-r--r--Master/texmf-dist/tex/csplain/base/chelvet.tex39
-rw-r--r--Master/texmf-dist/tex/csplain/base/cncent.tex38
-rw-r--r--Master/texmf-dist/tex/csplain/base/cpalatin.tex37
-rw-r--r--Master/texmf-dist/tex/csplain/base/csenc-u.tex54
-rw-r--r--Master/texmf-dist/tex/csplain/base/csfontsm.tex67
-rw-r--r--Master/texmf-dist/tex/csplain/base/csplain.ini32
-rw-r--r--Master/texmf-dist/tex/csplain/base/ctimes.tex38
-rw-r--r--Master/texmf-dist/tex/csplain/base/czech.sty259
-rw-r--r--Master/texmf-dist/tex/csplain/base/hyphen.lan591
-rw-r--r--Master/texmf-dist/tex/csplain/base/il2code.tex4
-rw-r--r--Master/texmf-dist/tex/csplain/base/plaina4.tex9
-rw-r--r--Master/texmf-dist/tex/csplain/base/slovak.sty258
-rw-r--r--Master/texmf-dist/tex/csplain/base/t1code.tex268
-rw-r--r--Master/texmf-dist/tex/csplain/base/t1enc-u.tex130
-rw-r--r--Master/texmf-dist/tex/csplain/base/ttimes.tex50
-rw-r--r--Master/texmf-dist/tex/csplain/base/ucode.tex314
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/ams-math.tex509
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cavantga.tex34
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cbookman.tex33
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/chars-8z.tex69
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/chelvet.tex60
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cncent.tex33
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cpalatin.tex33
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex36
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-all.tex35
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-antt.tex56
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-arev.tex21
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-bera.tex42
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex36
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-charter.tex20
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex31
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-heros.tex57
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex36
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-polta.tex58
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-schola.tex36
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-termes.tex36
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/ctimes.tex34
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/dcfonts.tex (renamed from Master/texmf-dist/tex/csplain/base/dcfonts.tex)0
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/ecfonts.tex (renamed from Master/texmf-dist/tex/csplain/base/ecfonts.tex)0
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/lmfonts.tex70
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/luafonts.tex27
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/tx-math.tex710
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/unifam.tex27
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac.tex1486
46 files changed, 4910 insertions, 983 deletions
diff --git a/Master/texmf-dist/tex/csplain/base/cavantga.tex b/Master/texmf-dist/tex/csplain/base/cavantga.tex
deleted file mode 100644
index d74dcf89f00..00000000000
--- a/Master/texmf-dist/tex/csplain/base/cavantga.tex
+++ /dev/null
@@ -1,41 +0,0 @@
-% The file cavantga.tex (C) Petr Olsak, 1996, 1999
-% Use "\input cavantga" to set the AvantGarde fonts family in text mode.
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set AvantGarde fonts family in very
-% simple math formulas (without greek letters).
-
-\font\tenrm=pagk8z at 10pt
-\font\tenbf=pagd8z at 10pt
-\font\tenit=pagko8z at 10pt
-\font\tentt=pcrr8u at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm pagk8z at7pt
- \font\fiverm pagk8z at5pt
- \font\sevenit pagko8z at7pt
- \font\fiveit pagko8z at5pt
- \font\sevenbf pagd8z at7pt
- \font\fivebf pagd8z at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
-
-
-
-
diff --git a/Master/texmf-dist/tex/csplain/base/cbookman.tex b/Master/texmf-dist/tex/csplain/base/cbookman.tex
deleted file mode 100644
index 08b34af5df9..00000000000
--- a/Master/texmf-dist/tex/csplain/base/cbookman.tex
+++ /dev/null
@@ -1,39 +0,0 @@
-% The file cbookman.tex (C) Petr Olsak, 1996, 1999
-% Use "\input cbookman" to set the Bookman fonts family in text mode
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set Bookman fonts family in very
-% simple math formulas (without greek letters).
-
-\font\tenrm=pbkl8z at 10pt
-\font\tenbf=pbkd8z at 10pt
-\font\tenit=pbkli8z at 10pt
-\font\tentt=pcrr8u at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm pbkl8z at7pt
- \font\fiverm pbkl8z at5pt
- \font\sevenit pbkli8z at7pt
- \font\fiveit pbkli8z at5pt
- \font\sevenbf pbkd8z at7pt
- \font\fivebf pbkd8z at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
-
-
diff --git a/Master/texmf-dist/tex/csplain/base/chelvet.tex b/Master/texmf-dist/tex/csplain/base/chelvet.tex
deleted file mode 100644
index 43aeaba70d1..00000000000
--- a/Master/texmf-dist/tex/csplain/base/chelvet.tex
+++ /dev/null
@@ -1,39 +0,0 @@
-% The file chelvet.tex (C) Petr Olsak, 1996, 1999
-% Use "\input chelvet" to set the Helvetica fonts family in text mode
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set Helvetica fonts family in very
-% simple math formulas (without greek letters).
-
-\font\tenrm=phvr8z at 10pt
-\font\tenbf=phvb8z at 10pt
-\font\tenit=phvro8z at 10pt
-\font\tentt=pcrr8u at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm phvr8z at7pt
- \font\fiverm phvr8z at5pt
- \font\sevenit phvro8z at7pt
- \font\fiveit phvro8z at5pt
- \font\sevenbf phvb8z at7pt
- \font\fivebf phvb8z at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
-
-
diff --git a/Master/texmf-dist/tex/csplain/base/cncent.tex b/Master/texmf-dist/tex/csplain/base/cncent.tex
deleted file mode 100644
index ded5b013d2f..00000000000
--- a/Master/texmf-dist/tex/csplain/base/cncent.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-% The file cncent.tex (C) Petr Olsak, 1996, 1999
-% Use "\input cncent" to set the NewCentury fonts family in text mode
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set NewCentury fonts family in very
-% simple math formulas (without greek letters).
-
-\font\tenrm=pncr8z at 10pt
-\font\tenbf=pncb8z at 10pt
-\font\tenit=pncri8z at 10pt
-\font\tentt=pcrr8u at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm pncr8z at7pt
- \font\fiverm pncr8z at5pt
- \font\sevenit pncri8z at7pt
- \font\fiveit pncri8z at5pt
- \font\sevenbf pncb8z at7pt
- \font\fivebf pncb8z at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
-
diff --git a/Master/texmf-dist/tex/csplain/base/cpalatin.tex b/Master/texmf-dist/tex/csplain/base/cpalatin.tex
deleted file mode 100644
index 4818b51749d..00000000000
--- a/Master/texmf-dist/tex/csplain/base/cpalatin.tex
+++ /dev/null
@@ -1,37 +0,0 @@
-% The file cpalatin.tex (C) Petr Olsak, 1996, 1999
-% Use "\input cpalatin" to set the Palatino fonts family in text mode
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set Palatino fonts family in very
-% simple math formulas (without greek letters).
-
-\font\tenrm=pplr8z at 10pt
-\font\tenbf=pplb8z at 10pt
-\font\tenit=pplri8z at 10pt
-\font\tentt=pcrr8u at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm pplr8z at7pt
- \font\fiverm pplr8z at5pt
- \font\sevenit pplri8z at7pt
- \font\fiveit pplri8z at5pt
- \font\sevenbf pplb8z at7pt
- \font\fivebf pplb8z at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
diff --git a/Master/texmf-dist/tex/csplain/base/csenc-u.tex b/Master/texmf-dist/tex/csplain/base/csenc-u.tex
index da8b8d58139..0a6794d0091 100644
--- a/Master/texmf-dist/tex/csplain/base/csenc-u.tex
+++ b/Master/texmf-dist/tex/csplain/base/csenc-u.tex
@@ -5,10 +5,8 @@
%%% example: tex -ini -enc \let\enc=u \input csplain.ini
% This is very simple setting of Czech and Slovak alphabet only.
-% No special characters (such as dash, quotes etc.) used in UTF8 are
-% declared here. No "UTF8 unknown code checking" is implemented here.
-% The force is in the simplicity. The \mubyteout is set to 1 only.
% User can reset this value and add his own declaration.
+% For more information see cstexman.pdf.
\ifx\mubyte\undefined
\errhelp={You has specified \let\enc=u but this works only with encTeX
@@ -62,10 +60,56 @@
\mubyte ^^c0 ^^c5^^94\endmubyte % \' R
\mubyte ^^e0 ^^c5^^95\endmubyte % \' r
+\def\setcsucode #1 #2 #3 #4 #5{} % to skip the data form utf8lat1.tex
+ % and utf8lata.tex
+
+% There exist some character-like control sequences defined in plainTeX.
+% It seems to be usable to interpret their corresponding UTF-8 codes:
+
+\mubyte \S ^^c2^^a7\endmubyte % section sign
+\mubyte \P ^^c2^^b6\endmubyte % paragraph (pilcrow) sign
+\mubyte \ss ^^c3^^9f\endmubyte % german sharp s
+\mubyte \l ^^c5^^82\endmubyte % l slashed
+\mubyte \L ^^c5^^81\endmubyte % L slashed
+\mubyte \ae ^^c3^^a6\endmubyte % ae ligature
+\mubyte \oe ^^c5^^93\endmubyte % oe ligature
+\mubyte \o ^^c3^^b8\endmubyte % o slash
+\mubyte \AE ^^c3^^86\endmubyte % AE ligature
+\mubyte \OE ^^c5^^92\endmubyte % OE ligature
+\mubyte \O ^^c3^^98\endmubyte % O slash
+\mubyte \i ^^c4^^b1\endmubyte % dotless i
+\mubyte \j ^^c8^^b7\endmubyte % dotless j
+\mubyte \aa ^^c3^^a5\endmubyte % a with ring
+\mubyte \AA ^^c3^^85\endmubyte % A with ring
+\mubyte \copyright ^^c2^^a9\endmubyte % copyright
+\mubyte \dots ^^e2^^80^^a6\endmubyte % ellipsis
+\mubyte \dag ^^e2^^80^^a0\endmubyte % single dagger
+\mubyte \ddag ^^e2^^80^^a1\endmubyte % double dagger
+
+% The character-like control sequences defined in csplain:
+
+\mubyte \clqq ^^e2^^80^^9e\endmubyte % czech left double quote
+\mubyte \crqq ^^e2^^80^^9c\endmubyte % czech right double quote
+\mubyte \flqq ^^c2^^ab\endmubyte % french left (czech right) double guillquote
+\mubyte \frqq ^^c2^^bb\endmubyte % french right (czech left) double quillquote
+\mubyte \promile ^^e2^^80^^b0\endmubyte % per mille sign
+
+% everyjob message:
+
+\ifx\baseutfencoding\undefined \else \expandafter\endinput\fi
+
+\let\baseutfencoding\relax
+
\global\everyjob=\expandafter{\the\everyjob
- \message{The UTF8->ISO-8859-2 re-encoding of Czech+Slovak alphabet activated by encTeX}}
+ \message{The utf8->iso8859-2 re-encoding of Czech+Slovak alphabet activated by encTeX}}
+
+% Warnings about UTF-8 unknown codes are set by default:
+
+\input utf8unkn
+
+% UTF-8 input / output is active by default:
-\mubytein=1 \mubyteout=1 \mubytelog=1
+\mubytein=1 \mubyteout=3 \mubytelog=1 \xprncodes=0
\endinput
diff --git a/Master/texmf-dist/tex/csplain/base/csfontsm.tex b/Master/texmf-dist/tex/csplain/base/csfontsm.tex
new file mode 100644
index 00000000000..fcbc5e40108
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/base/csfontsm.tex
@@ -0,0 +1,67 @@
+
+% csfontsm.tex, October 2012, Petr Olsak (Ol\v s\'ak)
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This file is a part of csplain used during format generation.
+%
+% Usage: \def\sizespec{at14pt}\resizefont\tenrm
+% after this, the \tenrm font selector switches to csr10 at14pt
+%
+% The \resizefont macro takes the font selector declared by \font, uses the
+% same font but re-sets this selector to (probably) new font size declared
+% in the \sizespec macro. You can \def\sizespec{at<dimen>} or
+% \def\sizespec{magstep<number>}. The \resizefont's setting is done
+% locally, it means that you can do (for instance):
+%
+% {\def\sizespec{scaled\magstep3}\resizefont\tenbf \tenbf Title text}
+%
+% The \resizeall macro resizes the \tentt, \tenrm, \tenit, \tenbf, \tenbi
+% font selectors by currently defined \sizespec.
+% The \regfont adds a new `registered' font-selector to the \resizeall macro
+% The font-loading macros can register their fonts by \regfont.
+
+\def\sizespec{} % by default: fonts are loaded in their implicit sizes
+
+\def\resizefont #1{\expandafter
+ \font\expandafter#1\expandafter\resizefontskipat\fontname#1 \relax}
+\def\resizefontskipat#1 #2\relax{#1 \sizespec\relax}
+
+\font\tenbi=csbxti10 % it may be usable to have
+ % the quartet \rm \it \bf \bi preloaded
+\def\bi{\tenbi} % math \fam\bifam is not preloaded now
+
+\def\regfont#1{\expandafter\def\expandafter\resizeall\expandafter{%
+ \resizeall \resizefont#1}}
+
+\def\resizeall{}
+
+\regfont\tenrm \regfont\tenit \regfont\tenbf \regfont\tenbi
+\regfont\tentt
+
+
+\endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+The notice about resizing the current font.
+
+You can't use \expandafer \resizefont \the\font because \the\font expands to
+the token with internal meaning: ``current font'' and with external
+representation \fontselector where \fontselector is the control sequence
+used by primitive \font as a parameter. The internal meaning has a
+precedence and the token \the\font is inaccesible. You can make an accesible
+control sequence by re-packing it by \csname...\endcsname. Thus the macro
+\currsize{<size>} which sets the typesetting of the current font to the
+desired <size> may be:
+
+\def\currsize#1{%
+ {\escapechar=-1\xdef\tmp{\csname\expandafter\string\the\font\endcsname}}%
+ \def\sizespec{at#1}\expandafter\resizefont\tmp \tmp}
+
+or:
+
+\def\currsize#1{%
+ \expandafter\let \expandafter\tmp \the\font
+ \def\sizespec{at#1}\resizefont\tmp \tmp}
+
+
+% end of csfontsm.tex
+
diff --git a/Master/texmf-dist/tex/csplain/base/csplain.ini b/Master/texmf-dist/tex/csplain/base/csplain.ini
index 2acab859a48..2472a530617 100644
--- a/Master/texmf-dist/tex/csplain/base/csplain.ini
+++ b/Master/texmf-dist/tex/csplain/base/csplain.ini
@@ -1,18 +1,22 @@
\input csfonts % re-defines primitive \font
\input plain % format Plain
\restorefont % original meaning of primitive \font
+\input csfontsm % macros: \sizespec, \resizefont, \resizeall, \tenbi, \bi
\input il2code % extra codes for czech / slovak letters in ISO-8859-2 encoding
\input hyphen.lan % czech / slovak hyphenation pattern (may be others too)
\input plaina4 % \hsize and \vsize for A4
\everyjob=\expandafter{\the\everyjob
- \message{The format: csplain <Sep. 2005>.}
+ \message{The format: csplain <Nov. 2012>.}
\message{The cs-fonts are preloaded and A4 size implicitly defined.}}
-\ifx\enc\undefined \else \input csenc-\enc.tex \fi % re-encoding using encTeX
\ifx\xprncode\undefined \else %% The encTeX is detected
\count255=128 % All codes > 128 are printable:
\loop \xprncode\count255=1 \advance\count255 by 1
\ifnum \count255<256 \repeat
\fi
+\ifx\enc\undefined \else \input csenc-\enc.tex \fi % re-encoding using encTeX
+
+\ifx\directlua\undefined \else\input luatexiniconfig.tex \fi % LuaTeX specific
+\ifx\XeTeXuseglyphmetrics\undefined \else\XeTeXuseglyphmetrics=1 \fi % XeTeX specific
\ifx\pdfoutput\undefined \else % added in Feb. 2005
\def\tmpa{\pdfcsplain}
@@ -98,13 +102,31 @@ file extcode.tex renamed to il2code.tex (suggested by Jan Kasprzak)
* I didn't do any changes in macro code. Thus the \message still says:
The format: csplain <Sep. 2005>.
+** 8 ** <Oct. 2012>
+* File csfontsm.tex included: (\sizespec, \resizefont, \resizeall,
+ \tenbi, \bi). This file is read during format generation.
+* Little changes of the files ctimes.tex, cavantga.tex etc.
+* More changes in t1code.tex file.
+* New files tx-math.tex, ttimes.tex, tavanga.tex, etc.
+* UTF-8 input encoded by encTeX is recommended.
+* The page http://petr.olsak.net/csplain.html introduced.
+
+** 9 ** <Nov. 2012>
+* The \regfont macro added in csfontsm.tex.
+* In plaina4.tex: \pdfpagewidth (etc.) = 210 *true* mm added
+* ucode.tex introduced (for unicode setting).
+* hyphen.lan totally rewritten for possibility of loading
+ hyphen-patterns based on http://tug.org/tex-hyphen/.
+* \ifx\directlua\undefined\else \input ... \fi added
+* \ifx\XeTeXuseglyphmetrics ... added
+
COPYRIGHT
=========
-This macro package (csplain.ini, il2code.tex, csfonts.tex, hyphen.lan,
-plaina4.tex) is free software; you can use it without any restriction.
-You can redistribute it under the following condition:
+This macro package (csplain.ini, il2code.tex, csfonts.tex, csfontm.tex,
+hyphen.lan, plaina4.tex) is free software; you can use it without any
+restriction. You can redistribute it under the following condition:
You can do any changes in this software for your own usage. However,
you cannot distribute the changed software under the same name
diff --git a/Master/texmf-dist/tex/csplain/base/ctimes.tex b/Master/texmf-dist/tex/csplain/base/ctimes.tex
deleted file mode 100644
index 8411f7703c8..00000000000
--- a/Master/texmf-dist/tex/csplain/base/ctimes.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-% The file ctimes.tex (C) Petr Olsak, 1996, 1999
-% Use "\input ctimes" to set the Times fonts family in text mode
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set Times fonts family in very
-% simple math formulas (without greek letters).
-
-\font\tenrm=ptmr8z at 10pt
-\font\tenbf=ptmb8z at 10pt
-\font\tenit=ptmri8z at 10pt
-\font\tentt=pcrr8u at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm ptmr8z at7pt
- \font\fiverm ptmr8z at5pt
- \font\sevenit ptmri8z at7pt
- \font\fiveit ptmri8z at5pt
- \font\sevenbf ptmb8z at7pt
- \font\fivebf ptmb8z at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
-
diff --git a/Master/texmf-dist/tex/csplain/base/czech.sty b/Master/texmf-dist/tex/csplain/base/czech.sty
deleted file mode 100644
index 48736608f5a..00000000000
--- a/Master/texmf-dist/tex/csplain/base/czech.sty
+++ /dev/null
@@ -1,259 +0,0 @@
-%%
-%% This is file `czech.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% cslatex.dtx (with options: `czech')
-%%
-%% Tento soubor je soucasti baliku CsLaTeX a je vygenerovan z
-%% distribucniho souboru cslatex.dtx.
-%%
-%% Copyright (c) 1994--98, 2002
-%% Jaroslav Snajdr, Zdenek Wagner, Jiri Zlatuska a The LaTeX3 Project
-%%
-%% Tento soubor NENI soucasti systemu LaTeX2e
-%% ------------------------------------------
-%%
-%% Dalsi informace naleznete na www.cstug.cz/cslatex.
-%%
-\ifx\dateczech\undefined\else\endinput\fi
-\ifx\addlanguage\undefined\else
- \ifx\LdfInit\@undefined
- \def\LdfInit{%
- \chardef\atcatcode=\catcode`\@
- \catcode`\@=11\relax
- \input babel.def\relax
- \catcode`\@=\atcatcode \let\atcatcode\relax
- \LdfInit}
- \fi
-\input czech.ldf
-\endinput\fi
-\newif\iflte
-\ifx\documentclass\undefined\else\ltetrue\fi
-\iflte
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{czech}[2002/07/19 v2.4 CSTeX czech style]
-\else
- \message{Document Style Option `czech' ver. 2.4 <July 2002>.}
- \edef\origcatcodeat{\the\catcode`\@}\catcode`\@=11
- \let\providecommand=\def
- \let\protect=\relax
-\fi
-\iflte
- \def\defaultcsoption{IL2}
- \DeclareOption{IL2}{\def\encodingdefault{IL2}}
- \DeclareOption {T1}{\def\encodingdefault {T1}}
- \DeclareOption{OT1}{\def\encodingdefault{OT1}}
- \DeclareOption{nosplit}{\standardhyphens}
- \DeclareOption{split}{\splithyphens}
- \DeclareOption{nocaptions}{\let\cap@unchgd=\relax}
- \DeclareOption{olduv}{\let\cs@olduv=\relax}
- \DeclareOption{cstex}{\relax} % Removed, lasts for compatibility
- \ExecuteOptions{IL2}
- \ProcessOptions
- \def\dms#1#2{\DeclareMathSymbol{#1}{\mathalpha}{letters}{#2}}
- \ifx\encodingdefault\defaultcsoption
- \let\cs@warn=\@font@warning \let\@font@warning=\@gobble
- \let\cs@info=\@font@info \let\@font@info=\@gobble
- \SetSymbolFont{operators}{normal}{IL2}{cmr}{m}{n}
- \SetSymbolFont{operators}{bold}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathbf{normal}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathit{normal}{IL2}{cmr}{m}{it}
- \SetMathAlphabet\mathrm{normal}{IL2}{cmr}{m}{n}
- \SetMathAlphabet\mathsf{normal}{IL2}{cmss}{m}{n}
- \SetMathAlphabet\mathtt{normal}{IL2}{cmtt}{m}{n}
- \SetMathAlphabet\mathbf{bold}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathit{bold}{IL2}{cmr}{bx}{it}
- \SetMathAlphabet\mathrm{bold}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathsf{bold}{IL2}{cmss}{bx}{n}
- \SetMathAlphabet\mathtt{bold}{IL2}{cmtt}{m}{n}
- \let\@font@warning=\cs@warn \let\cs@warn=\undefined
- \let\@font@info=\cs@info \let\cs@info=\undefined
- \dms{^^e1}{"E1}\dms{^^c1}{"C1}\dms{^^e8}{"E8}\dms{^^c8}{"C8}
- \dms{^^ef}{"EF}\dms{^^cf}{"CF}\dms{^^e9}{"E9}\dms{^^c9}{"C9}
- \dms{^^ec}{"EC}\dms{^^cc}{"CC}\dms{^^ed}{"ED}\dms{^^cd}{"CD}
- \dms{^^b5}{"B5}\dms{^^a5}{"A5}\dms{^^f2}{"F2}\dms{^^d2}{"D2}
- \dms{^^f3}{"F3}\dms{^^d3}{"D3}\dms{^^f8}{"F8}\dms{^^d8}{"D8}
- \dms{^^b9}{"B9}\dms{^^a9}{"A9}\dms{^^bb}{"BB}\dms{^^ab}{"AB}
- \dms{^^fa}{"FA}\dms{^^da}{"DA}\dms{^^f9}{"F9}\dms{^^d9}{"D9}
- \dms{^^fd}{"FD}\dms{^^dd}{"DD}\dms{^^be}{"BE}\dms{^^ae}{"AE}
- \fi
-\else
- \def\gobble#1{}
- \def\DeclareRobustCommand#1#2{\expandafter\def
- \csname @\expandafter\gobble\string#1\endcsname{#2}
- \edef#1{\noexpand\protect\expandafter\noexpand
- \csname @\expandafter\gobble\string#1\endcsname}}
- \ifx\ou\undefined \def\ou{\accent23u} \fi
- \def\temp#1#2#3:{#1#2}
- \edef\tempa{\string c\string s}
- \edef\tempb{\expandafter\temp\fontname\tenrm:}
- \ifx\tempa\tempb
- \chardef\clqq=254 \sfcode254=0 \lccode254=0
- \chardef\crqq=255 \sfcode255=0 \lccode255=0
- \chardef\flqq=158 \sfcode158=0 \lccode158=0
- \chardef\frqq=159 \sfcode159=0 \lccode159=0
- \def\ogonek #1{\setbox0\hbox{#1}\ifdim\ht0=1ex\accent157 #1%
- \else{\ooalign{\unhbox0\crcr\hss\char157}}\fi}
- \chardef\promile=141
- \def\DeclareTextCommandDefault#1#2{}
- \else
- \let\DeclareTextCommandDefault=\DeclareRobustCommand
- \fi
-\fi
-\def\captionsczech{%
- \def\abstractname{Abstrakt}%
- \def\appendixname{P\v{r}\'{\i}loha}%
- \def\bibname{Literatura}%
- \def\ccname{Na v\v{e}dom\'{\i}}
- \def\chaptername{Kapitola}%
- \def\contentsname{Obsah}%
- \def\enclname{P\v{r}\'{\i}loha}%
- \def\figurename{Obr\'azek}%
- \def\headpagename{Strana}%
- \def\headtoname{Komu}%
- \def\indexname{Rejst\v{r}\'{\i}k}%
- \def\listfigurename{Seznam obr\'azk\r{u}}%
- \def\listtablename{Seznam tabulek}%
- \def\partname{\v{C}\'ast}%
- \def\prefacename{P\v{r}edmluva}%
- \def\proofname{D\r{u}kaz}%
- \def\seename{viz}%
- \def\alsoseename{viz tak\'e}%
- \def\refname{Reference}%
- \def\tablename{Tabulka}}
-\providecommand\captionsenglish{%
- \def\prefacename{Preface}%
- \def\refname{References}%
- \def\abstractname{Abstract}%
- \def\bibname{Bibliography}%
- \def\chaptername{Chapter}%
- \def\appendixname{Appendix}%
- \def\contentsname{Contents}%
- \def\listfigurename{List of Figures}%
- \def\listtablename{List of Tables}%
- \def\indexname{Index}%
- \def\figurename{Figure}%
- \def\tablename{Table}%
- \def\partname{Part}%
- \def\enclname{encl}%
- \def\ccname{cc}%
- \def\headtoname{To}%
- \def\pagename{Page}%
- \def\headpagename{Page}%
- \def\prefacename{Preface}%
- \def\seename{see}%
- \def\alsoname{see also}}
-\def\dateczech{%
- \def\today{\number\day. \ifcase\month\or ledna\or \'unora\or
- b\v{r}ezna\or dubna\or kv\v{e}tna\or \v{c}ervna\or \v{c}ervence\or
- srpna\or z\'a\v{r}\'\i\or \v{r}\'{\i}jna\or listopadu\or
- prosince\fi \space\number\year}}
-\iflte\ifx\cap@unchgd\undefined\captionsczech\dateczech\fi\fi
-\providecommand\dateUSenglish{\def\today{\ifcase\month\or
- January\or February\or March\or April\or May\or June\or July\or
- August\or September\or October\or November\or December\fi
- \space\number\day, \number\year}}
-\providecommand\dateenglish{\def\today{\ifcase\day\or 1st\or 2nd\or
- 3rd\or 4th\or 5th\or 6th\or 7th\or 8th\or 9th\or 10th\or 11th\or
- 12th\or 13th\or 14th\or 15th\or 16th\or 17th\or 18th\or 19th\or
- 20th\or 21st\or 22nd\or 23rd\or 24th\or 25th\or 26th\or 27th\or
- 28th\or 29th\or 30th\or 31st\fi ~\ifcase\month\or January\or
- February\or March\or April\or May\or June\or July\or August\or
- September\or October\or November\or December\fi \space
- \number\year}}
-\DeclareTextCommandDefault\clqq{\leavevmode
- \set@low@box{''}%
- \setbox1=\hbox{l\/}\dimen1=\wd1
- \setbox1=\hbox{l}\advance\dimen1 by -\wd1
- \ifdim\dimen1>0pt\kern-.1em\box0\kern.1em
- \else\kern.1em\box0\kern-.1em\fi\nobreak\hskip0pt}
-\DeclareTextCommandDefault\crqq{\edef\@SF{\spacefactor\the\spacefactor}%
- \nobreak\kern-.07em\hbox{``}\kern.07em\@SF\relax}
-\def\set@low@box#1{\setbox2=\hbox{,}\setbox0=\hbox{#1}%
- \dimen0=\ht0 \advance\dimen0 by -\ht2
- \setbox0=\hbox{\lower\dimen0 \box0}\ht0=\ht2\dp0=\dp2}
-\DeclareRobustCommand\clq{\leavevmode\set@low@box{\char'047 }%
- \box0 \kern.04em\nobreak\hskip0pt\relax}
-\DeclareRobustCommand\crq{{\edef\@SF{\spacefactor\the\spacefactor}%
- \nobreak\char'140 \kern.17em\@SF\relax}}
-\iflte
- \DeclareTextCommand{\clqq}{T1}{\leavevmode\kern.1em
- \char18 \kern-.0158em\nobreak\hskip0pt}
- \DeclareTextCommand{\crqq}{T1}
- {{\edef\@SF{\spacefactor\the\spacefactor}%
- \nobreak\kern.06em \char16 \kern.024em \@SF\relax}}
-\fi
-\iflte\else\let\if@compatibility=\iffalse{\let\fi=\fi}\fi
-\ifx\cs@olduv\undefined
- \iflte
- \if@compatibility
- \DeclareRobustCommand\uv{\bgroup\aftergroup\closequotes
- \leavevmode\clqq\let\next=}
- \else
- \DeclareRobustCommand\uv[1]{{\leavevmode\clqq#1\crqq}}
- \fi
- \else
- \ifx\uv\undefined
- \def\uv{\bgroup\aftergroup\closequotes
- \leavevmode\clqq\let\next=}
- \fi
- \fi
-\else
- \DeclareRobustCommand\uv{\bgroup\aftergroup\closequotes
- \leavevmode\clqq\let\next=}
-\fi
-\def\closequotes{\unskip\crqq\relax}
-\def\prim@s{\prime\futurelet\next\pr@m@s}
-{\catcode`\'=\active
-\gdef\csprimeson{\catcode96=\active \catcode39=\active
- \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\ifx^\next\let\nxt\pr@@@t
- \else\let\nxt\egroup\fi\fi \nxt}}}
-\def\csprimesoff{\catcode96=12 \catcode39=12
- \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\ifx^\next\let\nxt\pr@@@t
- \else\let\nxt\egroup\fi\fi \nxt}}
-{\csprimeson
- \gdef'{\ifmmode\let\n@xt=\mathprim@\else\let\n@xt=\textprim@\fi\n@xt}%
- \gdef\mathprim@{^\bgroup\prim@s}%
- \gdef\textprim@{\futurelet\nxt\rightprim@}%
- \gdef\rightprim@{\ifx'\nxt\let\next=\douvr@
- \else\let\next\crq\fi\next}%
- \gdef`{\futurelet\nxt\leftprim@}%
- \gdef\leftprim@{\ifx`\nxt\let\next=\douvl@
- \else\let\next=\clq\fi\next}}
-\def\douvr@{\crqq\let\next= }%
-\def\douvl@{\clqq\let\next= }%
-\csprimesoff
-\def\cstieon{\def~{\ifmmode\else\penalty\@M\ \fi}}
-\def\cstieoff{\def~{\penalty\@M \ }}
-\iflte
-\AtBeginDocument{\czech}
- \frenchspacing
-\else
- \def\setthisl@nguage#1#2#3#4{%
- \ifx#2\undefined \immediate\write\sixt@@n
- {Warning: I do not speak #1, (the style is not inputted)}
- \else
- \ifx#4\undefined \immediate\write\sixt@@n
- {Warning: I do not speak #1,
- (the hyphenation patterns are not included)}
- \else#2#3#4\fi\fi}
-\def\selectlanguage#1{\language #1\relax
- \ifcase #1\relax \dateUSenglish\captionsenglish\ehyph\or
- \setthisl@nguage{german} \dategerman \captionsgerman \ghyph\or
- \setthisl@nguage{austrian}\dateaustrian \captionsgerman \ahyph\or
- \setthisl@nguage{french} \datefrench \captionsfrench \fhyph\or
- \setthisl@nguage{english} \dateenglish \captionsenglish\ehyph\or
- \setthisl@nguage{czech} \dateczech \captionsczech \chyph\or
- \setthisl@nguage{slovak} \dateslovak \captionsslovak \shyph\fi}
-\def\originalTeX{\selectlanguage{\USenglish}
- \csname cmaccents\endcsname}
-\def\czechTeX{\selectlanguage{\czech}\csname csaccents\endcsname}
-\def\slovakTeX{\selectlanguage{\slovak}\csname csaccents\endcsname}
-\catcode`\@=\origcatcodeat
-\czechTeX
-\fi
-\endinput
-%%
-%% End of file `czech.sty'.
diff --git a/Master/texmf-dist/tex/csplain/base/hyphen.lan b/Master/texmf-dist/tex/csplain/base/hyphen.lan
index 8565bf4546e..c8749b90a23 100644
--- a/Master/texmf-dist/tex/csplain/base/hyphen.lan
+++ b/Master/texmf-dist/tex/csplain/base/hyphen.lan
@@ -1,143 +1,524 @@
-% File HYPHEN.LAN does:
-% (1) defines new languages
-% (2) incorporates their hyphenation tables (except of US english)
-% during the \csaccents is active (see il2code.tex file).
-% (3) incorporates their exceptions of hyphenation rules.
+% File hyphen.lan
%
% Created by Oldrich Ulrych, January 5, 1993
-% Some changes by Petr Olsak April 1995, February 2000
+% General changes by Petr Olsak November 2012
%
-% The TeX version >= 3.0 is required.
+% See the end of this file for more inforamtion
+
+\def\loadpatterns #1#2 #3 #4#5#6#7#8#9{\ifx#1\undefined \else \chardef#1=#2
+ \begingroup \language=#2 \def\doaccents{\def\csaccentsmessage{}\csaccents}
+ \let\global=\relax
+ \message{Loading #4 encoding, \string#1=#2 (#3).} #5
+ \endgroup
+ \expandafter \def \csname lan:#2\endcsname {#3}
+ \expandafter \def \csname #3lang\endcsname {%
+ \language=#9\relax \initlanguage{#3}\frenchspacing
+ \lefthyphenmin=#6\righthyphenmin=#7%
+ \message{#3 hyphenation used (\string\language=\the\language).
+ \string\frenchspacing\space is set on.}}
+ \ifx#8\relax \else
+ \expandafter\def\expandafter#8\expandafter{#8\let#9#1}\fi
+ \edef\pattlist{\pattlist #1=#2 }
+ \fi
+}
+\def\pattlist{} \def\initlanguage#1{}
+
+\def\robustpatterns{\let\oripatterns=\patterns \def\patterns##1{\scanpatterns##1{}{##1}}}
+\def\scanpatterns#1{\if$#1$\expandafter\oripatterns\else
+ \ifnum`#1<128 \else \lccode`#1=`#1 \fi \expandafter\scanpatterns\fi}
+
+\def\tmp#1#2\relax{\def\tmp{#2}}\tmp ^^^^abcd\relax % 16bit TeX engine?
+\ifx\allpatterns\undefined \catcode`\:=14 \else \catcode`\:=9 \fi % comment or ignored
+
+\def\iltwolangs{} \def\corklangs{} \def\unicodelangs{}
+
+%% \corklangs (etc.) cummulates the commands
+%% \let\czPatt=\czCork \let\skPatt=\skCork (etc.)
+%% You can run \corklangs before \language=\czPatt or \language=\skPatt
+%% if you want to work in T1 encoding.
+
+%% You can remove the colon character if you want to use
+%% the language mentioned below. Or you can say:
+%% pdftex -ini "\let\deCork=\patterns \input csplain.ini"
+%% or
+%% pdftex -ini "\let\allpaterns=y \input csplain.ini"
+
+%% ASCII (these patterns work independently on choosen encoding):
+
+\let\USenglish=\patterns % Default plainTeX US English
+:\let\enusPatt=\patterns % US English extended
+:\let\engbPatt=\patterns % UK English
+:\let\itPatt=\patterns % Italian
+:\let\iaPatt=\patterns % Interlingua
+:\let\idPatt=\patterns % Indonesian
+
+%% ISO-8859-2 (default patterns in csplain):
+
+\let\czILtwo=\patterns
+\let\skILtwo=\patterns
+
+%% You can say
+%% pdftex -ini "\let\Cork=\relax \input csplain.ini"
+%% if you want to suppress the Cork (alias T1) encoded hyphenation patterns.
+
+\ifx\Cork\undefined
+
+\let\czCork=\patterns % Czech
+\let\skCork=\patterns % Slovak
+
+\ifx\tmp\empty\else
+
+:\let\deCork=\patterns % German
+:\let\frCork=\patterns % French
+:\let\plCork=\patterns % Polish
+:\let\cyCork=\patterns % Welsh
+:\let\daCork=\patterns % Danish
+:\let\esCork=\patterns % Spanish
+:\let\slCork=\patterns % Slovenian
+:\let\svCork=\patterns % Swedish
+:\let\fiCork=\patterns % Finnish
+:\let\huCork=\patterns % Hungarian
+:\let\trCork=\patterns % Turkish
+:\let\etCork=\patterns % Estonian
+:\let\euCork=\patterns % Basque
+:\let\gaCork=\patterns % Irish
+:\let\nbCork=\patterns % Norwegian Bokmal
+:\let\nnCork=\patterns % Norwegian Nynorsk
+:\let\nlCork=\patterns % Dutch
+:\let\huCork=\patterns % Hungarian
+:\let\ptCork=\patterns % Portuguese
+:\let\roCork=\patterns % Romanian
+:\let\hrCork=\patterns % Croatian
+:\let\zhCork=\patterns % Unaccented Pinyin Syllables
+:\let\isCork=\patterns % Icelandic
+:\let\hsbCork=\patterns % EC Upper Sorbian
+:\let\afCork=\patterns % Afrikaans
+:\let\glCork=\patterns % Galician
+:\let\kmrCork=\patterns % Kurmanji
+:\let\tkCork=\patterns % Turkmen
+:\let\laCork=\patterns % Latin
+
+\fi\fi
+
+%% test of Unicoded TeX engine
+
+\ifx\tmp\empty
+
+\let\czUnicode=\patterns % Czech
+\let\skUnicode=\patterns % Slovak
+:\let\deUnicode=\patterns % German
+:\let\frUnicode=\patterns % French
+:\let\plUnicode=\patterns % Polish
+:\let\cyUnicode=\patterns % Welsh
+:\let\daUnicode=\patterns % Danish
+:\let\esUnicode=\patterns % Spanish
+:\let\eoUnicode=\patterns % Esperanto
+:\let\slUnicode=\patterns % Slovenian
+:\let\svUnicode=\patterns % Swedish
+:\let\fiUnicode=\patterns % Finnish
+:\let\huUnicode=\patterns % Hungarian
+:\let\trUnicode=\patterns % Turkish
+:\let\etUnicode=\patterns % Estonian
+:\let\euUnicode=\patterns % Basque
+:\let\gaUnicode=\patterns % Irish
+:\let\nbUnicode=\patterns % Norwegian Bokmal
+:\let\nnUnicode=\patterns % Norwegian Nynorsk
+:\let\nlUnicode=\patterns % Dutch
+:\let\huUnicode=\patterns % Hungarian
+:\let\ptUnicode=\patterns % Portuguese
+:\let\roUnicode=\patterns % Romanian
+:\let\hrUnicode=\patterns % Croatian
+:\let\zhUnicode=\patterns % Unaccented Pinyin Syllables
+:\let\isUnicode=\patterns % Icelandic
+:\let\hsbUnicode=\patterns % EC Upper Sorbian
+:\let\afUnicode=\patterns % Afrikaans
+:\let\glUnicode=\patterns % Galician
+:\let\kmrUnicode=\patterns % Kurmanji
+:\let\tkUnicode=\patterns % Turkmen
+:\let\laUnicode=\patterns % Latin
+:\let\elmUnicode=\patterns % Modern Monotonic Greek
+:\let\elpUnicode=\patterns % Modern Polytonic Greek
+:\let\grcUnicode=\patterns % Ancient Greek
+:\let\caUnicode=\patterns % Catalan
+:\let\copUnicode=\patterns % Coptic
+:\let\mnUnicode=\patterns % Mongolian
+:\let\saUnicode=\patterns % Sanskrit
+:\let\ruUnicode=\patterns % Russian
+:\let\ukUnicode=\patterns % Ukrainian
+:\let\hyUnicode=\patterns % Armenian
+:\let\asUnicode=\patterns % Assamese
+:\let\hiUnicode=\patterns % Hindi
+:\let\knUnicode=\patterns % Kannada
+:\let\loUnicode=\patterns % Lao
+:\let\lvUnicode=\patterns % Latvian
+:\let\ltUnicode=\patterns % Lithuanian
+:\let\mlUnicode=\patterns % Malayalam
+:\let\mrUnicode=\patterns % Marathi
+:\let\orUnicode=\patterns % Oriya
+:\let\paUnicode=\patterns % Panjabi
+:\let\taUnicode=\patterns % Tamil
+:\let\teUnicode=\patterns % Telugu
+
+\fi
+
+\catcode58=12 % colon has normal meaning now
+\def\patt{hyphenation patterns }
+
+\loadpatterns \USenglish 0 us {US English \patt in ASCII}
+ {\input hyphen.ex }23 \relax \USenglish
+
+\loadpatterns \enusPatt 100 enus {US English extended \patt in ASCII}
+ {\input hyph-en-us }23 \relax \enusPatt
+
+\loadpatterns \engbPatt 101 engb {UK English \patt in ASCII}
+ {\input hyph-en-gb }23 \relax \engbPatt
+
+\loadpatterns \itPatt 102 it {Italian \patt in ASCII}
+ {\lccode`\'=`\' \input hyph-it }22 \relax \itPatt
+
+\loadpatterns \iaPatt 103 ia {Interlingua \patt in ASCII}
+ {\input hyph-ia }22 \relax \iaPatt
+
+\loadpatterns \idPatt 104 id {Indonesian \patt in ASCII}
+ {\input hyph-id }23 \relax \idPatt
+
+\loadpatterns \czILtwo 5 cz {Czech \patt in ISO-8859-2}
+ {\doaccents \input czhyphen.tex \input czhyphen.ex }23 \iltwolangs \czPatt
+
+\loadpatterns \skILtwo 6 sk {Slovak \patt in ISO-8859-2}
+ {\doaccents \input skhyphen.tex \input skhyphen.ex }23 \iltwolangs \skPatt
+
+\loadpatterns \czCork 15 cz {Czech \patt in Cork}
+ {\input t1code \doaccents \input czhyphen.tex \input czhyphen.ex }23
+ \corklangs \czPatt
+
+\loadpatterns \skCork 16 sk {Slovak \patt in Cork}
+ {\input t1code \doaccents \input skhyphen.tex \input skhyphen.ex }23
+ \corklangs \skPatt
+
+\loadpatterns \deCork 21 de {German \patt in Cork}
+ {\input conv-utf8-ec \input hyph-de-1996 }22 \corklangs \dePatt
+
+\loadpatterns \frCork 22 fr {French \patt in Cork}
+ {\lccode`\'=`\' \input conv-utf8-ec \input hyph-fr }23 \corklangs \frPatt
+
+\loadpatterns \plCork 23 pl {Polish \patt in Cork}
+ {\input conv-utf8-ec \input hyph-pl }22 \corklangs \plPatt
+
+\loadpatterns \cyCork 24 cy {Welsh \patt in Cork}
+ {\input conv-utf8-ec \input hyph-cy }23 \corklangs \cyPatt
+
+\loadpatterns \daCork 25 da {Danish \patt in Cork}
+ {\input conv-utf8-ec \input hyph-da }22 \corklangs \daPatt
-% ======== Pattern Input / English, Czech, Slovakian (French, German) ======
+\loadpatterns \esCork 26 es {Spanish \patt in Cork}
+ {\input conv-utf8-ec \input hyph-es }22 \corklangs \esPatt
-% USenglish hyphenation patterns and hyphenation exceptions
+\loadpatterns \slCork 28 sl {Slovenian \patt in Cork}
+ {\input conv-utf8-ec \input hyph-sl }22 \corklangs \slPatt
-\newcount\USenglish \USenglish=0
+\loadpatterns \fiCork 29 fi {Finnish \patt in Cork}
+ {\input conv-utf8-ec \input hyph-fi }22 \corklangs \fiPatt
-\begingroup \language=\USenglish
-%\input hyphen.tex \relax % read by plain.tex
-\input hyphen.ex \relax
-\endgroup
+\loadpatterns \huCork 30 hu {Hungarian \patt in Cork}
+ {\input conv-utf8-ec \input hyph-hu }22 \corklangs \huPatt
-% german hyphenation patterns and hyphenation exceptions
+\loadpatterns \trCork 31 tr {Turkish \patt in Cork}
+ {\input conv-utf8-ec \input hyph-tr }22 \corklangs \trPatt
-\newcount\german \german=1
+\loadpatterns \etCork 32 et {Estonian \patt in Cork}
+ {\input conv-utf8-ec \input hyph-et }23 \corklangs \etPatt
-% \begingroup \language=\german
-% \input gehyphen.tex \relax
-% \input gehyphen.ex \relax
-% \endgroup
+\loadpatterns \euCork 33 eu {Basque \patt in Cork}
+ {\input conv-utf8-ec \input hyph-eu }22 \corklangs \euPatt
-% austrian hyphenation patterns and hyphenation exceptions
+\loadpatterns \gaCork 34 ga {Irish \patt in Cork}
+ {\input conv-utf8-ec \input hyph-ga }23 \corklangs \gaPatt
-\newcount\austrian \austrian=2
+\loadpatterns \nbCork 35 nb {Norwegian Bokmal \patt in Cork}
+ {\input conv-utf8-ec \input hyph-nb }22 \corklangs \nbPatt
-% \begingroup \language=\german
-% \input auhyphen.tex \relax
-% \input auhyphen.ex \relax
-% \endgroup
+\loadpatterns \nnCork 36 nn {Norwegian Nynorsk \patt in Cork}
+ {\input conv-utf8-ec \input hyph-nn }22 \corklangs \nnPatt
-\newcount\french \french=3
+\loadpatterns \nlCork 37 nl {Dutch \patt in Cork}
+ {\input conv-utf8-ec \input hyph-nl }22 \corklangs \nlPatt
-%% french hyphenation patterns
-% \begingroup \language=\french
-% \input frhyphen.tex \relax
-% \input frhyphen.ex \relax
-% \endgroup
+\loadpatterns \ptCork 38 pt {Portugesse \patt in Cork}
+ {\lccode`\-=`\- \input conv-utf8-ec \input hyph-pt }23 \corklangs \ptPatt
-% USenglish hyphenation patterns and hyphenation exceptions
+\loadpatterns \roCork 39 ro {Romanian \patt in Cork}
+ {\input conv-utf8-ec \input hyph-ro }22 \corklangs \roPatt
-\newcount\english \english=4
+\loadpatterns \hrCork 40 hr {Croatian \patt in Cork}
+ {\input conv-utf8-ec \input hyph-hr }22 \corklangs \hrPatt
-%\begingroup \language=\english
-%\input enhyphen.tex \relax
-%\input enhyphen.ex \relax
-%\endgroup
+\loadpatterns \zhCork 41 zh {Unaccented Pinyin Syllables \patt in Cork}
+ {\lccode`\'=`\' \input hyph-zh-latn-pinyin.ec }11 \corklangs \zhPatt
-% Czech hyphenation patterns and hyphenation exceptions in ISO-8859-2
+\loadpatterns \isCork 42 is {Icelandic \patt in Cork}
+ {\input conv-utf8-ec \input hyph-is }22 \corklangs \isPatt
-\chardef\iltwoczech=5
-\newcount\czech \czech=\iltwoczech
+\loadpatterns \hsbCork 43 hsb {EC Upper Sorbian \patt in Cork}
+ {\input conv-utf8-ec \input hyph-hsb }22 \corklangs \hsbPatt
-\begingroup \language=\czech
-\csaccents
-\message{Loading Czech patterns in ISO-8859-2 encoding,
- \string\language=\the\language.}
-\let\global=\relax
-\input czhyphen.tex \relax
-\input czhyphen.ex \relax
-\endgroup
+\loadpatterns \afCork 44 af {Afrikaans \patt in Cork}
+ {\lccode`\-=`\- \lccode`\'=`\'
+ \input conv-utf8-ec \input hyph-af }22 \corklangs \afPatt
-% Slovak hyphenation patterns and hyphenation exceptions in ISO-8859-2
+\loadpatterns \glCork 45 gl {Galician \patt in Cork}
+ {\input conv-utf8-ec \input hyph-gl }22 \corklangs \glPatt
-\chardef\iltwoslovak=6
-\newcount\slovak \slovak=\iltwoslovak
+\loadpatterns \kmrCork 46 kmr {Kurmanji \patt in Cork}
+ {\input conv-utf8-ec \input hyph-kmr }22 \corklangs \kmrPatt
-\begingroup \language=\slovak
-\csaccents
-\message{Loading Slovak patterns in ISO-8859-2 encoding,
- \string\language=\the\language.}
-\let\global=\relax
-\input skhyphen.tex \relax
-\input skhyphen.ex \relax
-\endgroup
+\loadpatterns \tkCork 47 tk {Turkmen \patt in Cork}
+ {\lccode`\-=`\- \input conv-utf8-ec \input hyph-tk }22 \corklangs \tkPatt
-\ifx\Cork\undefined % You can suppress the T1 encoded hyphen patterns by:
- % tex -ini \let\Cork=\relax \input csplain.ini
+\loadpatterns \laCork 48 la {Latin \patt in Cork}
+ {\lccode`\'=`\' \input conv-utf8-ec \input hyph-la }22 \corklangs \laPatt
-\chardef\toneczech=15
-\chardef\toneslovak=16
+\loadpatterns \czUnicode 115 cz {Czech \patt in Unicode}
+ {\input ucode \doaccents \input czhyphen.tex \input czhyphen.ex }23
+ \unicodelangs \czPatt
-% Czech hyphenation patterns and hyphenation exceptions in Cork
+\loadpatterns \skUnicode 116 sk {Slovak \patt in Unicode}
+ {\input ucode \doaccents \input skhyphen.tex \input skhyphen.ex }23
+ \unicodelangs \skPatt
-\begingroup
-\input t1code \language=\toneczech
-\csaccents
-\message{Loading Czech patterns in Cork encoding,
- \string\language=\the\language.}
-\let\global=\relax
-\input czhyphen.tex \relax
-\input czhyphen.ex \relax
-\endgroup
+\loadpatterns \deUnicode 121 de {German \patt in Unicode}
+ {\robustpatterns \input hyph-de-1996 }22 \unicodelangs \dePatt
-% Slovak hyphenation patterns and hyphenation exceptions in Cork
+\loadpatterns \frUnicode 122 fr {French \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \input hyph-fr }23 \unicodelangs \frPatt
-\begingroup
-\input t1code \language=\toneslovak
-\csaccents
-\message{Loading Slovak patterns in Cork encoding,
- \string\language=\the\language.}
-\let\global=\relax
-\input skhyphen.tex \relax
-\input skhyphen.ex \relax
-\endgroup
+\loadpatterns \plUnicode 123 pl {Polish \patt in Unicode}
+ {\robustpatterns \input hyph-pl }22 \unicodelangs \plPatt
-\fi %% of \ifx\Cork\undefined
+\loadpatterns \cyUnicode 124 cy {Welsh \patt in Unicode}
+ {\robustpatterns \input hyph-cy }23 \unicodelangs \cyPatt
-% ======= definitions for fast hyphenations =====
+\loadpatterns \daUnicode 125 da {Danish \patt in Unicode}
+ {\robustpatterns \input hyph-da }22 \unicodelangs \daPatt
-\def\ehyph{\language=\USenglish \lccode`\'=0 \nonfrenchspacing
- \lefthyphenmin=2 \righthyphenmin=3
- \message{English hyphenation used (\string\language=\the\language).
- \string\nonfrenchspacing\space is set on.}}
-%\def\ahyph{\language=\german \lccode`\'=`\' \frenchspacing
-% \lefthyphenmin=2 \righthyphenmin=2 }
-%\def\ghyph{\language=\german \lccode`\'=`\' \frenchspacing
-% \lefthyphenmin=2 \righthyphenmin=2 }
-%\def\fhyph{\language=\french \lccode`\'=`\' \frenchspacing
-% \lefthyphenmin=2 \righthyphenmin=2 }
-
-\def\chyph{\language=\czech \lccode`\'=`\' \frenchspacing
- \lefthyphenmin=2 \righthyphenmin=3
- \message{Czech hyphenation used (\string\language=\the\language).
- \string\frenchspacing\space is set on.}}
-\def\shyph{\language=\slovak \lccode`\'=`\' \frenchspacing
- \lefthyphenmin=2 \righthyphenmin=3
- \message{Slovakian hyphenation used (\string\language=\the\language).
- \string\frenchspacing\space is set on.}}
+\loadpatterns \esUnicode 126 es {Spanish \patt in Unicode}
+ {\robustpatterns \input hyph-es }22 \unicodelangs \esPatt
+
+\loadpatterns \slUnicode 128 sl {Slovenian \patt in Unicode}
+ {\robustpatterns \input hyph-sl }22 \unicodelangs \slPatt
+
+\loadpatterns \fiUnicode 129 fi {Finnish \patt in Unicode}
+ {\robustpatterns \input hyph-fi }22 \unicodelangs \fiPatt
+
+\loadpatterns \huUnicode 130 hu {Hungarian \patt in Unicode}
+ {\robustpatterns input hyph-hu }22 \unicodelangs \huPatt
+
+\loadpatterns \trUnicode 131 tr {Turkish \patt in Unicode}
+ {\robustpatterns \input hyph-tr }22 \unicodelangs \trPatt
+
+\loadpatterns \etUnicode 132 et {Estonian \patt in Unicode}
+ {\robustpatterns \input hyph-et }23 \unicodelangs \etPatt
+
+\loadpatterns \euUnicode 133 eu {Basque \patt in Unicode}
+ {\robustpatterns \input hyph-eu }22 \unicodelangs \euPatt
+
+\loadpatterns \gaUnicode 134 ga {Irish \patt in Unicode}
+ {\robustpatterns \input hyph-ga }23 \unicodelangs \gaPatt
+
+\loadpatterns \nbUnicode 135 nb {Norwegian Bokmal \patt in Unicode}
+ {\robustpatterns \input hyph-nb }22 \unicodelangs \nbPatt
+
+\loadpatterns \nnUnicode 136 nn {Norwegian Nynorsk \patt in Unicode}
+ {\robustpatterns \input hyph-nn }22 \unicodelangs \nnPatt
+
+\loadpatterns \nlUnicode 137 nl {Dutch \patt in Unicode}
+ {\robustpatterns \input hyph-nl }22 \unicodelangs \nlPatt
+
+\loadpatterns \ptUnicode 138 pt {Portugesse \patt in Unicode}
+ {\robustpatterns \lccode`\-=`\- \input hyph-pt }23 \unicodelangs \ptPatt
+
+\loadpatterns \roUnicode 139 ro {Romanian \patt in Unicode}
+ {\robustpatterns \input hyph-ro }22 \unicodelangs \roPatt
+
+\loadpatterns \hrUnicode 140 hr {Croatian \patt in Unicode}
+ {\robustpatterns \input hyph-hr }22 \unicodelangs \hrPatt
+
+\loadpatterns \zhUnicode 141 zh {Unaccented Pinyin Syllables \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \input hyph-zh-latn-pinyin }11 \unicodelangs \zhPatt
+
+\loadpatterns \isUnicode 142 is {Icelandic \patt in Unicode}
+ {\robustpatterns \input hyph-is }22 \unicodelangs \isPatt
+
+\loadpatterns \hsbUnicode 143 hsb {EC Upper Sorbian \patt in Unicode}
+ {\robustpatterns \input hyph-hsb }22 \unicodelangs \hsbPatt
+
+\loadpatterns \afUnicode 144 af {Afrikaans \patt in Unicode}
+ {\robustpatterns \lccode`\-=`\- \lccode`\'=`\'
+ \input hyph-af }22 \corklangs \afPatt
+
+\loadpatterns \glUnicode 145 gl {Galician \patt in Unicode}
+ {\robustpatterns \input hyph-gl }22 \corklangs \glPatt
+
+\loadpatterns \kmrUnicode 146 kmr {Kurmanji \patt in Unicode}
+ {\robustpatterns \input hyph-kmr }22 \corklangs \kmrPatt
+
+\loadpatterns \tkUnicode 147 tk {Turkmen \patt in Unicode}
+ {\robustpatterns \lccode`\-=`\- \input hyph-tk }22 \corklangs \tkPatt
+
+\loadpatterns \laUnicode 148 la {Latin \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \input hyph-la }22 \unicodelangs \laPatt
+
+\loadpatterns \elmUnicode 201 elm {Modern Monotonic Greek \patt in Unicode}
+ {\lccode`\'=`\' \lccode"2019="2019 \lccode"02BC="02BC \lccode"1FBF="1FBF
+ \robustpatterns \input hyph-el-monoton }11 \unicodelangs \elmPatt
+
+\loadpatterns \elpUnicode 202 elp {Modern Polytonic Greek \patt in Unicode}
+ {\lccode`\'=`\' \lccode"2019="2019 \lccode"02BC="02BC \lccode"1FBF="1FBF
+ \robustpatterns \input hyph-el-polyton }11 \unicodelangs \elpPatt
+
+\loadpatterns \grcUnicode 203 grc {Ancient Greek \patt in Unicode}
+ {\lccode`\'=`\' \lccode"2019="2019 \lccode"02BC="02BC \lccode"1FBF="1FBF
+ \robustpatterns \input hyph-grc }11 \unicodelangs \grcPatt
+
+\loadpatterns \caUnicode 204 ca {Catalan \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \input hyph-ca }22 \unicodelangs \caPatt
+
+\loadpatterns \copUnicode 205 cop {Coptic \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \input hyph-cop }11 \unicodelangs \copPatt
+
+\loadpatterns \mnUnicode 206 mn {Mongolian \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \input hyph-mn-cyrl }22 \unicodelangs \mnPatt
+
+\loadpatterns \saUnicode 207 sa {Sanskrit \patt in Unicode}
+ {\robustpatterns \lccode"200C="200C \lccode"200D="200D
+ \input hyph-sa }15 \unicodelangs \saPatt
+
+\loadpatterns \ruUnicode 208 ru {Russian \patt in Unicode}
+ {\robustpatterns \lccode`\-=`\- \input hyph-ru }22 \unicodelangs \ruPatt
+
+\loadpatterns \ukUnicode 209 uk {Ukrainian \patt in Unicode}
+ {\robustpatterns \lccode`\'=`\' \lccode`\-=`\-
+ \input hyph-uk }22 \unicodelangs \ukPatt
+\loadpatterns \hyUnicode 210 hy {Armenian \patt in Unicode}
+ {\robustpatterns \input hyph-hy }12 \unicodelangs \hyPatt
+
+\loadpatterns \asUnicode 211 as {Assamesse \patt in Unicode}
+ {\robustpatterns \input hyph-as }11 \unicodelangs \asPatt
+
+\loadpatterns \hiUnicode 212 hi {Hindi \patt in Unicode}
+ {\robustpatterns \input hyph-hi }11 \unicodelangs \hiPatt
+
+\loadpatterns \knUnicode 213 kn {Kannada \patt in Unicode}
+ {\robustpatterns \input hyph-kn }11 \unicodelangs \knPatt
+
+\loadpatterns \loUnicode 214 lo {Lao \patt in Unicode}
+ {\robustpatterns \input hyph-lo }11 \unicodelangs \loPatt
+
+\loadpatterns \lvUnicode 215 lv {Latvian \patt in Unicode}
+ {\robustpatterns \input hyph-lv }22 \unicodelangs \lvPatt
+
+\loadpatterns \ltUnicode 216 lt {Lithuanian \patt in Unicode}
+ {\robustpatterns \input hyph-lt }22 \unicodelangs \ltPatt
+
+\loadpatterns \mlUnicode 217 ml {Malayalam \patt in Unicode}
+ {\robustpatterns \input hyph-ml }11 \unicodelangs \mlPatt
+
+\loadpatterns \mrUnicode 218 mr {Marathi \patt in Unicode}
+ {\robustpatterns \input hyph-mr }11 \unicodelangs \mrPatt
+
+\loadpatterns \orUnicode 219 or {Oriya \patt in Unicode}
+ {\robustpatterns \input hyph-or }11 \unicodelangs \orPatt
+
+\loadpatterns \paUnicode 220 pa {Panjabi \patt in Unicode}
+ {\robustpatterns \input hyph-pa }11 \unicodelangs \paPatt
+
+\loadpatterns \taUnicode 221 ta {Tamil \patt in Unicode}
+ {\robustpatterns \input hyph-ta }11 \unicodelangs \taPatt
+
+\loadpatterns \teUnicode 222 te {Telgu \patt in Unicode}
+ {\robustpatterns \input hyph-te }11 \unicodelangs \tePatt
+
+
+\message{Patterns: \pattlist}
\message{Defaults: \string\language=\the\language,
\string\cmaccents, \string\nofrenchspacing,
ISO-8859-2 font encoding}
+% ========= for backward compatibility ========
+
+\newcount\czech \newcount\slovak
+
+\let\iltwoczech=\czILtwo \let\iltwoslovak=\skILtwo
+\let\toneczech=\czCork \let\toneslovak=\skCork
+
+\expandafter \def\expandafter\iltwolangs \expandafter {\iltwolangs
+ \czech\czILtwo \slovak\skILtwo}
+
+\ifx\czCork\undefined \else
+\expandafter \def\expandafter\corklangs \expandafter {\corklangs
+ \czech\czCork \slovak\skCork}
+\fi
+
+\ifx\czUnicode\undefined \else
+\expandafter \def\expandafter\unicodelangs \expandafter {\unicodelangs
+ \czech\czUnicode \slovak\skUnicode}
+\fi
+
+\def\uslang{\language=\USenglish \initlanguage{us}\nonfrenchspacing
+ \lefthyphenmin=2 \righthyphenmin=3
+ \message{English hyphenation used (\string\language=\the\language).
+ \string\nonfrenchspacing\space is set on.}}
+
+\let\ehyph=\uslang \let\chyph=\czlang \let\shyph=\sklang
+
+\iltwolangs % csplain default is ISO-8859-2 encoding
+
+\endinput
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+If \<lang>Code (for example \czUnicode, \deCork) is undefined, the patterns
+are not loaded. If user sets \<lang>Code=\patterns before this file is
+loaded, then the patterns are loaded.
+
+You can remove colons in this file at lines 48-160 or you can say, for
+example:
+
+ pdftex -ini "\let\plCork=\patterns \input csplain.ini"
+or
+ pdftex -ini "\let\allpatterns=y \input csplain.ini"
+
+in order to load the additional patterns.
+
+By default, only \USenglish=0 \czILtwo=5, \skILtwo=6, \czCork=15, \skCork=16
+are loaded in 8bit TeX. The additional \czUnicode=115, \skUnicode=116 are
+loaded in 16bit TeX.
+
+The macro \loadpatterns \langCode <num> <lang> {note}
+ {action}<lhm><rhm> \codelist \switch
+does following:
+- If \langCode is undefined, does nothing.
+- Declares \chadref\langCode=<num>.
+- Loads new pattern with the number <num> by {action} in the group,
+- Defines \"<lang>lang" macro (for example \czlang), which sets
+ \language=\switch \lefthyphenmin=<lhm> \righthypgenmin=<rhm>
+ and runs \initlanguage{<lang>}. The \initlanguage is dumy by default
+ but macro programmer can define it.
+- Adds \let\switch=\langCode" to \codelist. The codelist includes
+ such commands dependent on the encoding. If user switches to
+ another encoding, the \codelist have to be run and then
+ the command \language=\switch works properly.
+- Defines \csname lan:<num>\endcsname as <lang>. This may be usable
+ for macro programes.
+- Adds info \langCode=<num> to \pattlist. User can expand this
+ macro in order to see which languages are preloaded.
+
+The \robustpatterns macro performs two steps of \patterns reading:
+Fisrt step: \lccodes of all characters in the patterns are set to code.
+Second step: the \patterns are read.
+
+
+% ======= end of hyphen.lan
+
+
diff --git a/Master/texmf-dist/tex/csplain/base/il2code.tex b/Master/texmf-dist/tex/csplain/base/il2code.tex
index e2df224e440..9a655d1d6ee 100644
--- a/Master/texmf-dist/tex/csplain/base/il2code.tex
+++ b/Master/texmf-dist/tex/csplain/base/il2code.tex
@@ -11,9 +11,7 @@
\message{Font encoding set to ISO-8859-2.}
%% (0) \czech, \slovak. You can use \chyph, \shyph after this file is loaded.
-\ifx\iltwoczech\undefined \else
- \czech=\iltwoczech \slovak=\iltwoslovak
-\fi
+\csname iltwolangs\endcsname
%% (1) \catcode, \lccode, \uccode.
\catcode225=11 \lccode225=225 \uccode225=193 % a-acute
diff --git a/Master/texmf-dist/tex/csplain/base/plaina4.tex b/Master/texmf-dist/tex/csplain/base/plaina4.tex
index 39262806975..de7966476da 100644
--- a/Master/texmf-dist/tex/csplain/base/plaina4.tex
+++ b/Master/texmf-dist/tex/csplain/base/plaina4.tex
@@ -12,6 +12,13 @@
{\catcode64=11 % \catcode`\@=11
\gdef\m@g{\mag\count@
- \hsize=159.2truemm \vsize=239.2truemm \dimen\footins8truein}
+ \hsize=159.2truemm \vsize=239.2truemm \dimen\footins8truein
+ \ifx\pdfpagewidth\undefined\else % added by P. O. Nov 2012
+ \pdfpagewidth=210truemm
+ \pdfpageheight=297truemm
+ \pdfhorigin=1truein
+ \pdfvorigin=1truein
+ \fi
+}
}
diff --git a/Master/texmf-dist/tex/csplain/base/slovak.sty b/Master/texmf-dist/tex/csplain/base/slovak.sty
deleted file mode 100644
index a8fc6db3d40..00000000000
--- a/Master/texmf-dist/tex/csplain/base/slovak.sty
+++ /dev/null
@@ -1,258 +0,0 @@
-%%
-%% This is file `slovak.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% cslatex.dtx (with options: `slovak')
-%%
-%% Tento soubor je soucasti baliku CsLaTeX a je vygenerovan z
-%% distribucniho souboru cslatex.dtx.
-%%
-%% Copyright (c) 1994--98, 2002
-%% Jaroslav Snajdr, Zdenek Wagner, Jiri Zlatuska a The LaTeX3 Project
-%%
-%% Tento soubor NENI soucasti systemu LaTeX2e
-%% ------------------------------------------
-%%
-%% Dalsi informace naleznete na www.cstug.cz/cslatex.
-%%
-\ifx\dateslovak\undefined\else\endinput\fi
-\ifx\addlanguage\undefined\else
- \ifx\LdfInit\@undefined
- \def\LdfInit{%
- \chardef\atcatcode=\catcode`\@
- \catcode`\@=11\relax
- \input babel.def\relax
- \catcode`\@=\atcatcode \let\atcatcode\relax
- \LdfInit}
- \fi
-\input slovak.ldf
-\endinput\fi
-\newif\iflte
-\ifx\documentclass\undefined\else\ltetrue\fi
-\iflte
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{slovak}[2002/07/19 v2.4 CSTeX slovak style]
-\else
- \message{Document Style Option `slovak' ver. 2.4 <July 2002>.}
- \edef\origcatcodeat{\the\catcode`\@}\catcode`\@=11
- \let\providecommand=\def
- \let\protect=\relax
-\fi
-\iflte
- \def\defaultcsoption{IL2}
- \DeclareOption{IL2}{\def\encodingdefault{IL2}}
- \DeclareOption {T1}{\def\encodingdefault {T1}}
- \DeclareOption{OT1}{\def\encodingdefault{OT1}}
- \DeclareOption{nosplit}{\standardhyphens}
- \DeclareOption{split}{\splithyphens}
- \DeclareOption{nocaptions}{\let\cap@unchgd=\relax}
- \DeclareOption{olduv}{\let\cs@olduv=\relax}
- \DeclareOption{cstex}{\relax} % Removed, lasts for compatibility
- \ExecuteOptions{IL2}
- \ProcessOptions
- \def\dms#1#2{\DeclareMathSymbol{#1}{\mathalpha}{letters}{#2}}
- \ifx\encodingdefault\defaultcsoption
- \let\cs@warn=\@font@warning \let\@font@warning=\@gobble
- \let\cs@info=\@font@info \let\@font@info=\@gobble
- \SetSymbolFont{operators}{normal}{IL2}{cmr}{m}{n}
- \SetSymbolFont{operators}{bold}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathbf{normal}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathit{normal}{IL2}{cmr}{m}{it}
- \SetMathAlphabet\mathrm{normal}{IL2}{cmr}{m}{n}
- \SetMathAlphabet\mathsf{normal}{IL2}{cmss}{m}{n}
- \SetMathAlphabet\mathtt{normal}{IL2}{cmtt}{m}{n}
- \SetMathAlphabet\mathbf{bold}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathit{bold}{IL2}{cmr}{bx}{it}
- \SetMathAlphabet\mathrm{bold}{IL2}{cmr}{bx}{n}
- \SetMathAlphabet\mathsf{bold}{IL2}{cmss}{bx}{n}
- \SetMathAlphabet\mathtt{bold}{IL2}{cmtt}{m}{n}
- \let\@font@warning=\cs@warn \let\cs@warn=\undefined
- \let\@font@info=\cs@info \let\cs@info=\undefined
- \dms{^^e1}{"E1}\dms{^^c1}{"C1}\dms{^^e8}{"E8}\dms{^^c8}{"C8}
- \dms{^^ef}{"EF}\dms{^^cf}{"CF}\dms{^^e9}{"E9}\dms{^^c9}{"C9}
- \dms{^^ec}{"EC}\dms{^^cc}{"CC}\dms{^^ed}{"ED}\dms{^^cd}{"CD}
- \dms{^^b5}{"B5}\dms{^^a5}{"A5}\dms{^^f2}{"F2}\dms{^^d2}{"D2}
- \dms{^^f3}{"F3}\dms{^^d3}{"D3}\dms{^^f8}{"F8}\dms{^^d8}{"D8}
- \dms{^^b9}{"B9}\dms{^^a9}{"A9}\dms{^^bb}{"BB}\dms{^^ab}{"AB}
- \dms{^^fa}{"FA}\dms{^^da}{"DA}\dms{^^f9}{"F9}\dms{^^d9}{"D9}
- \dms{^^fd}{"FD}\dms{^^dd}{"DD}\dms{^^be}{"BE}\dms{^^ae}{"AE}
- \fi
-\else
- \def\gobble#1{}
- \def\DeclareRobustCommand#1#2{\expandafter\def
- \csname @\expandafter\gobble\string#1\endcsname{#2}
- \edef#1{\noexpand\protect\expandafter\noexpand
- \csname @\expandafter\gobble\string#1\endcsname}}
- \ifx\ou\undefined \def\ou{\accent23u} \fi
- \def\temp#1#2#3:{#1#2}
- \edef\tempa{\string c\string s}
- \edef\tempb{\expandafter\temp\fontname\tenrm:}
- \ifx\tempa\tempb
- \chardef\clqq=254 \sfcode254=0 \lccode254=0
- \chardef\crqq=255 \sfcode255=0 \lccode255=0
- \chardef\flqq=158 \sfcode158=0 \lccode158=0
- \chardef\frqq=159 \sfcode159=0 \lccode159=0
- \def\ogonek #1{\setbox0\hbox{#1}\ifdim\ht0=1ex\accent157 #1%
- \else{\ooalign{\unhbox0\crcr\hss\char157}}\fi}
- \chardef\promile=141
- \def\DeclareTextCommandDefault#1#2{}
- \else
- \let\DeclareTextCommandDefault=\DeclareRobustCommand
- \fi
-\fi
-\def\captionsslovak{%
-\def\prefacename{Predhovor}%
-\def\refname{Literat\'ura}%
-\def\appendixname{Dodatok}%
-\def\listfigurename{Zoznam obr\'azkov}%
-\def\listtablename {Zoznam tabuliek}%
-\def\indexname{Register}%
-\def\tablename{Tabu\v{l}ka}%
-\def\partname{\v{C}as\v{t}}%
-\def\enclname{Pr\'{\i}loha}%
-\def\headtoname{Pre}%
-\def\alsoname{vi\v{d} tie\v{z}}%
-\def\abstractname{Abstrakt}%
-\let\bibname\refname
-\def\chaptername{Kapitola}%
-\def\contentsname{Obsah}%
-\def\figurename{Obr.}%
-\def\ccname{cc.}%
-\def\pagename{Str.}%
-\def\seename{vi\v{d}}}
-\providecommand\captionsenglish{%
- \def\prefacename{Preface}%
- \def\refname{References}%
- \def\abstractname{Abstract}%
- \def\bibname{Bibliography}%
- \def\chaptername{Chapter}%
- \def\appendixname{Appendix}%
- \def\contentsname{Contents}%
- \def\listfigurename{List of Figures}%
- \def\listtablename{List of Tables}%
- \def\indexname{Index}%
- \def\figurename{Figure}%
- \def\tablename{Table}%
- \def\partname{Part}%
- \def\enclname{encl}%
- \def\ccname{cc}%
- \def\headtoname{To}%
- \def\pagename{Page}%
- \def\headpagename{Page}%
- \def\prefacename{Preface}%
- \def\seename{see}%
- \def\alsoname{see also}}
-\def\dateslovak{\def\today{\number\day.~\ifcase\month\or
- janu\'ara\or febru\'ara\or marca\or apr\'{\i}la\or m\'aja\or j\'una\or
- j\'ula\or augusta\or septembra\or okt\'obra\or
- novembra\or decembra\fi
- \space\number\year}}
-\iflte\ifx\cap@unchgd\undefined\captionsslovak\dateslovak\fi\fi
-\providecommand\dateUSenglish{\def\today{\ifcase\month\or
- January\or February\or March\or April\or May\or June\or July\or
- August\or September\or October\or November\or December\fi
- \space\number\day, \number\year}}
-\providecommand\dateenglish{\def\today{\ifcase\day\or 1st\or 2nd\or
- 3rd\or 4th\or 5th\or 6th\or 7th\or 8th\or 9th\or 10th\or 11th\or
- 12th\or 13th\or 14th\or 15th\or 16th\or 17th\or 18th\or 19th\or
- 20th\or 21st\or 22nd\or 23rd\or 24th\or 25th\or 26th\or 27th\or
- 28th\or 29th\or 30th\or 31st\fi ~\ifcase\month\or January\or
- February\or March\or April\or May\or June\or July\or August\or
- September\or October\or November\or December\fi \space
- \number\year}}
-\DeclareTextCommandDefault\clqq{\leavevmode
- \set@low@box{''}%
- \setbox1=\hbox{l\/}\dimen1=\wd1
- \setbox1=\hbox{l}\advance\dimen1 by -\wd1
- \ifdim\dimen1>0pt\kern-.1em\box0\kern.1em
- \else\kern.1em\box0\kern-.1em\fi\nobreak\hskip0pt}
-\DeclareTextCommandDefault\crqq{\edef\@SF{\spacefactor\the\spacefactor}%
- \nobreak\kern-.07em\hbox{``}\kern.07em\@SF\relax}
-\def\set@low@box#1{\setbox2=\hbox{,}\setbox0=\hbox{#1}%
- \dimen0=\ht0 \advance\dimen0 by -\ht2
- \setbox0=\hbox{\lower\dimen0 \box0}\ht0=\ht2\dp0=\dp2}
-\DeclareRobustCommand\clq{\leavevmode\set@low@box{\char'047 }%
- \box0 \kern.04em\nobreak\hskip0pt\relax}
-\DeclareRobustCommand\crq{{\edef\@SF{\spacefactor\the\spacefactor}%
- \nobreak\char'140 \kern.17em\@SF\relax}}
-\iflte
- \DeclareTextCommand{\clqq}{T1}{\leavevmode\kern.1em
- \char18 \kern-.0158em\nobreak\hskip0pt}
- \DeclareTextCommand{\crqq}{T1}
- {{\edef\@SF{\spacefactor\the\spacefactor}%
- \nobreak\kern.06em \char16 \kern.024em \@SF\relax}}
-\fi
-\iflte\else\let\if@compatibility=\iffalse{\let\fi=\fi}\fi
-\ifx\cs@olduv\undefined
- \iflte
- \if@compatibility
- \DeclareRobustCommand\uv{\bgroup\aftergroup\closequotes
- \leavevmode\clqq\let\next=}
- \else
- \DeclareRobustCommand\uv[1]{{\leavevmode\clqq#1\crqq}}
- \fi
- \else
- \ifx\uv\undefined
- \def\uv{\bgroup\aftergroup\closequotes
- \leavevmode\clqq\let\next=}
- \fi
- \fi
-\else
- \DeclareRobustCommand\uv{\bgroup\aftergroup\closequotes
- \leavevmode\clqq\let\next=}
-\fi
-\def\closequotes{\unskip\crqq\relax}
-\def\prim@s{\prime\futurelet\next\pr@m@s}
-{\catcode`\'=\active
-\gdef\csprimeson{\catcode96=\active \catcode39=\active
- \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\ifx^\next\let\nxt\pr@@@t
- \else\let\nxt\egroup\fi\fi \nxt}}}
-\def\csprimesoff{\catcode96=12 \catcode39=12
- \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\ifx^\next\let\nxt\pr@@@t
- \else\let\nxt\egroup\fi\fi \nxt}}
-{\csprimeson
- \gdef'{\ifmmode\let\n@xt=\mathprim@\else\let\n@xt=\textprim@\fi\n@xt}%
- \gdef\mathprim@{^\bgroup\prim@s}%
- \gdef\textprim@{\futurelet\nxt\rightprim@}%
- \gdef\rightprim@{\ifx'\nxt\let\next=\douvr@
- \else\let\next\crq\fi\next}%
- \gdef`{\futurelet\nxt\leftprim@}%
- \gdef\leftprim@{\ifx`\nxt\let\next=\douvl@
- \else\let\next=\clq\fi\next}}
-\def\douvr@{\crqq\let\next= }%
-\def\douvl@{\clqq\let\next= }%
-\csprimesoff
-\def\cstieon{\def~{\ifmmode\else\penalty\@M\ \fi}}
-\def\cstieoff{\def~{\penalty\@M \ }}
-\iflte
-\AtBeginDocument{\slovak}
- \frenchspacing
-\else
- \def\setthisl@nguage#1#2#3#4{%
- \ifx#2\undefined \immediate\write\sixt@@n
- {Warning: I do not speak #1, (the style is not inputted)}
- \else
- \ifx#4\undefined \immediate\write\sixt@@n
- {Warning: I do not speak #1,
- (the hyphenation patterns are not included)}
- \else#2#3#4\fi\fi}
-\def\selectlanguage#1{\language #1\relax
- \ifcase #1\relax \dateUSenglish\captionsenglish\ehyph\or
- \setthisl@nguage{german} \dategerman \captionsgerman \ghyph\or
- \setthisl@nguage{austrian}\dateaustrian \captionsgerman \ahyph\or
- \setthisl@nguage{french} \datefrench \captionsfrench \fhyph\or
- \setthisl@nguage{english} \dateenglish \captionsenglish\ehyph\or
- \setthisl@nguage{czech} \dateczech \captionsczech \chyph\or
- \setthisl@nguage{slovak} \dateslovak \captionsslovak \shyph\fi}
-\def\originalTeX{\selectlanguage{\USenglish}
- \csname cmaccents\endcsname}
-\def\czechTeX{\selectlanguage{\czech}\csname csaccents\endcsname}
-\def\slovakTeX{\selectlanguage{\slovak}\csname csaccents\endcsname}
-\catcode`\@=\origcatcodeat
-\slovakTeX
-\fi
-\endinput
-%%
-%% End of file `slovak.sty'.
diff --git a/Master/texmf-dist/tex/csplain/base/t1code.tex b/Master/texmf-dist/tex/csplain/base/t1code.tex
index eb3d02ecb04..896c5a4d8fc 100644
--- a/Master/texmf-dist/tex/csplain/base/t1code.tex
+++ b/Master/texmf-dist/tex/csplain/base/t1code.tex
@@ -3,15 +3,20 @@
% (1) sets \catcode, \l/uccode for characters (code by Cork),
% (2) defines \csaccents for new behavior of \v, \', etc (code by Cork),
% (3) defines some \sequences for special cs-fonts characters.
+% (4) redefines character-like macros from plainTeX as \chardef
+% (5) if encTeX with \mubytein>0 is activated reads t1enc-u.tex file
%
% Created by Petr Olsak <olsak@math.feld.cvut.cz>, February 2000
% Inspired by Jan Kasprzak
% February 2005: bug in \uccodes removed, thanks to Marek Pomp
+% October 2012: new \lc/\uccode declaration, new parts (4) (5)
\message{Font encoding set to Cork.}
+\let\corkencoded\font % macros can do \ifx\font\corkencoded ...\else...\fi
+
%% (0) \czech, \slovak. You can use \chyph, \shyph after this file is loaded.
-\ifx\toneczech\undefined
+\ifx\czCork\undefined
{\newlinechar=`^^J
\errhelp={The hyphen patterns are not loaded in Cork encoding in csplain.^^J
Hyphen patterns are supported only in ISO-8859-2.^^J
@@ -23,69 +28,105 @@
{The Cork encoding is not supported in this format} % Press h for more help.
}
\else
- \czech=\toneczech \slovak=\toneslovak
+ \csname corklangs\endcsname
\fi
-%% (1) \catcode, \lccode, \uccode.
-\catcode225=11 \lccode225=225 \uccode225=193 % a-acute
-\catcode193=11 \lccode193=225 \uccode193=193 % A-acute
-\catcode228=11 \lccode228=228 \uccode228=196 % a-diaeresis
-\catcode196=11 \lccode196=228 \uccode196=196 % A-diaeresis
-\catcode163=11 \lccode163=163 \uccode163=131 % c-caron
-\catcode131=11 \lccode131=163 \uccode131=131 % C-caron
-\catcode164=11 \lccode164=164 \uccode164=132 % d-caron
-\catcode132=11 \lccode132=164 \uccode132=132 % D-caron
-\catcode233=11 \lccode233=233 \uccode233=201 % e-acute
-\catcode201=11 \lccode201=233 \uccode201=201 % E-acute
-\catcode165=11 \lccode165=165 \uccode165=133 % e-caron
-\catcode133=11 \lccode133=165 \uccode133=133 % E-caron
-\catcode237=11 \lccode237=237 \uccode237=205 % i-acute
-\catcode205=11 \lccode205=237 \uccode205=205 % I-acute
-\catcode168=11 \lccode168=168 \uccode168=136 % l-acute
-\catcode136=11 \lccode136=168 \uccode136=136 % L-acute
-\catcode169=11 \lccode169=169 \uccode169=137 % l-caron
-\catcode137=11 \lccode137=169 \uccode137=137 % L-caron
-\catcode172=11 \lccode172=172 \uccode172=140 % n-caron
-\catcode140=11 \lccode140=172 \uccode140=140 % N-caron
-\catcode243=11 \lccode243=243 \uccode243=211 % o-acute
-\catcode211=11 \lccode211=243 \uccode211=211 % O-acute
-\catcode244=11 \lccode244=244 \uccode244=212 % o-circumflex
-\catcode212=11 \lccode212=244 \uccode212=212 % O-circumflex
-\catcode246=11 \lccode246=246 \uccode246=214 % o-diaeresis
-\catcode214=11 \lccode214=246 \uccode214=214 % O-diaeresis
-\catcode175=11 \lccode175=175 \uccode175=143 % r-acute
-\catcode143=11 \lccode143=175 \uccode143=143 % R-acute
-\catcode176=11 \lccode176=176 \uccode176=144 % r-caron
-\catcode144=11 \lccode144=176 \uccode144=144 % R-caron
-\catcode178=11 \lccode178=178 \uccode178=146 % s-caron
-\catcode146=11 \lccode146=178 \uccode146=146 % S-caron
-\catcode180=11 \lccode180=180 \uccode180=148 % t-caron
-\catcode148=11 \lccode148=180 \uccode148=148 % T-caron
-\catcode250=11 \lccode250=250 \uccode250=218 % u-acute
-\catcode218=11 \lccode218=250 \uccode218=218 % U-acute
-\catcode183=11 \lccode183=183 \uccode183=151 % u-ring
-\catcode151=11 \lccode151=183 \uccode151=151 % U-ring
-\catcode252=11 \lccode252=252 \uccode252=220 % u-diaeresis
-\catcode220=11 \lccode220=252 \uccode220=220 % U-diaeresis
-\catcode253=11 \lccode253=253 \uccode253=221 % y-acute
-\catcode221=11 \lccode221=253 \uccode221=221 % Y-acute
-\catcode186=11 \lccode186=186 \uccode186=154 % z-caron
-\catcode154=11 \lccode154=186 \uccode154=154 % Z-caron
-
+%% (1a) \catcodes:
+\catcode225=11 % a-acute
+\catcode193=11 % A-acute
+\catcode228=11 % a-diaeresis
+\catcode196=11 % A-diaeresis
+\catcode163=11 % c-caron
+\catcode131=11 % C-caron
+\catcode164=11 % d-caron
+\catcode132=11 % D-caron
+\catcode233=11 % e-acute
+\catcode201=11 % E-acute
+\catcode165=11 % e-caron
+\catcode133=11 % E-caron
+\catcode237=11 % i-acute
+\catcode205=11 % I-acute
+\catcode168=11 % l-acute
+\catcode136=11 % L-acute
+\catcode169=11 % l-caron
+\catcode137=11 % L-caron
+\catcode172=11 % n-caron
+\catcode140=11 % N-caron
+\catcode243=11 % o-acute
+\catcode211=11 % O-acute
+\catcode244=11 % o-circumflex
+\catcode212=11 % O-circumflex
+\catcode246=11 % o-diaeresis
+\catcode214=11 % O-diaeresis
+\catcode175=11 % r-acute
+\catcode143=11 % R-acute
+\catcode176=11 % r-caron
+\catcode144=11 % R-caron
+\catcode178=11 % s-caron
+\catcode146=11 % S-caron
+\catcode180=11 % t-caron
+\catcode148=11 % T-caron
+\catcode250=11 % u-acute
+\catcode218=11 % U-acute
+\catcode183=11 % u-ring
+\catcode151=11 % U-ring
+\catcode252=11 % u-diaeresis
+\catcode220=11 % U-diaeresis
+\catcode253=11 % y-acute
+\catcode221=11 % Y-acute
+\catcode186=11 % z-caron
+\catcode154=11 % Z-caron
+
+%% (1b) \lccodes, \uccodes:
+\def\tmp #1 {\loop
+ \lccode\count100=\count200 \uccode\count100=\count100
+ \lccode\count200=\count200 \uccode\count200=\count100
+ \ifnum\count100<#1 \advance\count100 by1 \advance\count200 by1
+ \repeat}
+\count100=128 \count200=160 \tmp 156
+\count100=192 \count200=224 \tmp 223
+\lccode 157=105 \uccode 157=157 % dotted I
+\lccode 25=25 \uccode 25=73 % dotless i
+\lccode 26=26 \uccode 26=74 % dotless j
+\lccode 158=158 \uccode 158=158
+\lccode 159=159 \uccode 159=159
+\lccode 189=189 \uccode 189=189
+\lccode 190=190 \uccode 189=190
+\lccode 191=191 \uccode 189=191
+
%% (2) \csaccents, \cmaccents
-\def\accentscommands{\string\^, \string\`, \string\', \string\v,
- \string\" and \string\r}
+\def\accentscommands{\string\^,\string\`,\string\',\string\v,\string\",%
+ \string\r,\string\c,\string\~,\string\H,\string\u,%
+ \string\. and \string\k}
\def\csaccentsmessage{%
- \message{The \accentscommands\space expands to characters by Cork.}}
-\def\cmaccentsmessage{%
- \message{The \accentscommands\space have original plainTeX meaning.}}
+ \message{The \accentscommands\space expands to characters by Cork.}}
+\ifx\cmaccentsmessage\undefined
+ \def\cmaccentsmessage{%
+ \message{The \accentscommands\space are defined similar as plainTeX.}}
+\fi
\def\csaccents{\csaccentsmessage
\def\^##1{\ifx o##1^^f4\else
\ifx O##1^^d4\else
- {\accent94 ##1}\fi\fi}\let\^^D=\^%
- \def\`##1{\ifx a##1^^b8\else
- \ifx A##1^^98\else
- {\accent18 ##1}\fi\fi}%
+ \ifx a##1^^e2\else
+ \ifx A##1^^c2\else
+ \ifx e##1^^ea\else
+ \ifx E##1^^ca\else
+ \ifx i##1^^ee\else
+ \ifx I##1^^ce\else
+ \ifx u##1^^fb\else
+ \ifx U##1^^db\else
+ {\accent94 ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}\let\^^D=\^%
+ \def\`##1{\ifx a##1^^e0\else
+ \ifx A##1^^c0\else
+ \ifx e##1^^e8\else
+ \ifx E##1^^c8\else
+ \ifx i##1^^ec\else
+ \ifx I##1^^cc\else
+ \ifx o##1^^f2\else
+ \ifx O##1^^d2\else
+ \ifx u##1^^f9\else
+ \ifx U##1^^d9\else
+ {\accent18 ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\def\'##1{\ifx a##1^^e1\else
\ifx e##1^^e9\else
\ifx\i##1^^ed\else
@@ -103,8 +144,17 @@
\ifx Y##1^^dd\else
\ifx R##1^^8f\else
\ifx L##1^^88\else
- {\accent19 ##1}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+ \ifx C##1^^82\else
+ \ifx N##1^^8b\else
+ \ifx S##1^^91\else
+ \ifx Z##1^^99\else
+ \ifx c##1^^a2\else
+ \ifx n##1^^ab\else
+ \ifx s##1^^b1\else
+ \ifx z##1^^b9\else
+ {\accent19 ##1}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\def\v##1{\ifx e##1^^a5\else
\ifx s##1^^b2\else
\ifx c##1^^a3\else
@@ -124,17 +174,62 @@
\ifx L##1^^89\else
\ifx N##1^^8c\else
{\accent20 ##1}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}\let\^^_=\v%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi}\let\^^_=\v%
\def\"##1{\ifx a##1^^e4\else
\ifx o##1^^f6\else
\ifx u##1^^fc\else
\ifx A##1^^c4\else
\ifx O##1^^d6\else
\ifx U##1^^dc\else
- {\accent"7F ##1}\fi\fi\fi\fi\fi\fi}%
+ \ifx Y##1^^98\else
+ \ifx E##1^^cb\else
+ \ifx I##1^^cf\else
+ \ifx y##1^^b8\else
+ \ifx e##1^^eb\else
+ \ifx i##1^^ef\else
+ {\accent"7F ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\def\r##1{\ifx u##1^^b7\else
\ifx U##1^^97\else
- {\accent23 ##1}\fi\fi}%
+ \ifx A##1^^c5\else
+ \ifx a##1^^e5\else
+ {\accent23 ##1}\fi\fi\fi\fi}%
+ \def\c##1{\ifx C##1^^c7\else
+ \ifx c##1^^e7\else
+ \ifx S##1^^93\else
+ \ifx s##1^^b3\else
+ \ifx T##1^^95\else
+ \ifx t##1^^b5\else
+ {\char11 ##1}\fi\fi\fi\fi\fi\fi}%
+ \def\~##1{\ifx A##1^^c3\else
+ \ifx N##1^^d1\else
+ \ifx O##1^^d5\else
+ \ifx a##1^^e3\else
+ \ifx n##1^^f1\else
+ \ifx o##1^^f5\else
+ {\accent3 ##1}\fi\fi\fi\fi\fi\fi}%
+ \def\H##1{\ifx O##1^^8e\else
+ \ifx U##1^^96\else
+ \ifx o##1^^ae\else
+ \ifx u##1^^b6\else
+ {\accent5 ##1}\fi\fi\fi\fi}%
+ \def\u##1{\ifx A##1^^80\else
+ \ifx G##1^^87\else
+ \ifx a##1^^a0\else
+ \ifx g##1^^a7\else
+ {\accent8 ##1}\fi\fi\fi\fi}%
+ \def\=##1{\ifx d##1^^9e\else
+ {\accent9 ##1}\fi}%
+ \def\.##1{\ifx i##1^^69\else
+ \ifx z##1^^bb\else
+ \ifx I##1^^9d\else
+ \ifx Z##1^^9b\else
+ {\accent10 ##1}\fi\fi\fi\fi}%
+ \def\k##1{\ifx A##1^^81\else
+ \ifx E##1^^86\else
+ \ifx a##1^^a1\else
+ \ifx e##1^^a6\else
+ {\char12 ##1}\fi\fi\fi\fi}%
%% for backward compatibility:
\def\softd{\v{d}}\def\softt{\v{t}}\def\ou{\r{u}}%
\def\softl{\v{l}}\def\softL{\v{L}}}
@@ -146,13 +241,15 @@
\def\"##1{{\accent"7F ##1}}%
\let\r=\undefined\def\ou{{\accent6u}}}
+\ifx\r\undefined \else \csaccents \fi %% re-set \csaccents
+
%% (3) special \sequences for T1 encoded fonts.
%% Czech left a right double qoutes
\chardef\clqq=18 \sfcode18=0
\chardef\crqq=16 \sfcode16=0
%% French double quotes
-\chardef\flqq=14 \sfcode14=0
-\chardef\frqq=13 \sfcode13=0
+\chardef\flqq=19 \sfcode19=0
+\chardef\frqq=20 \sfcode20=0
%% Other characters
\def\ogonek #1{\setbox0\hbox{#1}\ifdim\ht0=1ex\accent12 #1%
\else{\ooalign{\unhbox0\crcr\hss\char12}}\fi}
@@ -165,7 +262,48 @@
\afterassignment\clqq\let\next=}
\def\closequotes{\unskip\crqq\relax}
-\chardef\i=25
+%% (4) re-definition character-like macros from plainTeX:
+
+\chardef \S 159
+\chardef \P 182
+\chardef \ss 255
+\chardef \L 138
+\chardef \l 170
+\chardef \ae 230
+\chardef \oe 247
+\chardef \o 248
+\chardef \AE 198
+\chardef \OE 215
+\chardef \O 216
+\chardef \i 25
+\chardef \j 26
+\chardef \aa 229
+\chardef \AA 197
+
+% new characters in T1 encoding:
+
+\chardef \Eth 208
+\chardef \NG 141
+\chardef \Thorn 222
+\chardef \eth 240
+\chardef \ng 173
+\chardef \thorn 254
+\chardef \flq 14
+\chardef \frq 15
+\chardef \clq 13
+\chardef \crq 60
+\chardef \elqq 16
+\chardef \erqq 17
+\chardef \sterling 191
+\let\pound=\sterling
+
+%% (5) reading UTF-8 input encoding from t1enc-u.tex file
+
+\ifx\mubytein\undefined \expandafter \endinput \fi
+\ifnum\mubytein=0 \expandafter \endinput \fi
+
+\input t1enc-u
+
\endinput
diff --git a/Master/texmf-dist/tex/csplain/base/t1enc-u.tex b/Master/texmf-dist/tex/csplain/base/t1enc-u.tex
new file mode 100644
index 00000000000..a827ab3b83f
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/base/t1enc-u.tex
@@ -0,0 +1,130 @@
+%%% The re-encoding table for Czech/Slovak alphabet using encTeX,
+%%% v.Sep.2005 (C) Petr Ol\v s\'ak
+%%% input: UTF8, internal TeX: T1Encoding
+%%% Oct.2012 added plainTeX csnames mapping and \setucode definition.
+
+% This is very simple setting of Czech and Slovak alphabet only.
+% User can reset this value and add his own declaration.
+% For more information see cstexman.pdf.
+
+\ifx\mubyte\undefined
+ \errhelp={You has specified \let\enc=u but this works only with encTeX
+ extension of TeX binary. See ftp://math.feld.cvut.cz/pub/olsak/enctex.}
+ \errmessage{The encTeX Feb2003 or later is not detected -- re-encoding is impossible}
+ \endinput \fi
+
+%% TeX input
+\mubyte ^^c1 ^^c3^^81\endmubyte % \'A
+\mubyte ^^e1 ^^c3^^a1\endmubyte % \'a
+\mubyte ^^c9 ^^c3^^89\endmubyte % \'E
+\mubyte ^^e9 ^^c3^^a9\endmubyte % \'e
+\mubyte ^^cd ^^c3^^8d\endmubyte % \'I
+\mubyte ^^ed ^^c3^^ad\endmubyte % \'i
+\mubyte ^^d3 ^^c3^^93\endmubyte % \'O
+\mubyte ^^f3 ^^c3^^b3\endmubyte % \'o
+\mubyte ^^da ^^c3^^9a\endmubyte % \'U
+\mubyte ^^fa ^^c3^^ba\endmubyte % \'u
+\mubyte ^^dd ^^c3^^9d\endmubyte % \'Y
+\mubyte ^^fd ^^c3^^bd\endmubyte % \'y
+\mubyte ^^d4 ^^c3^^94\endmubyte % \^O
+\mubyte ^^f4 ^^c3^^b4\endmubyte % \^o
+\mubyte ^^c4 ^^c3^^84\endmubyte % \"A
+\mubyte ^^e4 ^^c3^^a4\endmubyte % \"a
+\mubyte ^^d6 ^^c3^^96\endmubyte % \"O
+\mubyte ^^f6 ^^c3^^b6\endmubyte % \"o
+\mubyte ^^dc ^^c3^^9c\endmubyte % \"U
+\mubyte ^^fc ^^c3^^bc\endmubyte % \"u
+\mubyte ^^83 ^^c4^^8c\endmubyte % \v C
+\mubyte ^^a3 ^^c4^^8d\endmubyte % \v c
+\mubyte ^^84 ^^c4^^8e\endmubyte % \v D
+\mubyte ^^a4 ^^c4^^8f\endmubyte % \v d
+\mubyte ^^85 ^^c4^^9a\endmubyte % \v E
+\mubyte ^^a5 ^^c4^^9b\endmubyte % \v e
+\mubyte ^^88 ^^c4^^b9\endmubyte % \' L
+\mubyte ^^a8 ^^c4^^ba\endmubyte % \' l
+\mubyte ^^89 ^^c4^^bd\endmubyte % \v L
+\mubyte ^^a9 ^^c4^^be\endmubyte % \v l
+\mubyte ^^8c ^^c5^^87\endmubyte % \v N
+\mubyte ^^ac ^^c5^^88\endmubyte % \v n
+\mubyte ^^90 ^^c5^^98\endmubyte % \v R
+\mubyte ^^b0 ^^c5^^99\endmubyte % \v r
+\mubyte ^^92 ^^c5^^a0\endmubyte % \v S
+\mubyte ^^b2 ^^c5^^a1\endmubyte % \v s
+\mubyte ^^94 ^^c5^^a4\endmubyte % \v T
+\mubyte ^^b4 ^^c5^^a5\endmubyte % \v t
+\mubyte ^^97 ^^c5^^ae\endmubyte % \r U
+\mubyte ^^b7 ^^c5^^af\endmubyte % \r u
+\mubyte ^^9a ^^c5^^bd\endmubyte % \v Z
+\mubyte ^^ba ^^c5^^be\endmubyte % \v z
+\mubyte ^^8f ^^c5^^94\endmubyte % \' R
+\mubyte ^^af ^^c5^^95\endmubyte % \' r
+
+\def\setcsucode #1 #2 #3 #4 #5{} % to skip the data from utf8lat1.tex
+ % and utf8lata.tex
+
+% \setucode re-definition on order to map all T1 slots rawly during \input
+% utf8lat1.tex or utf8lata.tex. This is usable if the text occurres in
+% \upercase and \lowercase arguments.
+
+\def\setucode #1 #2 #3 #4 #5{%
+ \ifx*#4% The character is not provided by T1 encoding, we need to use csname:
+ \expandafter \mubyte \csname#1\endcsname #3\endmubyte
+ \expandafter \ifx \csname#1\endcsname \relax
+ \expandafter \def\csname#1\endcsname{#5}%
+ \fi
+ \else % raw UTF-8 to T1 mapping is possible:
+ \mubyte #4 #3\endmubyte
+ \fi
+}
+
+% There exist some character-like control sequences defined in plainTeX.
+% It seems to be usable to interpret their corresponding UTF-8 codes:
+
+\mubyte \S ^^c2^^a7\endmubyte % section sign
+\mubyte \P ^^c2^^b6\endmubyte % paragraph (pilcrow) sign
+\mubyte \ss ^^c3^^9f\endmubyte % german sharp s
+\mubyte \l ^^c5^^82\endmubyte % l slashed
+\mubyte \L ^^c5^^81\endmubyte % L slashed
+\mubyte \ae ^^c3^^a6\endmubyte % ae ligature
+\mubyte \oe ^^c5^^93\endmubyte % oe ligature
+\mubyte \o ^^c3^^b8\endmubyte % o slash
+\mubyte \AE ^^c3^^86\endmubyte % AE ligature
+\mubyte \OE ^^c5^^92\endmubyte % OE ligature
+\mubyte \O ^^c3^^98\endmubyte % O slash
+\mubyte \i ^^c4^^b1\endmubyte % dotless i
+\mubyte \j ^^c8^^b7\endmubyte % dotless j
+\mubyte \aa ^^c3^^a5\endmubyte % a with ring
+\mubyte \AA ^^c3^^85\endmubyte % A with ring
+\mubyte \copyright ^^c2^^a9\endmubyte % copyright
+\mubyte \dots ^^e2^^80^^a6\endmubyte % ellipsis
+\mubyte \dag ^^e2^^80^^a0\endmubyte % single dagger
+\mubyte \ddag ^^e2^^80^^a1\endmubyte % double dagger
+
+% The character-like control sequences defined in csplain:
+
+\mubyte \clqq ^^e2^^80^^9e\endmubyte % czech left double quote
+\mubyte \crqq ^^e2^^80^^9c\endmubyte % czech right double quote
+\mubyte \flqq ^^c2^^ab\endmubyte % french left (czech right) double guillquote
+\mubyte \frqq ^^c2^^bb\endmubyte % french right (czech left) double quillquote
+\mubyte \promile ^^e2^^80^^b0\endmubyte % per mille sign
+
+\ifx\baseutfencoding\undefined \else \expandafter\endinput\fi
+
+% if the csplain is used, we cannot process this part of the file. May be
+% somebody used it from iniTeX...
+
+\let\baseutfencoding\relax
+
+\global\everyjob=\expandafter{\the\everyjob
+ \message{The utf8->T1 re-encoding of Czech+Slovak alphabet activated by encTeX}}
+
+% Warnings about UTF-8 unknown codes are set by default:
+
+\input utf8unkn
+
+% UTF-8 input / output is active by default:
+
+\mubytein=1 \mubyteout=3 \mubytelog=1
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/csplain/base/ttimes.tex b/Master/texmf-dist/tex/csplain/base/ttimes.tex
deleted file mode 100644
index 009b80f792c..00000000000
--- a/Master/texmf-dist/tex/csplain/base/ttimes.tex
+++ /dev/null
@@ -1,50 +0,0 @@
-% The file ttimes.tex (C) Petr Olsak, 2000
-% This file allows to use the Times fonts family in T1 encoding (*8t).
-% Use (for example): %&csplain -translate-file=il2-t1
-% \input ttimes
-% \chyph
-% at first three lines in your document.
-
-% Warning1: This works only in web2c implementations of TeX and derivatives.
-% Warning2: Use this file fonts only for experimental or special reason. The
-% "\input ctimes" is more natural for csplain.
-% Warning3: The \v t and \v d letters are horrible implemented in 8t metrics!
-
-% The "\rm", "\it", "\tt" and "\bf" will work with the new fonts.
-% Use "\setsimplemath" command to set Times fonts family in very
-% simple math formulas (without greek letters).
-
-\input t1code
-
-\font\tenrm=ptmr8t at 10pt
-\font\tenbf=ptmb8t at 10pt
-\font\tenit=ptmri8t at 10pt
-\font\tentt=pcrr8t at 10pt
-\let\tensl=\tenit
-\tenrm
-\def\setsimplemath{%
- \font\sevenrm ptmr8t at7pt
- \font\fiverm ptmr8t at5pt
- \font\sevenit ptmri8t at7pt
- \font\fiveit ptmri8t at5pt
- \font\sevenbf ptmb8t at7pt
- \font\fivebf ptmb8t at5pt
- \message{\string\setsimplemath\space WARNING:
- Greek symbols may be loss, see Missing char in .log!}
- \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
- \textfont1=\tenit \scriptfont1=\sevenit \scriptscriptfont1=\fiveit
- \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
- \scriptscriptfont\itfam=\fiveit
- \textfont\slfam=\tensl
- \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
- \scriptscriptfont\bffam=\fivebf
- \textfont\ttfam=\tentt }
-
-% The \setsimplemath command sets the new family of fonts for math
-% formulas. Cf. the usage of "2" (digit in text mode is in a new font)
-% but $-2$ is in Computer Modern if \setsimplemath is not used.
-% WARNING: The \setsimplemath is usable for very siple math
-% formulas only! It may crash some more complicated formulas because
-% math symbols are still used from Computer Modern and all greek
-% symbols are missing in new fonts.
-
diff --git a/Master/texmf-dist/tex/csplain/base/ucode.tex b/Master/texmf-dist/tex/csplain/base/ucode.tex
new file mode 100644
index 00000000000..c252230528b
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/base/ucode.tex
@@ -0,0 +1,314 @@
+% File ucode.tex:
+% (0) sets \czech, \slovak to Cork encoded hyphen-pattern numbers,
+% (1) sets \catcode, \l/uccode for characters (code by Cork),
+% (2) defines \csaccents for new behavior of \v, \', etc (code by Cork),
+% (3) defines some \sequences for special cs-fonts characters.
+% (4) redefines character-like macros from plainTeX as \chardef
+% (5) if encTeX with \mubytein>0 is activated reads t1enc-u.tex file
+%
+% Created by Petr Olsak <olsak@math.feld.cvut.cz>, November 2012
+
+\def\tmp#1#2\relax{\def\tmp{#2}}\tmp ^^^^abcd\relax
+\ifx\tmp\empty \else
+ \errhelp={The ucode.tex file expects the TeX engine which work in Unicode
+ internally.}
+ \errmessage{Sorry, the Unicoded TeX engine (like luatex, xetex) is not detected}
+ \endinput \fi
+
+\message{Font encoding set to Unicode.}
+
+\let\unicoded\font % macros can do \ifx\font\unicoded ...\else...\fi
+
+%% (0) \czech, \slovak. You can use \chyph, \shyph after this file is loaded.
+\ifx\czUnicode\undefined
+ \message{WARNING: czech+slovak hyphenation patterns are not loaded in Unicode.}
+\else
+ \csname unicodelangs\endcsname
+\fi
+
+%% (1a) \catcodes:
+\catcode225=11 % a-acute
+\catcode193=11 % A-acute
+\catcode228=11 % a-diaeresis
+\catcode196=11 % A-diaeresis
+\catcode269=11 % c-caron
+\catcode268=11 % C-caron
+\catcode271=11 % d-caron
+\catcode270=11 % D-caron
+\catcode233=11 % e-acute
+\catcode201=11 % E-acute
+\catcode283=11 % e-caron
+\catcode282=11 % E-caron
+\catcode237=11 % i-acute
+\catcode205=11 % I-acute
+\catcode314=11 % l-acute
+\catcode313=11 % L-acute
+\catcode318=11 % l-caron
+\catcode317=11 % L-caron
+\catcode328=11 % n-caron
+\catcode327=11 % N-caron
+\catcode243=11 % o-acute
+\catcode211=11 % O-acute
+\catcode244=11 % o-circumflex
+\catcode212=11 % O-circumflex
+\catcode246=11 % o-diaeresis
+\catcode214=11 % O-diaeresis
+\catcode341=11 % r-acute
+\catcode340=11 % R-acute
+\catcode345=11 % r-caron
+\catcode344=11 % R-caron
+\catcode353=11 % s-caron
+\catcode352=11 % S-caron
+\catcode357=11 % t-caron
+\catcode356=11 % T-caron
+\catcode250=11 % u-acute
+\catcode218=11 % U-acute
+\catcode367=11 % u-ring
+\catcode366=11 % U-ring
+\catcode252=11 % u-diaeresis
+\catcode220=11 % U-diaeresis
+\catcode253=11 % y-acute
+\catcode221=11 % Y-acute
+\catcode382=11 % z-caron
+\catcode381=11 % Z-caron
+
+%% (1b) \lccodes, \uccodes
+\def\tmp #1 #2 {\lccode#1=#1 \lccode#2=#1 \uccode#1=#2 \uccode#2=#2 }
+\tmp 225 193
+\tmp 228 196
+\tmp 269 268
+\tmp 271 270
+\tmp 233 201
+\tmp 283 282
+\tmp 237 205
+\tmp 314 313
+\tmp 318 317
+\tmp 328 327
+\tmp 243 211
+\tmp 244 212
+\tmp 246 214
+\tmp 341 340
+\tmp 345 344
+\tmp 353 352
+\tmp 357 356
+\tmp 250 218
+\tmp 367 366
+\tmp 252 220
+\tmp 253 221
+\tmp 382 381
+
+
+%% (2) \csaccents, \cmaccents
+\def\accentscommands{\string\^,\string\`,\string\',\string\v,\string\",%
+ \string\r,\string\c,\string\~,\string\H,\string\u,%
+ \string\. and \string\k}
+\def\csaccentsmessage{%
+ \message{The \accentscommands\space expands to characters by Unicode.}}
+\ifx\cmaccentsmessage\undefined
+ \def\cmaccentsmessage{%
+ \message{The \accentscommands\space are defined similar as plainTeX.}}
+\fi
+\def\csaccents{\csaccentsmessage
+ \def\^##1{\ifx o##1^^f4\else
+ \ifx O##1^^d4\else
+ \ifx a##1^^e2\else
+ \ifx A##1^^c2\else
+ \ifx e##1^^ea\else
+ \ifx E##1^^ca\else
+ \ifx i##1^^ee\else
+ \ifx I##1^^ce\else
+ \ifx u##1^^fb\else
+ \ifx U##1^^db\else
+ {\accent"005E ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}\let\^^D=\^%
+ \def\`##1{\ifx a##1^^e0\else
+ \ifx A##1^^c0\else
+ \ifx e##1^^e8\else
+ \ifx E##1^^c8\else
+ \ifx i##1^^ec\else
+ \ifx I##1^^cc\else
+ \ifx o##1^^f2\else
+ \ifx O##1^^d2\else
+ \ifx u##1^^f9\else
+ \ifx U##1^^d9\else
+ {\accent"0060 ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+ \def\'##1{\ifx a##1^^e1\else
+ \ifx e##1^^e9\else
+ \ifx\i##1^^ed\else
+ \ifx i##1^^ed\else
+ \ifx o##1^^f3\else
+ \ifx u##1^^fa\else
+ \ifx y##1^^fd\else
+ \ifx r##1^^^^0155\else
+ \ifx l##1^^^^013a\else
+ \ifx A##1^^c1\else
+ \ifx E##1^^c9\else
+ \ifx I##1^^cd\else
+ \ifx O##1^^d3\else
+ \ifx U##1^^da\else
+ \ifx Y##1^^dd\else
+ \ifx R##1^^^^0154\else
+ \ifx L##1^^^^0139\else
+ \ifx C##1^^^^0106\else
+ \ifx N##1^^^^0143\else
+ \ifx S##1^^^^015a\else
+ \ifx Z##1^^^^0179\else
+ \ifx c##1^^^^0107\else
+ \ifx n##1^^^^0144\else
+ \ifx s##1^^^^015b\else
+ \ifx z##1^^^^017a\else
+ {\accent"00B4 ##1}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+ \def\v##1{\ifx e##1^^^^011b\else
+ \ifx s##1^^^^0161\else
+ \ifx c##1^^^^010d\else
+ \ifx r##1^^^^0159\else
+ \ifx z##1^^^^017e\else
+ \ifx d##1^^^^010f\else
+ \ifx t##1^^^^0165\else
+ \ifx l##1^^^^013e\else
+ \ifx n##1^^^^0148\else
+ \ifx E##1^^^^011a\else
+ \ifx S##1^^^^0160\else
+ \ifx C##1^^^^010c\else
+ \ifx R##1^^^^0158\else
+ \ifx Z##1^^^^017d\else
+ \ifx D##1^^^^010e\else
+ \ifx T##1^^^^0164\else
+ \ifx L##1^^^^013d\else
+ \ifx N##1^^^^0147\else
+ {\accent"02C7 ##1}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi}\let\^^_=\v%
+ \def\"##1{\ifx a##1^^e4\else
+ \ifx o##1^^f6\else
+ \ifx u##1^^fc\else
+ \ifx A##1^^c4\else
+ \ifx O##1^^d6\else
+ \ifx U##1^^dc\else
+ \ifx Y##1^^^^0178\else
+ \ifx E##1^^cb\else
+ \ifx I##1^^cf\else
+ \ifx y##1^^b8\else
+ \ifx e##1^^eb\else
+ \ifx i##1^^ef\else
+ {\accent"00A8 ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+ \def\r##1{\ifx u##1^^^^016f\else
+ \ifx U##1^^^^016e\else
+ \ifx A##1^^c5\else
+ \ifx a##1^^e5\else
+ {\accent"00B0 ##1}\fi\fi\fi\fi}%
+ \def\c##1{\ifx C##1^^c7\else
+ \ifx c##1^^e7\else
+ \ifx S##1^^^^015e\else
+ \ifx s##1^^^^015f\else
+ \ifx T##1^^^^0162\else
+ \ifx t##1^^^^0163\else
+ {\char"00B8 ##1}\fi\fi\fi\fi\fi\fi}%
+ \def\~##1{\ifx A##1^^c3\else
+ \ifx N##1^^d1\else
+ \ifx O##1^^d5\else
+ \ifx a##1^^e3\else
+ \ifx n##1^^f1\else
+ \ifx o##1^^f5\else
+ {\accent"007E ##1}\fi\fi\fi\fi\fi\fi}%
+ \def\H##1{\ifx O##1^^^^0150\else
+ \ifx U##1^^^^0170\else
+ \ifx o##1^^^^0151\else
+ \ifx u##1^^^^0171\else
+ {\accent"02DD ##1}\fi\fi\fi\fi}%
+ \def\u##1{\ifx A##1^^^^0102\else
+ \ifx G##1^^^^011e\else
+ \ifx a##1^^^^0103\else
+ \ifx g##1^^^^011f\else
+ {\accent"02D8 ##1}\fi\fi\fi\fi}%
+ \def\=##1{\ifx d##1^^^^0111\else
+ {\accent"00AF ##1}\fi}%
+ \def\.##1{\ifx i##1^^69\else
+ \ifx z##1^^^^017c\else
+ \ifx I##1^^^^0130\else
+ \ifx Z##1^^^^017b\else
+ {\accent"02D9 ##1}\fi\fi\fi\fi}%
+ \def\k##1{\ifx A##1^^^^0104\else
+ \ifx E##1^^^^0118\else
+ \ifx a##1^^^^0105\else
+ \ifx e##1^^^^0119\else
+ {\char"02DB ##1}\fi\fi\fi\fi}%
+ %% for backward compatibility:
+ \def\softd{\v{d}}\def\softt{\v{t}}\def\ou{\r{u}}%
+ \def\softl{\v{l}}\def\softL{\v{L}}}
+\def\cmaccents{\cmaccentsmessage
+ \def\^##1{{\accent94 ##1}}\let\^^D=\^%
+ \def\`##1{{\accent18 ##1}}%
+ \def\'##1{{\accent19 ##1}}%
+ \def\v##1{{\accent20 ##1}}\let\^^_=\v%
+ \def\"##1{{\accent"7F ##1}}%
+ \let\r=\undefined\def\ou{{\accent6u}}}
+
+\ifx\r\undefined \else \csaccents \fi %% re-set \csaccents
+
+%% (3) special \sequences for UNICODEd fonts.
+ %% Czech left a right double qoutes
+\chardef\clqq="201E \sfcode"201E=0
+\chardef\crqq="201C \sfcode"201C=0
+ %% French double quotes
+\chardef\flqq="00AB \sfcode"00AB=0
+\chardef\frqq="00BB \sfcode"00BB=0
+ %% Other characters
+\def\ogonek #1{\setbox0\hbox{#1}\ifdim\ht0=1ex\accent"02DB #1%
+ \else{\ooalign{\unhbox0\crcr\hss\char"02DB}}\fi}
+\chardef\promile="2030
+ %% Alternative \hyphenchar ("je-li" is no "je\hyphenchar li").
+\let\extrahyphenchar=\undefined
+\let\extrahyphens=\undefined
+ %% The czech quotes:
+\def\uv{\bgroup\aftergroup\closequotes\leavevmode
+ \afterassignment\clqq\let\next=}
+\def\closequotes{\unskip\crqq\relax}
+
+%% (4) re-definition character-like macros from plainTeX:
+
+\chardef \S 167
+\chardef \P 182
+\chardef \ss 223
+\chardef \L 321
+\chardef \l 322
+\chardef \ae 230
+\chardef \oe 339
+\chardef \o 248
+\chardef \AE 198
+\chardef \OE 338
+\chardef \O 216
+\chardef \i 305
+\chardef \j 567
+\chardef \aa 229
+\chardef \AA 197
+
+% new characters in T1 encoding:
+
+\chardef \Eth 272
+\chardef \NG 330
+\chardef \Thorn 222
+\chardef \eth 273
+\chardef \ng 331
+\chardef \thorn 254
+\chardef \flq 8249
+\chardef \frq 8250
+\chardef \clq 8218
+\chardef \crq 8219
+\chardef \elqq 8220
+\chardef \erqq 8221
+\chardef \sterling 163
+\let\pound=\sterling
+
+%% (5) reading UTF-8 input encoding from t1enc-u.tex file
+
+\ifx\mubytein\undefined \expandafter \endinput \fi
+\ifnum\mubytein=0 \expandafter \endinput \fi
+
+\input t1enc-u
+
+
+\endinput
+
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/ams-math.tex b/Master/texmf-dist/tex/csplain/fonts/ams-math.tex
new file mode 100644
index 00000000000..9f204220f8d
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/ams-math.tex
@@ -0,0 +1,509 @@
+% This file loads AMS math fonts by plainTeX macros
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+% todo: find bold AMS symbols
+
+\message{FONT: AMS math fonts -
+ \string\mathchardef's prepared, 12 math families preloaded.}
+
+% After \input ams-math
+%
+% you can use hundreds characters from AMS math fonts
+% (see \mathchardefs below).
+% By default: - the fonts are loaded at 10/7/5 sizes.
+% - variables are typeset by \mit (fam1)
+% - digits and \sin, \cos, etc. are typeset by fam0
+%
+% You can use the following alphabets:
+% \mit ... mathematical variables
+% \rm, \it .. text fonts in math
+% \bf, \bi .. bold sans fonts (may be different than text fonts)
+% \cal ... normal calligraphics
+% \script ... script
+% \frak ... fraktur
+% \bbchar ... double stroked letters
+%
+% You can reload all math family fonts in two shapes:
+% \normalmath ... normal shape
+% \boldmath ... bold shape at implicit sizes or sizes set by
+% Before reloading the fonts by previous comand you can set the sizes:
+% \setmathsizes[text/script/scriptscript]
+% Example \setmathsizes[12/8.4/6]\normalmath ... loads fonts at given sizes
+%
+% You can set typesetting of math variables from current text font
+% by the command: \itvariavles. The \mitvariables reverts to the
+% default.
+
+\def\normalmath{%
+ \loadmathfamily 0 cmr % CM Roman
+ \loadmathfamily 1 cmmi % CM Math Italic
+ \loadmathfamily 2 cmsy % CM Standard symbols
+ \loadmathfamily 3 cmex % CM extra symbols
+ \loadmathfamily 4 msam % AMS symbols A
+ \loadmathfamily 5 msbm % AMS symbols B
+ \loadmathfamily 6 rsfs % script
+ \loadmathfamily 7 eufm % fractur
+ \loadmathfamily 8 bfsans % sans serif bold
+ \loadmathfamily 9 bisans % sans serif bold slanted (for vectors)
+ \chardef\rmfam 10 \setmathfamily \rmfam \tenrm
+ \chardef\itfam 11 \setmathfamily \itfam \tenit
+ \setmathdimens
+}
+\def\boldmath{%
+ \loadmathfamily 0 cmbx % CM Roman Bold Extended
+ \loadmathfamily 1 cmmib % CM Math Italic Bold
+ \loadmathfamily 2 cmbsy % CM Standard symbols Bold
+ \loadmathfamily 3 cmexb % CM extra symbols Bold
+ \loadmathfamily 4 msam % AMS symbols A (bold not available?)
+ \loadmathfamily 5 msbm % AMS symbols B (bold not available?)
+ \loadmathfamily 6 rsfs % script (bold not available?)
+ \loadmathfamily 7 eufb % fractur bold
+ \loadmathfamily 8 bbfsans % sans serif extra bold
+ \loadmathfamily 9 bbisans % sans serif extra bold slanted (for vectors)
+ \chardef\rmfam 10 \setmathfamily \rmfam \tenrm
+ \chardef\itfam 11 \setmathfamily \itfam \tenit
+ \setmathdimens
+}
+\count18=11 % families declared by \newfam are 12, 13, ...
+
+\let\normalAMSmath=\normalmath \let\boldAMSmath=\boldmath
+
+\def\bi{\tenbi \fam\bifam} % in csplain is done \def\bi{\tenbi} only
+\def\bbchar{\fam5 } % double stroked letters
+\def\frak{\fam7 } % fraktur
+\def\script{\fam6 } % more extensive script than \cal
+\chardef\bffam 8 % sans serif bold
+\chardef\bifam 9 % sans serif bold slanted
+\chardef\slfam 10 % similar to slanted font from plainTeX
+\chardef\ttfam 11 % \tt in math is unusable
+
+% \regtfm formal-name 0 tfm[1] p[1] tfm[2] p[2] ... tfm[n] *
+%
+% Imagine the interval [0,\infty) represented here by [0,*) with internal
+% points p[i]. Between each two points (measured in pt), there is the name
+% of a real tfm metric. The tfm[i] is the result of the expansion-only macro
+% \whichtfm{formal-name} iff \dgsize is in the interval [p[i-1], p[i]).
+% Example of the usage: \font\foo=\whichtfm{cmr} at\dgsize
+
+\def\regtfm #1 0 #2 *{\expandafter
+ \def\csname#1:reg\endcsname{#2 16380 \relax}%
+ \def\tmpa{#1}\reversetfm #2 * %
+}
+\def\reversetfm #1 #2 {% we need this data for \setmathfamily
+ \expandafter\let\csname#1:reg\expandafter\endcsname
+ \csname\tmpa:reg\endcsname
+ \if*#2\else \expandafter\reversetfm \fi
+}
+
+\ifx\font\lmfonts \else % lmfonts setting has a precedence
+
+% CM text fonts which have the CSfont alternative:
+\regtfm cmr 0 csr5 5.5 csr6 6.5 csr7 7.5 csr8 8.5 csr9 9.5
+ csr10 11.1 csr12 15 csr17 *
+\regtfm cmbx 0 csbx5 5.5 csbx6 6.5 csbx7 7.5 csbx8 8.5 csbx9 9.5
+ csbx10 11.1 csbx12 *
+\regtfm cmsl 0 cssl8 8.5 cssl9 9.5 cssl10 11.1 cssl12 *
+\regtfm cmtt 0 cstt8 8.5 cstt9 9.5 cstt10 11.1 cstt12 *
+\regtfm cmss 0 csss8 8.5 csss9 9.5 csss10 11.1 csss12 15 csss17 *
+\regtfm cmssi 0 csssi8 8.5 csssi9 9.5 csssi10 11.1 csssi12 15 csssi17 *
+\regtfm cmti 0 csti7 7.5 csti8 8.5 csti9 9.5 csti10 11.1 csti12 *
+\regtfm cmbxti 0 csbxti10 *
+% CM math fonts
+\regtfm cmmi 0 cmmi5 5.5 cmmi6 6.5 cmmi7 7.5 cmmi8 8.5 cmmi9 9.5
+ cmmi10 11.1 cmmi12 *
+\regtfm cmmib 0 cmmib5 5.5 cmmib6 6.5 cmmib7 7.5 cmmib8 8.5 cmmib9
+ 9.5 cmmib10 *
+\regtfm cmtex 0 cstex8 8.5 cstex9 9.5 cstex10 *
+\regtfm cmsy 0 cmsy5 5.5 cmsy6 6.5 cmsy7 7.5 cmsy8 8.5 cmsy9 9.5
+ cmsy10 *
+\regtfm cmbsy 0 cmbsy5 5.5 cmbsy6 6.5 cmbsy7 7.5 cmbsy8 8.5 cmbsy9 9.5
+ cmbsy10 *
+\regtfm cmex 0 cmex7 7.5 cmex8 8.5 cmex9 9.5 cmex10 *
+\regtfm cmexb 0 cmexb10 *
+% AMS fonts
+\regtfm msam 0 msam5 5.5 msam6 6.5 msam7 7.5 msam8 8.5 msam9
+ 9.5 msam10 *
+\regtfm msbm 0 msbm5 5.5 msbm6 6.5 msbm7 7.5 msbm8 8.5 msbm9
+ 9.5 msbm10 *
+\regtfm eufm 0 eufm5 5.5 eufm6 6.5 eufm7 7.5 eufm8 8.5 eufm9
+ 9.5 eufm10 *
+\regtfm eufb 0 eufb5 5.5 eufb6 6.5 eufb7 7.5 eufb8 8.5 eufb9
+ 9.5 eufb10 *
+% other fonts
+\regtfm rsfs 0 rsfs5 6 rsfs7 8.5 rsfs10 *
+\regtfm bfsans 0 ecsx0500 5.5 ecsx0600 6.5 ecsx0700 7.5 ecsx0800
+ 8.5 ecsx0900 9.5 ecsx1000 11.1 ecsx1200 *
+\regtfm bisans 0 ecso0500 5.5 ecso0600 6.5 ecso0700 7.5 ecso0800
+ 8.5 ecso0900 9.5 ecso1000 11.1 ecso1200 *
+\regtfm bbfsans 0 ecsx0500 5.5 ecsx0600 6.5 ecsx0700 7.5 ecsx0800
+ 8.5 ecsx0900 9.5 ecsx1000 11.1 ecsx1200 *
+\regtfm bbisans 0 ecso0500 5.5 ecso0600 6.5 ecso0700 7.5 ecso0800
+ 8.5 ecso0900 9.5 ecso1000 11.1 ecso1200 *
+
+\fi
+
+% User can re-register these tfm's mentioned above after \input ams-math.tex
+% if he/she want to load other fonts than these defaults.
+
+% The new size of font produced by csplain \resizefont macro would be
+% derived using \regtmf data. In order to do this you can re-define this
+% csplain macro (see csfontsm.tex file):
+% \def\resizefontskipat#1 #2\relax{\whichtfm{#1} \sizespec\relax}
+% but now there is a different usage of the \resizefont:
+% \def\dgsize{17pt}\def\sizespec{at\dgsize}\resizefont\tenrm
+
+\ifx\corrmsizes\undefined \def\corrmsizes#1{}\fi % see tx-math for the
+ % example of \corrmsizes
+
+%% macros:
+
+\def\itvariables{\def\rm{\fam\rmfam \tenrm}%
+ \mathcodechanges A:0-9\mathcodechanges B:A-Z\mathcodechanges B:a-z}
+\def\mitvariables{\def\rm{\fam0\tenrm}%
+ \mathcodechanges 0:0-9\mathcodechanges 1:A-Z\mathcodechanges 1:a-z}
+
+\def\loadmathfamily #1 #2 {\corrmsizes{#1}%
+ \let\dgsize=\sizemtext
+ \font\tmp=\whichtfm{#2} at\dgsize \textfont#1=\tmp
+ \let\dgsize=\sizemscript
+ \font\tmp=\whichtfm{#2} at \dgsize \scriptfont#1=\tmp
+ \let\dgsize=\sizemsscript
+ \font\tmp=\whichtfm{#2} at\dgsize \scriptscriptfont#1=\tmp
+ \ptmunit=1pt
+}
+\def\setmathfamily #1#2{\corrmsizes{#1}%
+ \let\dgsize=\sizemtext
+ \font\tmp = \specfontname #2 at\sizemtext \textfont#1=\tmp
+ \let\dgsize=\sizemscript
+ \font\tmp = \specfontname #2 at\sizemscript \scriptfont#1=\tmp
+ \let\dgsize=\sizemsscript
+ \font\tmp = \specfontname #2 at\sizemsscript \scriptscriptfont#1=\tmp
+ \ptmunit=1pt
+}
+\def\specfontname #1{\expandafter \ignoreatpt \fontname #1 \relax}
+\def\ignoreatpt #1 #2\relax{\whichtfm{#1}}
+\def\mathcodechanges#1:#2-#3{\chardef\tmp=\count0 \chardef\tmpa=\count1
+ \count0=`#2 \count1=\count0 \advance\count1 by"7#100
+ \loop \mathcode\count0=\count1
+ \ifnum\count0<`#3 \advance\count0 by1 \advance\count1 by1 \repeat
+ \count0=\tmp \count1=\tmpa
+}
+\def\whichtfm #1{\expandafter \ifx\csname#1:reg\endcsname\relax
+ #1%
+ \else
+ \expandafter\expandafter\expandafter \dowhichtfm
+ \csname #1:reg\expandafter\endcsname
+ \fi
+}
+\def\dowhichtfm #1 #2 {%
+ \ifdim\dgsize<#2pt #1\expandafter\ignoretfm\else \expandafter\dowhichtfm
+\fi
+}
+\def\ignoretfm #1\relax{}
+
+\def\setmathdimens{% PlainTeX sets these dimens for 10pt size only:
+ \delimitershortfall=0.5\fontdimen6\textfont3
+ \nulldelimiterspace=0.12\fontdimen6\textfont3
+ \scriptspace=0.05\fontdimen6\textfont3
+ \skewchar\textfont1=127 \skewchar\scriptfont1=127
+ \skewchar\scriptscriptfont1=127
+ \skewchar\textfont2=48 \skewchar\scriptfont2=48
+ \skewchar\scriptscriptfont2=48
+}
+
+% \setmathsizes:
+
+\def\setmathsizes[#1/#2/#3]{%
+ \def\sizemtext{#1\ptmunit}\def\sizemscript{#2\ptmunit}%
+ \def\sizemsscript{#3\ptmunit}%
+}
+\newdimen\ptmunit \ptmunit=1pt % used in \corrmsizes
+
+\setmathsizes[10/7/5]
+
+\ifx\tenbi\undefined \font\tenbi=ptmbi8z \relax \fi
+\normalmath % load families, normal shape
+\mitvariables % \rm in \fam0 and avriables in math by \mit
+
+%% \mathchardef declarations
+
+\def\amsafam{4} \def\amsbfam{5}
+
+%% AMSA
+
+\mathchardef \boxdot "2\amsafam 00
+\mathchardef \boxplus "2\amsafam 01
+\mathchardef \boxtimes "2\amsafam 02
+\mathchardef \square "0\amsafam 03
+\mathchardef \blacksquare "0\amsafam 04
+\mathchardef \centerdot "2\amsafam 05
+\mathchardef \lozenge "0\amsafam 06
+\mathchardef \blacklozenge "0\amsafam 07
+\mathchardef \circlearrowright "3\amsafam 08
+\mathchardef \circlearrowleft "3\amsafam 09
+\mathchardef \rightleftharpoons "3\amsafam 0A
+\mathchardef \leftrightharpoons "3\amsafam 0B
+\mathchardef \boxminus "2\amsafam 0C
+\mathchardef \Vdash "3\amsafam 0D
+\mathchardef \Vvdash "3\amsafam 0E
+\mathchardef \vDash "3\amsafam 0F
+\mathchardef \twoheadrightarrow "3\amsafam 10
+\mathchardef \twoheadleftarrow "3\amsafam 11
+\mathchardef \leftleftarrows "3\amsafam 12
+\mathchardef \rightrightarrows "3\amsafam 13
+\mathchardef \upuparrows "3\amsafam 14
+\mathchardef \downdownarrows "3\amsafam 15
+\mathchardef \upharpoonright "3\amsafam 16
+\mathchardef \downharpoonright "3\amsafam 17
+\mathchardef \upharpoonleft "3\amsafam 18
+\mathchardef \downharpoonleft "3\amsafam 19
+\mathchardef \rightarrowtail "3\amsafam 1A
+\mathchardef \leftarrowtail "3\amsafam 1B
+\mathchardef \leftrightarrows "3\amsafam 1C
+\mathchardef \rightleftarrows "3\amsafam 1D
+\mathchardef \Lsh "3\amsafam 1E
+\mathchardef \Rsh "3\amsafam 1F
+\mathchardef \rightsquigarrow "3\amsafam 20
+\mathchardef \leftrightsquigarrow "3\amsafam 21
+\mathchardef \looparrowleft "3\amsafam 22
+\mathchardef \looparrowright "3\amsafam 23
+\mathchardef \circeq "3\amsafam 24
+\mathchardef \succsim "3\amsafam 25
+\mathchardef \gtrsim "3\amsafam 26
+\mathchardef \gtrapprox "3\amsafam 27
+\mathchardef \multimap "3\amsafam 28
+\mathchardef \therefore "3\amsafam 29
+\mathchardef \because "3\amsafam 2A
+\mathchardef \doteqdot "3\amsafam 2B
+\mathchardef \triangleq "3\amsafam 2C
+\mathchardef \precsim "3\amsafam 2D
+\mathchardef \lesssim "3\amsafam 2E
+\mathchardef \lessapprox "3\amsafam 2F
+\mathchardef \eqslantless "3\amsafam 30
+\mathchardef \eqslantgtr "3\amsafam 31
+\mathchardef \curlyeqprec "3\amsafam 32
+\mathchardef \curlyeqsucc "3\amsafam 33
+\mathchardef \preccurlyeq "3\amsafam 34
+\mathchardef \leqq "3\amsafam 35
+\mathchardef \leqslant "3\amsafam 36
+\mathchardef \lessgtr "3\amsafam 37
+\mathchardef \backprime "0\amsafam 38
+\mathchardef \risingdotseq "3\amsafam 3A
+\mathchardef \fallingdotseq "3\amsafam 3B
+\mathchardef \succcurlyeq "3\amsafam 3C
+\mathchardef \geqq "3\amsafam 3D
+\mathchardef \geqslant "3\amsafam 3E
+\mathchardef \gtrless "3\amsafam 3F
+\mathchardef \sqsubset "3\amsafam 40
+\mathchardef \sqsupset "3\amsafam 41
+\mathchardef \vartriangleright "3\amsafam 42
+\mathchardef \vartriangleleft "3\amsafam 43
+\mathchardef \trianglerighteq "3\amsafam 44
+\mathchardef \trianglelefteq "3\amsafam 45
+\mathchardef \bigstar "0\amsafam 46
+\mathchardef \between "3\amsafam 47
+\mathchardef \blacktriangledown "0\amsafam 48
+\mathchardef \blacktriangleright "3\amsafam 49
+\mathchardef \blacktriangleleft "3\amsafam 4A
+\mathchardef \vartriangle "3\amsafam 4D
+\mathchardef \blacktriangle "0\amsafam 4E
+\mathchardef \triangledown "0\amsafam 4F
+\mathchardef \eqcirc "3\amsafam 50
+\mathchardef \lesseqgtr "3\amsafam 51
+\mathchardef \gtreqless "3\amsafam 52
+\mathchardef \lesseqqgtr "3\amsafam 53
+\mathchardef \gtreqqless "3\amsafam 54
+\mathchardef \Rrightarrow "3\amsafam 56
+\mathchardef \Lleftarrow "3\amsafam 57
+\mathchardef \veebar "2\amsafam 59
+\mathchardef \barwedge "2\amsafam 5A
+\mathchardef \doublebarwedge "2\amsafam 5B
+\mathchardef \angle "0\amsafam 5C
+\mathchardef \measuredangle "0\amsafam 5D
+\mathchardef \sphericalangle "0\amsafam 5E
+\mathchardef \varpropto "3\amsafam 5F
+\mathchardef \smallsmile "3\amsafam 60
+\mathchardef \smallfrown "3\amsafam 61
+\mathchardef \Subset "3\amsafam 62
+\mathchardef \Supset "3\amsafam 63
+\mathchardef \Cup "2\amsafam 64
+\mathchardef \Cap "2\amsafam 65
+\mathchardef \curlywedge "2\amsafam 66
+\mathchardef \curlyvee "2\amsafam 67
+\mathchardef \leftthreetimes "2\amsafam 68
+\mathchardef \rightthreetimes "2\amsafam 69
+\mathchardef \subseteqq "3\amsafam 6A
+\mathchardef \supseteqq "3\amsafam 6B
+\mathchardef \bumpeq "3\amsafam 6C
+\mathchardef \Bumpeq "3\amsafam 6D
+\mathchardef \lll "3\amsafam 6E
+\mathchardef \ggg "3\amsafam 6F
+\def \ulcorner {\delimiter"4\amsafam 70\amsafam 70 }
+\def \urcorner {\delimiter"5\amsafam 71\amsafam 71 }
+\mathchardef \circledS "0\amsafam 73
+\mathchardef \pitchfork "3\amsafam 74
+\mathchardef \dotplus "2\amsafam 75
+\mathchardef \backsim "3\amsafam 76
+\mathchardef \backsimeq "3\amsafam 77
+\def \llcorner {\delimiter"4\amsafam 78\amsafam 78 }
+\def \lrcorner {\delimiter"5\amsafam 79\amsafam 79 }
+\mathchardef \complement "0\amsafam 7B
+\mathchardef \intercal "2\amsafam 7C
+\mathchardef \circledcirc "2\amsafam 7D
+\mathchardef \circledast "2\amsafam 7E
+\mathchardef \circleddash "2\amsafam 7F
+\mathchardef \rhd "2\amsafam 42
+\mathchardef \lhd "2\amsafam 43
+\mathchardef \unrhd "2\amsafam 44
+\mathchardef \unlhd "2\amsafam 45
+
+ \let\restriction\upharpoonright
+ \let\Doteq\doteqdot
+ \let\doublecup\Cup
+ \let\doublecap\Cap
+ \let\llless\lll
+ \let\gggtr\ggg
+ \let\Box=\square % LaTeX symbol
+ \let\Box=\square % LaTeX symbol
+
+%% AMSB
+
+\mathchardef \lvertneqq "3\amsbfam 00
+\mathchardef \gvertneqq "3\amsbfam 01
+\mathchardef \nleq "3\amsbfam 02
+\mathchardef \ngeq "3\amsbfam 03
+\mathchardef \nless "3\amsbfam 04
+\mathchardef \ngtr "3\amsbfam 05
+\mathchardef \nprec "3\amsbfam 06
+\mathchardef \nsucc "3\amsbfam 07
+\mathchardef \lneqq "3\amsbfam 08
+\mathchardef \gneqq "3\amsbfam 09
+\mathchardef \nleqslant "3\amsbfam 0A
+\mathchardef \ngeqslant "3\amsbfam 0B
+\mathchardef \lneq "3\amsbfam 0C
+\mathchardef \gneq "3\amsbfam 0D
+\mathchardef \npreceq "3\amsbfam 0E
+\mathchardef \nsucceq "3\amsbfam 0F
+\mathchardef \precnsim "3\amsbfam 10
+\mathchardef \succnsim "3\amsbfam 11
+\mathchardef \lnsim "3\amsbfam 12
+\mathchardef \gnsim "3\amsbfam 13
+\mathchardef \nleqq "3\amsbfam 14
+\mathchardef \ngeqq "3\amsbfam 15
+\mathchardef \precneqq "3\amsbfam 16
+\mathchardef \succneqq "3\amsbfam 17
+\mathchardef \precnapprox "3\amsbfam 18
+\mathchardef \succnapprox "3\amsbfam 19
+\mathchardef \lnapprox "3\amsbfam 1A
+\mathchardef \gnapprox "3\amsbfam 1B
+\mathchardef \nsim "3\amsbfam 1C
+\mathchardef \ncong "3\amsbfam 1D
+\mathchardef \diagup "0\amsbfam 1E
+\mathchardef \diagdown "0\amsbfam 1F
+\mathchardef \varsubsetneq "3\amsbfam 20
+\mathchardef \varsupsetneq "3\amsbfam 21
+\mathchardef \nsubseteqq "3\amsbfam 22
+\mathchardef \nsupseteqq "3\amsbfam 23
+\mathchardef \subsetneqq "3\amsbfam 24
+\mathchardef \supsetneqq "3\amsbfam 25
+\mathchardef \varsubsetneqq "3\amsbfam 26
+\mathchardef \varsupsetneqq "3\amsbfam 27
+\mathchardef \subsetneq "3\amsbfam 28
+\mathchardef \supsetneq "3\amsbfam 29
+\mathchardef \nsubseteq "3\amsbfam 2A
+\mathchardef \nsupseteq "3\amsbfam 2B
+\mathchardef \nparallel "3\amsbfam 2C
+\mathchardef \nmid "3\amsbfam 2D
+\mathchardef \nshortmid "3\amsbfam 2E
+\mathchardef \nshortparallel "3\amsbfam 2F
+\mathchardef \nvdash "3\amsbfam 30
+\mathchardef \nVdash "3\amsbfam 31
+\mathchardef \nvDash "3\amsbfam 32
+\mathchardef \nVDash "3\amsbfam 33
+\mathchardef \ntrianglerighteq "3\amsbfam 34
+\mathchardef \ntrianglelefteq "3\amsbfam 35
+\mathchardef \ntriangleleft "3\amsbfam 36
+\mathchardef \ntriangleright "3\amsbfam 37
+\mathchardef \nleftarrow "3\amsbfam 38
+\mathchardef \nrightarrow "3\amsbfam 39
+\mathchardef \nLeftarrow "3\amsbfam 3A
+\mathchardef \nRightarrow "3\amsbfam 3B
+\mathchardef \nLeftrightarrow "3\amsbfam 3C
+\mathchardef \nleftrightarrow "3\amsbfam 3D
+\mathchardef \divideontimes "2\amsbfam 3E
+\mathchardef \varnothing "0\amsbfam 3F
+\mathchardef \nexists "0\amsbfam 40
+\mathchardef \Finv "0\amsbfam 60
+\mathchardef \Game "0\amsbfam 61
+\mathchardef \mho "0\amsbfam 66
+\mathchardef \eth "0\amsbfam 67
+\mathchardef \eqsim "3\amsbfam 68
+\mathchardef \beth "0\amsbfam 69
+\mathchardef \gimel "0\amsbfam 6A
+\mathchardef \daleth "0\amsbfam 6B
+\mathchardef \lessdot "2\amsbfam 6C
+\mathchardef \gtrdot "2\amsbfam 6D
+\mathchardef \ltimes "2\amsbfam 6E
+\mathchardef \rtimes "2\amsbfam 6F
+\mathchardef \shortmid "3\amsbfam 70
+\mathchardef \shortparallel "3\amsbfam 71
+\mathchardef \smallsetminus "2\amsbfam 72
+\mathchardef \thicksim "3\amsbfam 73
+\mathchardef \thickapprox "3\amsbfam 74
+\mathchardef \approxeq "3\amsbfam 75
+\mathchardef \precapprox "3\amsbfam 76
+\mathchardef \succapprox "3\amsbfam 77
+\mathchardef \curvearrowleft "3\amsbfam 78
+\mathchardef \curvearrowright "3\amsbfam 79
+\mathchardef \digamma "0\amsbfam 7A
+\mathchardef \varkappa "0\amsbfam 7B
+\mathchardef \Bbbk "0\amsbfam 7C
+\mathchardef \hslash "0\amsbfam 7D
+\mathchardef \hbar "0\amsbfam 7E
+\mathchardef \backepsilon "3\amsbfam 7F
+
+%%% macros
+
+\def\joinrel{\mathrel{\mkern-2.5mu}} %-3mu in plain TeX
+
+\let\circledplus\oplus
+\let\circledminus\ominus
+\let\circledtimes\otimes
+\let\circledslash\oslash
+\let\circleddot\odot
+
+%%% \big, \bigg, etc:
+
+\def\scalebig#1#2{{\left#1\vbox to#2\fontdimen6\textfont3{}%
+ \kern-\nulldelimiterspace\right.}}
+\def\big#1{\scalebig{#1}{.85}}
+\def\Big#1{\scalebig{#1}{1.15}}
+\def\bigg#1{\scalebig{#1}{1.45}}
+\def\Bigg#1{\scalebig{#1}{1.75}}
+
+%%% \not redefined:
+%%% \not< becomes \nless
+%%% \not> becomes \ngtr
+%%% if \notXXX is defined, \not\XXX becomes \notXXX;
+%%% if \nXXX is defined, \not\XXX becomes \nXXX;
+%%% otherwise, \not\XXX is done in the usual way.
+
+\mathchardef \notchar "3236
+
+\def\not#1{%
+ \ifx\TeX\relax \noexpand\not \else % \let\TeX=\relax in \output routine
+ \ifx #1<\nless \else
+ \ifx #1>\ngtr \else
+ \bgroup\escapechar=-1\xdef\tmpn{\string#1}\egroup
+ \expandafter\ifx \csname not\tmpn\endcsname \relax
+ \expandafter\ifx \csname n\tmpn\endcsname \relax
+ \mathrel{\mathord{\notchar}\mathord{#1}}%
+ \else \csname n\tmpn\endcsname \fi
+ \else \csname not\tmpn\endcsname \fi
+ \fi\fi\fi}
+
+\endinput
+
+% end of ams-math.tex file
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cavantga.tex b/Master/texmf-dist/tex/csplain/fonts/cavantga.tex
new file mode 100644
index 00000000000..8742df30e6f
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cavantga.tex
@@ -0,0 +1,34 @@
+% The file cavantga.tex (C) Petr Olsak, 1996, 1999, 2012
+% Use "\input cavantga" to set the AvantGarde fonts family in text mode.
+
+\message{FONT: AvantGarde -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\tt.}
+
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded
+ \def\tmp{8t \sizespec}\def\tmpa{8t \sizespec}
+\else \def\tmp{8z \sizespec}\def\tmpa{8u \sizespec}
+\fi
+
+\font\tenrm=pagk\tmp
+\font\tenbf=pagd\tmp
+\font\tenit=pagko\tmp
+\font\tenbi=pagdo\tmp
+\font\tentt=pcrr\tmpa
+\let\tensl=\tenit
+
+\tenrm
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\let\setsimplemath=\relax % this command is obsolete
+
+% The \TeX logo corrected by Ivo Jancik for AvantGarde fonts family
+\def\agTeX{T\kern-.08em\lower.3333ex\hbox{E}\kern-0.09emX}
+\ifx\origTeX\undefined \let\origTeX=\TeX \fi
+\let\TeX=\agTeX
+
+% end of cavantga.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cbookman.tex b/Master/texmf-dist/tex/csplain/fonts/cbookman.tex
new file mode 100644
index 00000000000..d033df87182
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cbookman.tex
@@ -0,0 +1,33 @@
+% The file cbookman.tex (C) Petr Olsak, 1996, 1999, 2012
+% Use "\input cbookman" to set the Bookman fonts family in text mode
+
+\message{FONT: Bookman -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\tt.}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded
+ \def\tmp{8t \sizespec}\def\tmpa{8t \sizespec}
+\else \def\tmp{8z \sizespec}\def\tmpa{8u \sizespec}
+\fi
+
+\font\tenrm=pbkl\tmp
+\font\tenbf=pbkd\tmp
+\font\tenit=pbkli\tmp
+\font\tenbi=pbkdi\tmp
+\font\tentt=pcrr\tmpa
+\let\tensl=\tenit
+
+\tenrm
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\let\setsimplemath=\relax % this command is obsolete
+
+% The \TeX logo corrected by Ivo Jancik for Bookman fonts family
+\def\bmTeX{T\kern-.14em\lower.4ex\hbox{E}\kern-.125emX}
+\ifx\origTeX\undefined \let\origTeX=\TeX \fi
+\let\TeX=\bmTeX
+
+% end of cbookman.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/chars-8z.tex b/Master/texmf-dist/tex/csplain/fonts/chars-8z.tex
new file mode 100644
index 00000000000..f774361d72a
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/chars-8z.tex
@@ -0,0 +1,69 @@
+% chars-8z.tex file
+% Petr Olsak, Oct 2012
+
+% The simple declarations of more characters from 8z encoded fonts.
+
+\chardef\ellipsis 128
+\chardef\dag 129 % plain macro redefined
+\chardef\ddag 130 % plain macro redefined
+\chardef\texbullet 131
+\chardef\sterling 132
+\chardef\paragraphsign 133
+\chardef\euro 134
+\chardef\trademark 136
+\chardef\copyright 137 % plain macro redefined
+\chardef\registered 138
+\chardef\Lslash 163 % plain macro redefined
+\chardef\lslash 179 % plain macro redefined
+\chardef\currency 164
+\chardef\section 167
+\chardef\clq 154 % czech single left quote
+\chardef\crq 155 % czech single right quote
+\chardef\flq 142 % french single left quote
+\chardef\frq 143 % french single right quote
+
+\let\P=\paragraphsign % plain macro redefined
+\let\S=\section % plain macro redefined
+\let\pound=\sterling
+\let\L=\Lslash % plain macro redefined
+\let\l=\lslash % plain macro redefined
+% \let\dots=\ellipsis, don't do it: \dots works in mathmode too.
+
+\chardef\Aogonek 161
+\chardef\aogonek 177
+
+\let\oriogonek=\ogonek % defined in csplain
+\def\ogonek#1{\ifx A#1\Aogonek\else\ifx a#1\aogonek\else \oriogonek{#1}\fi\fi}
+
+\chardef\Ccedilla 199
+\chardef\ccedilla 231
+
+\let\oricedilla=\c % defined in plain
+\def\c#1{\ifx C#1\Ccedilla\else\ifx c#1\ccedilla\else \oricedilla{#1}\fi\fi}
+
+\chardef\Edieresis 203
+\chardef\edieresis 235
+
+\let\oridieresis=\" % defined in plain (or csplain after \csaccents)
+\def\"#1{\ifx E#1\Edieresis\else\ifx e#1\edieresis\else \oridieresis{#1}\fi\fi}
+
+\chardef\Ihat 206
+\chardef\ihat 238
+
+\let\oritexthat=\^ % defined in plain (or csplain after \csaccents)
+\def\^#1{\ifx I#1\Ihat\else\ifx i#1\ihat\else \oritexthat{#1}\fi\fi}
+
+\ifx\mubyte\undefined \expandafter \endinput \fi
+
+% It seems to be usable to interpret these characterss as UTF-8 codes:
+% The characters defined PlainTeX and csplain are set already.
+
+\mubyte \ellipsis ^^e2^^80^^a6\endmubyte
+\mubyte \textbullet ^^e2^^80^^a2\endmubyte
+\mubyte \sterling ^^c2^^a3\endmubyte
+\mubyte \euro ^^e2^^82^^ac\endmubyte
+\mubyte \trademark ^^e2^^84^^a2\endmubyte
+\mubyte \registered ^^c2^^ae\endmubyte
+\mubyte \currency ^^c2^^a4\endmubyte
+
+% end of file
diff --git a/Master/texmf-dist/tex/csplain/fonts/chelvet.tex b/Master/texmf-dist/tex/csplain/fonts/chelvet.tex
new file mode 100644
index 00000000000..38b9988dc1f
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/chelvet.tex
@@ -0,0 +1,60 @@
+% The file chelvet.tex (C) Petr Olsak, 1996, 1999, 2012
+% Use "\input chelvet" to set the Helvetica fonts family in text mode
+
+\message{FONT: Helvetica -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\tt,
+ \string\cond\string\rm, ..., \string\cond\string\bi, \string\narrow.}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded
+ \def\tmp{8t \sizespec}\def\tmpa{8t \sizespec}
+\else \def\tmp{8z \sizespec}\def\tmpa{8u \sizespec}
+\fi
+
+\font\tenrm=phvr\tmp
+\font\tenbf=phvb\tmp
+\font\tenit=phvro\tmp
+\font\tenbi=phvbo\tmp
+\font\tentt=pcrr\tmpa
+\let\tensl=\tenit
+
+\tenrm
+
+\ifx\font\corkencoded % Narrow variants
+ \font\tenrmn=phvr8tn
+ \font\tenbfn=phvb8tn
+ \font\tenitn=phvro8tn
+ \font\tenbin=phvbo8tn
+\else
+ \font\tenrmn=phvrn8z
+ \font\tenbfn=phvbn8z
+ \font\tenitn=phvron8z
+ \font\tenbin=phvbon8z
+\fi
+
+\ifx\regfont\undefined \else
+ \regfont\tenrmn \regfont\tenitn
+ \regfont\tenbfn \regfont\tenbin
+\fi
+
+\def\narrow{% Switches to Narrow variants
+ \let\tenrm=\tenrmn \let\tenbf=\tenbfn
+ \let\tenit=\tenitn \let\tenbi=\tenbin \tenrm}
+
+\def\cond#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1n\endcsname}
+\def\tenonlytext{ten}
+
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\let\setsimplemath=\relax % this command is obsolete
+
+% The \TeX logo corrected by Ivo Jancik for Helvetica fonts family
+\def\hvTeX{T\kern-.12em\lower.4ex\hbox{E}\kern-0.09emX}
+\ifx\origTeX\undefined \let\origTeX=\TeX \fi
+\let\TeX=\hvTeX
+
+% end of chelvet.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cncent.tex b/Master/texmf-dist/tex/csplain/fonts/cncent.tex
new file mode 100644
index 00000000000..7ff72a57173
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cncent.tex
@@ -0,0 +1,33 @@
+% The file cncent.tex (C) Petr Olsak, 1996, 1999, 2012
+% Use "\input cncent" to set the NewCentury fonts family in text mode
+
+\message{FONT: NewCentury -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\tt.}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded
+ \def\tmp{8t \sizespec}\def\tmpa{8t \sizespec}
+\else \def\tmp{8z \sizespec}\def\tmpa{8u \sizespec}
+\fi
+
+\font\tenrm=pncr\tmp
+\font\tenbf=pncb\tmp
+\font\tenit=pncri\tmp
+\font\tenbi=pncbi\tmp
+\font\tentt=pcrr\tmpa
+\let\tensl=\tenit
+
+\tenrm
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\let\setsimplemath=\relax % this command is obsolete
+
+% The \TeX logo corrected by Ivo Jancik for NewCentury fonts family
+\def\ncTeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX}
+\ifx\origTeX\undefined \let\origTeX=\TeX \fi
+\let\TeX=\ncTeX
+
+% end of cncent.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex b/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex
new file mode 100644
index 00000000000..c8299d91c4c
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex
@@ -0,0 +1,33 @@
+% The file cpalatin.tex (C) Petr Olsak, 1996, 1999, 2012
+% Use "\input cpalatin" to set the Palatino fonts family in text mode
+
+\message{FONT: Palatino -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\tt.}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded
+ \def\tmp{8t \sizespec}\def\tmpa{8t \sizespec}
+\else \def\tmp{8z \sizespec}\def\tmpa{8u \sizespec}
+\fi
+
+\font\tenrm=pplr\tmp
+\font\tenbf=pplb\tmp
+\font\tenit=pplri\tmp
+\font\tenbi=pplbi\tmp
+\font\tentt=pcrr\tmpa
+\let\tensl=\tenit
+
+\tenrm
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\let\setsimplemath=\relax % this command is obsolete
+
+% The \TeX logo corrected by Ivo Jancik for Palatino fonts family
+\def\palTeX{T\kern-.1667em\lower.3333ex\hbox{E}\kern-.125emX}
+\ifx\origTeX\undefined \let\origTeX=\TeX \fi
+\let\TeX=\palTeX
+
+% end of cpalatin.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex b/Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex
new file mode 100644
index 00000000000..ed0d9b7ac4b
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex
@@ -0,0 +1,36 @@
+% The file cs-adventor.tex (C) Petr Olsak, 2012
+% Use "\input cs-adventor" to set the Termes fonts family in text mode
+
+\message{FONT: Adventor -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded \def\famname{texgyreadventor} \input unifam
+\else
+
+\font\tenrm=\tmp-qagr \sizespec
+\font\tenbf=\tmp-qagb \sizespec
+\font\tenit=\tmp-qagri \sizespec
+\font\tenbi=\tmp-qagbi \sizespec
+
+\font\tenrmc=\tmp-qagr-sc \sizespec
+\font\tenbfc=\tmp-qagb-sc \sizespec
+\font\tenitc=\tmp-qagri-sc \sizespec
+\font\tenbic=\tmp-qagbi-sc \sizespec
+
+\fi
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-adventor.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-all.tex b/Master/texmf-dist/tex/csplain/fonts/cs-all.tex
new file mode 100644
index 00000000000..b30ade6c19c
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-all.tex
@@ -0,0 +1,35 @@
+% cs-all.tex : reports about font-macro-files only
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+% If you make your new font-macro-file, add the information about it here,
+% please
+
+\newtoks\ttoks
+\def\w#1#2#3{\ttoks{#3}\immediate\write16{#1 : \space== #2 ==}
+ \immediate\write16{\space\space\space\the\ttoks}}
+
+\immediate\write16{----------- Font packages from csplain available -----------}
+\w{ctimes}{Times}{\rm, \it, \bf, \bi, \tt}
+\w{cavant}{AvantGarde}{\rm, \it, \bf, \bi, \tt}
+\w{cbookman}{Bookman}{\rm, \it, \bf, \bi, \tt}
+\w{chelvet}{Helvetica}{\rm, \it, \bf, \bi, \tt, \cond\rm, ..., \cond\bi}
+\w{cncent}{NewCentury}{\rm, \it, \bf, \bi, \tt}
+\w{cpalatin}{Palatino}{\rm, \it, \bf, \bi, \tt.}
+\w{cs-bera}{Bera}{\rm, \it, \bf, \bi, \rms, ..., \bis, \tt, \ttit, \ttbf, \ttbi}
+\w{cs-arev}{ArevSans}{\rm, \it, \bf, \bi}
+\w{cs-charter}{Charter}{\rm, \it, \bf, \bi}
+\w{cs-antt}{Antykwa Torunska}{\rm, \it, \bf, \bi, \lr, \li, \mr, \mi, \caps\rm...}
+\w{cs-polta}{Antykwa Poltawskiego}{\rm,\it,\bf,\bi,\lr,\li,\mr,\mi,\caps\rm...}
+\w{cs-termes}{TeX Gyre Termes}{\rm, \it, \bf, \bi, \caps\rm, ...}
+\w{cs-adventor}{TeX Gyre Adventor}{\rm, \it, \bf, \bi, \caps\rm, ...}
+\w{cs-bonum}{TeX Gyre Bonum}{\rm, \it, \bf, \bi, \caps\rm, ...}
+\w{cs-heros}{TeX Grye Heros}{\rm, \it, \bf, \bi, \caps\rm, ..., \narrow}
+\w{cs-pagella}{TeX Gyre Pagella}{\rm, \it, \bf, \bi, \caps\rm, ...}
+\w{cs-schola}{TeX Gyre Schola}{\rm, \it, \bf, \bi, \caps\rm, ...}
+\w{cs-cursor}{TeX Gyre Cursor}{\rm, \it, \bf, \bi, \caps\rm, ...}
+\w{lmfonts}{Latin Modern}{\rm, \it, \bf, \bi + math}
+\w{tx-math}{TX math fonts}{14 families, \mathchardef's prepared. Loaded automatically.}
+\w{ams-math}{AMS math fonts}{12 families, \mathchardef's prepared. You can load it.}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex b/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex
new file mode 100644
index 00000000000..3304fa32fba
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex
@@ -0,0 +1,56 @@
+% cs-antt.tex: fonts loading file of Antykwa Torunska
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\message{FONT: Antykwa Torunska -
+ \string\rm, \string\it, \string\bf, \string\bi,
+ \string\lr, \string\li, \string\mr, \string\mi,
+ \string\caps\string\rm...}
+
+\font\tenrm=\tmp-anttr \sizespec
+\font\tenbf=\tmp-anttb \sizespec
+\font\tenit=\tmp-anttri \sizespec
+\font\tenbi=\tmp-anttbi \sizespec
+
+\font\tenlr=\tmp-anttl \sizespec \def\lr{\tenlr}
+\font\tenli=\tmp-anttli \sizespec \def\li{\tenli}
+\font\tenmr=\tmp-anttm \sizespec \def\mr{\tenmr}
+\font\tenmi=\tmp-anttmi \sizespec \def\mi{\tenmi}
+
+\font\tenrmc=\tmp-anttrcap \sizespec
+\font\tenbfc=\tmp-anttbcap \sizespec
+\font\tenitc=\tmp-anttricap \sizespec
+\font\tenbic=\tmp-anttbicap \sizespec
+
+\font\tenlrc=\tmp-anttlcap \sizespec
+\font\tenlic=\tmp-anttlicap \sizespec
+\font\tenmrc=\tmp-anttmcap \sizespec
+\font\tenmic=\tmp-anttmicap \sizespec
+
+\tenrm
+
+% You can use \cap\rm, \cap\bf, \cap\li
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\regfont\undefined \else
+ \regfont\tenlr \regfont\tenli
+ \regfont\tenmr \regfont\tenmi
+ \regfont\tenrmc \regfont\tenitc
+ \regfont\tenbfc \regfont\tenbic
+ \regfont\tenlrc \regfont\tenlic
+ \regfont\tenmrc \regfont\tenmic
+\fi
+
+\def\txr{cs-anttr} \def\txmi{mi-anttri}
+\def\txb{cs-anttb} \def\txbi{mi-anttbi}
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+% end of cs-antt.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex b/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex
new file mode 100644
index 00000000000..d0b1cf6fae9
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex
@@ -0,0 +1,21 @@
+% cs-arev.tex: fonts loading file of ArevSans
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{8t \sizespec}\else
+ \errmessage{ArevSans is unavailable at CS-encoding. use \noexpand\input t1code.}
+\fi
+
+\message{FONT: ArevSans -
+ \string\rm, \string\it, \string\bf, \string\bi\space and math loaded.}
+
+\font\tenrm=favr\tmp
+\font\tenbf=favb\tmp
+\font\tenit=favri\tmp
+\font\tenbi=favbi\tmp
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+
+% end of cs-arev.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex b/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex
new file mode 100644
index 00000000000..623795823fb
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex
@@ -0,0 +1,42 @@
+% cs-bera.tex: fonts loading file of Bera fonts
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{8t \sizespec}\else
+ \errhelp{If you like this font you can try to generate the 8z metrics.}
+ \errmessage{Bera is unavailable at CS-encoding. use \noexpand\input t1code}
+\fi
+
+\message{FONT: Bera
+ \string\rm, \string\it, \string\bf, \string\bi,
+ \string\rms, \string\its, \string\bfs, \string\bis,
+ \string\tt, \string\ttit, \string\ttbf, \string\ttbi.}
+
+\font\tenrm=fver\tmp
+\font\tenbf=fveb\tmp
+\font\tenit=fvero\tmp
+\font\tenbi=fvebo\tmp
+
+\font\tenrms=fvsr\tmp \def\rms{\tenrms}
+\font\tenbfs=fvsb\tmp \def\bfs{\tenbfs}
+\font\tenits=fvsro\tmp \def\its{\tenits}
+\font\tenbis=fvsbo\tmp \def\bis{\tenbis}
+
+\font\tentt=fvsr\tmp
+\font\tenttbf=fvsb\tmp \def\ttbf{\tenttbf}
+\font\tenttit=fvsro\tmp \def\ttit{\tenttit}
+\font\tenttbi=fvsbo\tmp \def\ttbi{\tenttbi}
+
+\ifx\regfont\undefined \else
+ \regfont\tenrm \regfont\tenit
+ \regfont\tenbf \regfont\tenbi
+ \regfont\tenrms \regfont\tenits
+ \regfont\tenbfs \regfont\tenbis
+ \regfont\tentt \regfont\tenttit
+ \regfont\tenttbf \regfont\tenttbi
+\fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-bera.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex b/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex
new file mode 100644
index 00000000000..c563c5917fd
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex
@@ -0,0 +1,36 @@
+% The file cs-bonum.tex (C) Petr Olsak, 2012
+% Use "\input cs-bonum" to set the Termes fonts family in text mode
+
+\message{FONT: Bonum -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded \def\famname{texgyrebonum} \input unifam
+\else
+
+\font\tenrm=\tmp-qbkr \sizespec
+\font\tenbf=\tmp-qbkb \sizespec
+\font\tenit=\tmp-qbkri \sizespec
+\font\tenbi=\tmp-qbkbi \sizespec
+
+\font\tenrmc=\tmp-qbkr-sc \sizespec
+\font\tenbfc=\tmp-qbkb-sc \sizespec
+\font\tenitc=\tmp-qbkri-sc \sizespec
+\font\tenbic=\tmp-qbkbi-sc \sizespec
+
+\fi
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-bonum.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex b/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex
new file mode 100644
index 00000000000..30a283c3033
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex
@@ -0,0 +1,20 @@
+% cs-charter.tex: fonts loading file of Charter fonts
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{8t \sizespec}\else \def\tmp{8z \sizespec}\fi
+
+\message{FONT: Charter -
+ \string\rm, \string\it, \string\bf, \string\bi}
+
+\font\tenrm=bchr\tmp
+\font\tenbf=bchb\tmp
+\font\tenit=bchri\tmp
+\font\tenbi=bchbi\tmp
+
+\tenrm
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-charter.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex b/Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex
new file mode 100644
index 00000000000..d0fb9382978
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex
@@ -0,0 +1,31 @@
+% The file cs-cursor.tex (C) Petr Olsak, 2012
+% Use "\input cs-cursor" to set the Termes fonts family in text mode
+
+\message{FONT: Termes -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\font\tenrm=\tmp-qcrr \sizespec
+\font\tenbf=\tmp-qcrb \sizespec
+\font\tenit=\tmp-qcrri \sizespec
+\font\tenbi=\tmp-qcrbi \sizespec
+
+\font\tenrmc=\tmp-qcrr-sc \sizespec
+\font\tenbfc=\tmp-qcrb-sc \sizespec
+\font\tenitc=\tmp-qcrri-sc \sizespec
+\font\tenbic=\tmp-qcrbi-sc \sizespec
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-cursor.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
new file mode 100644
index 00000000000..9db72673eae
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
@@ -0,0 +1,57 @@
+% The file cs-heros.tex (C) Petr Olsak, 2012
+% Use "\input cs-heros" to set the Termes fonts family in text mode
+
+\message{FONT: Heros -
+ \string\rm, \string\it, \string\bf, \string\bi,
+ \string\caps\string\rm..., \string\narrow}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded
+ \def\famname{texgyreheroscn} \input unifam
+ \let\tenrmn=\tenrm \let\tenbfn=\tenbf \let\tenitn=\tenit \let\tenbin=\tenbi
+ \let\tenrmnc=\tenrmc \let\tenbfnc=\tenbfc \let\tenitnc=\tenitc \let\tenbinc=\tenbic
+ \def\famname{texgyreheros} \input unifam
+\else
+
+\font\tenrm=\tmp-qhvr \sizespec
+\font\tenbf=\tmp-qhvb \sizespec
+\font\tenit=\tmp-qhvri \sizespec
+\font\tenbi=\tmp-qhvbi \sizespec
+
+\font\tenrmc=\tmp-qhvr-sc \sizespec
+\font\tenbfc=\tmp-qhvb-sc \sizespec
+\font\tenitc=\tmp-qhvri-sc \sizespec
+\font\tenbic=\tmp-qhvbi-sc \sizespec
+
+\fi
+
+\tenrm
+
+\font\tenrmn=\tmp-qhvcr \sizespec
+\font\tenbfn=\tmp-qhvcb \sizespec
+\font\tenitn=\tmp-qhvcri \sizespec
+\font\tenbin=\tmp-qhvcbi \sizespec
+
+\font\tenrmnc=\tmp-qhvcr-sc \sizespec
+\font\tenbfnc=\tmp-qhvcb-sc \sizespec
+\font\tenitnc=\tmp-qhvcri-sc \sizespec
+\font\tenbinc=\tmp-qhvcbi-sc \sizespec
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\def\narrow{% Switches to Narrow variants
+ \let\tenrm=\tenrmn \let\tenbf=\tenbfn
+ \let\tenit=\tenitn \let\tenbi=\tenbin
+ \let\tenrmc=\tenrmnc \let\tenbfc=\tenbfnc
+ \let\tenitc=\tenitnc \let\tenbic=\tenbinc \tenrm}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-heros.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex b/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex
new file mode 100644
index 00000000000..dde3b41c317
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex
@@ -0,0 +1,36 @@
+% The file cs-pagella.tex (C) Petr Olsak, 2012
+% Use "\input cs-pagella" to set the Termes fonts family in text mode
+
+\message{FONT: Pagella -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded \def\famname{texgyrepagella} \input unifam
+\else
+
+\font\tenrm=\tmp-qplr \sizespec
+\font\tenbf=\tmp-qplb \sizespec
+\font\tenit=\tmp-qplri \sizespec
+\font\tenbi=\tmp-qplbi \sizespec
+
+\font\tenrmc=\tmp-qplr-sc \sizespec
+\font\tenbfc=\tmp-qplb-sc \sizespec
+\font\tenitc=\tmp-qplri-sc \sizespec
+\font\tenbic=\tmp-qplbi-sc \sizespec
+
+\fi
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-pagella.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex b/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
new file mode 100644
index 00000000000..01d38d03de0
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
@@ -0,0 +1,58 @@
+% cs-polta.tex: fonts loading file of Antykwa Poltawskiego
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\message{FONT: Antykwa Poltawskiego -
+ \string\rm,\string\it,\string\bf,\string\bi,%
+ \string\lr,\string\li,\string\mr,\string\mi,%
+ \string\caps\string\rm...}
+
+\ifx\dgsize\undefined \def\dgsize{10}\fi
+
+\font\tenrm=\tmp-antpr\dgsize \space\sizespec
+\font\tenbf=\tmp-antpb\dgsize \space\sizespec
+\font\tenit=\tmp-antpri\dgsize \space\sizespec
+\font\tenbi=\tmp-antpbi\dgsize \space\sizespec
+
+\font\tenlr=\tmp-antpl\dgsize \space\sizespec \def\lr{\tenlr}
+\font\tenli=\tmp-antpli\dgsize \space\sizespec \def\li{\tenli}
+\font\tenmr=\tmp-antpm\dgsize \space\sizespec \def\mr{\tenmr}
+\font\tenmi=\tmp-antpmi\dgsize \space\sizespec \def\mi{\tenmi}
+
+\font\tenrmc=\tmp-antpr\dgsize-sc \sizespec
+\font\tenbfc=\tmp-antpb\dgsize-sc \sizespec
+\font\tenitc=\tmp-antpri\dgsize-sc \sizespec
+\font\tenbic=\tmp-antpbi\dgsize-sc \sizespec
+
+\font\tenlrc=\tmp-antpl\dgsize-sc \sizespec
+\font\tenlic=\tmp-antpli\dgsize-sc \sizespec
+\font\tenmrc=\tmp-antpm\dgsize-sc \sizespec
+\font\tenmic=\tmp-antpmi\dgsize-sc \sizespec
+
+\tenrm
+
+% You can use \cap\rm, \cap\bf, \cap\li
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\regfont\undefined \else
+ \regfont\tenrm \regfont\tenit
+ \regfont\tenbf \regfont\tenbi
+ \regfont\tenlr \regfont\tenli
+ \regfont\tenmr \regfont\tenmi
+ \regfont\tenrmc \regfont\tenitc
+ \regfont\tenbfc \regfont\tenbic
+ \regfont\tenlrc \regfont\tenlic
+ \regfont\tenmrc \regfont\tenmic
+\fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+% end of cs-polta.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex b/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex
new file mode 100644
index 00000000000..8c5504a56e4
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex
@@ -0,0 +1,36 @@
+% The file cs-schola.tex (C) Petr Olsak, 2012
+% Use "\input cs-schola" to set the Termes fonts family in text mode
+
+\message{FONT: Schola -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded \def\famname{texgyreschola} \input unifam
+\else
+
+\font\tenrm=\tmp-qcsr \sizespec
+\font\tenbf=\tmp-qcsb \sizespec
+\font\tenit=\tmp-qcsri \sizespec
+\font\tenbi=\tmp-qcsbi \sizespec
+
+\font\tenrmc=\tmp-qcsr-sc \sizespec
+\font\tenbfc=\tmp-qcsb-sc \sizespec
+\font\tenitc=\tmp-qcsri-sc \sizespec
+\font\tenbic=\tmp-qcsbi-sc \sizespec
+
+\fi
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-schola.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex b/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex
new file mode 100644
index 00000000000..eb2a6e83e86
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex
@@ -0,0 +1,36 @@
+% The file cs-termes.tex (C) Petr Olsak, 2012
+% Use "\input cs-termes" to set the Termes fonts family in text mode
+
+\message{FONT: Termes -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded \def\famname{texgyretermes} \input unifam
+\else
+
+\font\tenrm=\tmp-qtmr \sizespec
+\font\tenbf=\tmp-qtmb \sizespec
+\font\tenit=\tmp-qtmri \sizespec
+\font\tenbi=\tmp-qtmbi \sizespec
+
+\font\tenrmc=\tmp-qtmr-sc \sizespec
+\font\tenbfc=\tmp-qtmb-sc \sizespec
+\font\tenitc=\tmp-qtmri-sc \sizespec
+\font\tenbic=\tmp-qtmbi-sc \sizespec
+
+\fi
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+% end of cs-termes.tex
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/ctimes.tex b/Master/texmf-dist/tex/csplain/fonts/ctimes.tex
new file mode 100644
index 00000000000..f9a85683fcb
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/ctimes.tex
@@ -0,0 +1,34 @@
+% The file ctimes.tex (C) Petr Olsak, 1996, 1999, 2012
+% Use "\input ctimes" to set the Times fonts family in text mode
+
+\message{FONT: Times -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\tt.}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+\ifx\font\corkencoded
+ \def\tmp{8t \sizespec}\def\tmpa{8t \sizespec}
+\else \def\tmp{8z \sizespec}\def\tmpa{8u \sizespec}
+\fi
+
+\font\tenrm=ptmr\tmp
+\font\tenbf=ptmb\tmp
+\font\tenit=ptmri\tmp
+\font\tenbi=ptmbi\tmp
+\font\tentt=pcrr\tmpa
+\let\tensl=\tenit
+
+\tenrm
+
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\normalTXmath\undefined \input tx-math \else\normalTXmath \fi
+
+\let\setsimplemath=\relax % this command is obsolete
+
+% The \TeX logo corrected by Ivo Jancik for Times fonts family
+\def\tmTeX{T\kern-.1667em\lower.3333ex\hbox{E}\kern-.125emX}
+\ifx\origTeX\undefined \let\origTeX=\TeX \fi
+\let\TeX=\tmTeX
+
+% end of ctimes.tex
+
diff --git a/Master/texmf-dist/tex/csplain/base/dcfonts.tex b/Master/texmf-dist/tex/csplain/fonts/dcfonts.tex
index 55a3c9288cc..55a3c9288cc 100644
--- a/Master/texmf-dist/tex/csplain/base/dcfonts.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/dcfonts.tex
diff --git a/Master/texmf-dist/tex/csplain/base/ecfonts.tex b/Master/texmf-dist/tex/csplain/fonts/ecfonts.tex
index 4e784ca4bff..4e784ca4bff 100644
--- a/Master/texmf-dist/tex/csplain/base/ecfonts.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/ecfonts.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex b/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex
new file mode 100644
index 00000000000..36f8b69662b
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex
@@ -0,0 +1,70 @@
+% lmfonts.tex: loads Latin Modern fonts by plainTeX macros
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\message{FONT: Latin Modern fonts -
+ \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm,... + math.}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+
+\ifx\regtfm\undefined \input ams-math \fi
+\ifx\font\corkencoded \else \input chars-8z \fi
+
+\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+
+\ifx\font\unicoded \def\famname{lmroman10} \input unifam
+ \font\tentt="[lmmono10-regular]" \sizespec
+\else
+ \font\tenrm=\tmp-lmr10 \sizespec
+ \font\tenbf=\tmp-lmbx10 \sizespec
+ \font\tenit=\tmp-lmri10 \sizespec
+ \font\tenbi=\tmp-lmbxi10 \sizespec
+ \ifx\font\corkencoded
+ \font\tentt=\tmp-lmtt10 \sizespec
+ \else
+ \font\tentt=cstt10 \sizespec % there is no right-encoded LMfont
+ \fi
+ \font\tenrmc=\tmp-lmcsc10 \sizespec
+ \font\tenitc=\tmp-lmcsco10 \sizespec
+\fi
+
+\tenrm
+
+\def\caps#1{{\escapechar=-1 \expandafter}%
+ \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
+\def\tenonlytext{ten}
+
+\def\exregtfm #1*{\edef\tmpa{#1*}\expandafter\regtfm\tmpa}
+
+\exregtfm cmr 0 \tmp-lmr5 5.5 \tmp-lmr6 6.5 \tmp-lmr7 7.5 \tmp-lmr8 8.5
+ \tmp-lmr9 9.5 \tmp-lmr10 11.1 \tmp-lmr12 15 \tmp-lmr17 *
+\exregtfm cmbx 0 \tmp-lmbx5 5.5 \tmp-lmbx6 6.5 \tmp-lmbx7 7.5 \tmp-lmbx8 8.5
+ \tmp-lmbx9 9.5 \tmp-lmbx10 11.1 \tmp-lmbx12 *
+\exregtfm cmsl 0 \tmp-lmro8 8.5 \tmp-lmro9 9.5 \tmp-lmro10 11.1
+ \tmp-lmro12 15 \tmp-lmro17 *
+\exregtfm cmtt 0 \tmp-lmtt8 8.5 \tmp-lmtt9 9.5 \tmp-lmtt10 11.1 \tmp-lmtt12 *
+\exregtfm cmss 0 \tmp-lmss8 8.5 \tmp-lmss9 9.5 \tmp-lmss10 11.1 \tmp-lmss12 15
+ \tmp-lmss17 *
+\exregtfm cmssi 0 \tmp-lmsso8 8.5 \tmp-lmsso9 9.5 \tmp-lmsso10 11.1
+ \tmp-lmsso12 15 \tmp-lmsso17 *
+\exregtfm cmti 0 \tmp-lmri7 7.5 \tmp-lmri8 8.5 \tmp-lmri9 9.5
+ \tmp-lmri10 11.1 \tmp-lmri12 *
+\exregtfm cmbxti 0 \tmp-lmbxi10 *
+% CM math fonts
+\regtfm cmmi 0 lmmi5 5.5 lmmi6 6.5 lmmi7 7.5 lmmi8 8.5 lmmi9 9.5
+ lmmi10 11.1 lmmi12 *
+\regtfm cmmib 0 lmmib5 6 lmmib7 8.5 lmmib10 *
+\regtfm cmsy 0 lmsy5 5.5 lmsy6 6.5 lmsy7 7.5 lmsy8 8.5 lmsy9 9.5
+ lmsy10 *
+\regtfm cmbsy 0 lmbsy5 6 lmbsy7 8.5 lmbsy10 *
+\regtfm cmex 0 lmex10 *
+\regtfm cmexb 0 lmex10 *
+% Fonts Other
+\exregtfm bfsans 0 \tmp-lmssbx10 *
+\exregtfm bisans 0 \tmp-lmssbo10 *
+\exregtfm bbfsans 0 \tmp-lmssbx10 *
+\exregtfm bbisans 0 \tmp-lmssbo10 *
+
+\let\lmfonts=\font % macros can do test: \ifx\font\lmfonts ...
+
+% end of lmfonts.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/luafonts.tex b/Master/texmf-dist/tex/csplain/fonts/luafonts.tex
new file mode 100644
index 00000000000..cc157a5b1e0
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/luafonts.tex
@@ -0,0 +1,27 @@
+% I don't understand this. This is a result of my reverse engeneering of the
+% fontspec package.
+% LuaTeX needs these \directlua in order to \font primitive works like in XeTeX.
+% Petr Olsak Nov. 2012
+
+%\iffalse
+\message{processing luaotfload.lua }
+\directlua{luatexbase = luatexbase or {}
+ luatexbase.luatexversion = \the\luatexversion\space
+ luatexbase.luatexrevision = \luatexrevision\space
+ require('luatexbase.attr')
+ require('luatexbase.cctb')
+ require('luatexbase.modutils')
+ oriwrite = texio.write_nl % I don't need to see unusual info
+ function texio.write_nl(...) end
+ require('luatexbase.mcb')
+ luatexbase.require_module('lualibs')
+ luatexbase.require_module('luaotfload')
+ texio.write_nl = oriwrite % return to original meaning
+}
+%\fi
+%\directlua {
+% dofile(kpse.find_file("luatex-fonts.lua","tex"))
+%}
+\global\let\luafonts=\relax
+
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/tx-math.tex b/Master/texmf-dist/tex/csplain/fonts/tx-math.tex
new file mode 100644
index 00000000000..e02a1bc3796
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/tx-math.tex
@@ -0,0 +1,710 @@
+% This file loads TX math fonts by plainTeX macros
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+\message{FONT: TX math fonts - \string\mathchardef's prepared, 14 math families preloaded.}
+
+% After \input tx-math
+%
+% you can use hundreds characters from TX math fonts
+% (see TX Fonts manual or \mathchardefs below).
+% By default: - the fonts are loaded at 10/7/5 sizes.
+% - variables are typeset by current text italic,
+% - digits and \sin, \cos, etc. are typeset by current text rm
+%
+% You can use the following alphabets:
+% \mit ...... mathematical variables
+% \rm, \it .. text roman font, text italic
+% \bf, \bi .. bold sans fonts (may be different than text fonts)
+% \cal ... normal calligraphics
+% \script ... script
+% \frak ... fraktur
+% \bbchar ... double stroked letters
+%
+% You can reload all families of math fonts in two shapes:
+% \normalmath ... normal shape
+% \boldmath ... bold shape at implicit sizes or sizes set by
+% Before reloading the fonts by previous comand you can set the sizes:
+% \setmathsizes[text/script/scriptscript]
+% Example \setmathsizes[12/8.4/6]\normalmath ... load fonts at given sizes
+%
+% You can set typesetting of math variables from TX font, not from current
+% text font, by the command: \mitvariables. The \itvariables reverts to the
+% default.
+
+\def\normalmath{%
+ \loadmathfamily 0 {\txr} % TX Roman
+ \loadmathfamily 1 {\txmi} % TX Math Italic
+ \loadmathfamily 2 txsy % TX Standard symbols
+ \loadmathfamily 3 txex % TX extra symbols
+ \loadmathfamily 4 txsya % TX symbols from AMSTeX
+ \loadmathfamily 5 txsyb % TX symbols from AMSTeX
+ \loadmathfamily 6 txsyc % symbols from TX fonts
+ \loadmathfamily 7 txexa % TX new extra symbols
+ \loadmathfamily 8 txmia % fraktur, upright greek
+ \loadmathfamily 9 rsfs10 % script
+ \loadmathfamily 10 {\bfsans} % sans serif bold
+ \loadmathfamily 11 {\bisans} % sans serif bold slanted (for vectors)
+ \chardef\rmfam 12 \setmathfamily \rmfam \tenrm
+ \chardef\itfam 13 \setmathfamily \itfam \tenit
+ \setmathdimens
+}
+\def\boldmath{%
+ \loadmathfamily 0 {\txb} % TX Roman
+ \loadmathfamily 1 {\txbmi} % TX Math Italic
+ \loadmathfamily 2 txbsy % TX Standard symbols
+ \loadmathfamily 3 txbex % TX extra symbols
+ \loadmathfamily 4 txbsya % TX symbols from AMSTeX
+ \loadmathfamily 5 txbsyb % TX symbols from AMSTeX
+ \loadmathfamily 6 txbsyc % symbols from TX fonts
+ \loadmathfamily 7 txbexa % TX new extra symbols
+ \loadmathfamily 8 txbmia % fraktur, upright greek
+ \loadmathfamily 9 rsfs10 % \bf script is unavailable
+ \loadmathfamily 10 {\bbfsans} % sans serif bold
+ \loadmathfamily 11 {\bbisans} % sans serif bold slanted (for vectors)
+ \chardef\rmfam 12 \setmathfamily \rmfam \tenbf
+ \chardef\itfam 13 \setmathfamily \itfam \tenbi
+ \setmathdimens
+}
+\count18=13 % families declared by \newfam are 14, 15 only
+
+\let\normalTXmath=\normalmath \let\boldTXmath=\boldmath
+
+\chardef\bffam 10 % sans serif bold
+\chardef\bifam 11 % sans serif bold slanted
+\def\bi{\tenbi \fam\bifam} % in csplain is done \def\bi{\tenbi} only
+\def\bbchar{\fam5 } % double stroked letters
+\def\frak{\fam8 } % fraktur
+\def\script{\fam9 } % more extensive script than \cal
+\chardef\slfam 10 % similar to slanted font from plainTeX
+\chardef\ttfam 13 % \tt in math is unusable
+
+% Macro engineer can define the \fam0, \fam1, \bffam and \bifam fonts
+% by his opinion. For example: \def\txr{cs-anttr} \def\txmi{mi-anttri}
+% in cs-antt.tex file. The following vaules are only defaults:
+
+\def\txxdef#1#2{\ifx#1\undefined\def#1{#2}\fi}
+
+\txxdef\txr{txr}\txxdef\txmi{txmi} % \fam0, \fam1 normal
+\txxdef\txb{txb}\txxdef\txbmi{txbmi} % \fam0, \fam1 bold
+\txxdef\bfsans{phvb8z}\txxdef\bisans{phvbo8z} % \bffam, \bifam normal
+\txxdef\bbfsans{phvb8z}\txxdef\bbisans{phvbo8z} % \bffam, \bifam bold
+\ifx\corrmsizes\undefined % wee need to correct
+ \def\corrmsizes#1{\ifnum#1=10 \ptmunit=.83pt \fi % the sizes o phvb8t and
+ \ifnum#1=11 \ptmunit=.83pt \fi} % phvbo8t fonts
+\fi
+
+% macros:
+
+\def\itvariables{\def\rm{\fam\rmfam \tenrm}%
+ \mathcodechanges C:0-9\mathcodechanges D:A-Z\mathcodechanges D:a-z}
+\def\mitvariables{\def\rm{\fam0\tenrm}%
+ \mathcodechanges 0:0-9\mathcodechanges 1:A-Z\mathcodechanges 1:a-z}
+
+\def\loadmathfamily #1 #2 {\corrmsizes{#1}%
+ \font\tmp = #2 at\sizemtext \textfont#1=\tmp
+ \font\tmp = #2 at\sizemscript \scriptfont#1=\tmp
+ \font\tmp = #2 at\sizemsscript \scriptscriptfont#1=\tmp
+ \ptmunit=1pt
+}
+\def\setmathfamily #1#2{%
+ \font\tmp = \specfontname #2 at\sizemtext \textfont#1=\tmp
+ \font\tmp = \specfontname #2 at\sizemscript \scriptfont#1=\tmp
+ \font\tmp = \specfontname #2 at\sizemsscript \scriptscriptfont#1=\tmp
+}
+\def\specfontname #1{\expandafter \ignoreatpt \fontname #1 \relax}
+\def\ignoreatpt #1 #2\relax{#1}
+\def\mathcodechanges#1:#2-#3{\chardef\tmp=\count0 \chardef\tmpa=\count1
+ \count0=`#2 \count1=\count0 \advance\count1 by"7#100
+ \loop \mathcode\count0=\count1
+ \ifnum\count0<`#3 \advance\count0 by1 \advance\count1 by1 \repeat
+ \count0=\tmp \count1=\tmpa
+}
+\def\setmathdimens{% PlainTeX sets these dimens for 10pt size only:
+ \delimitershortfall=0.5\fontdimen6\textfont3
+ \nulldelimiterspace=0.12\fontdimen6\textfont3
+ \scriptspace=0.05\fontdimen6\textfont3
+ \skewchar\textfont1=127 \skewchar\scriptfont1=127
+ \skewchar\scriptscriptfont1=127
+ \skewchar\textfont2=48 \skewchar\scriptfont2=48
+ \skewchar\scriptscriptfont2=48
+}
+
+\def\setmathsizes[#1/#2/#3]{%
+ \def\sizemtext{#1\ptmunit}\def\sizemscript{#2\ptmunit}%
+ \def\sizemsscript{#3\ptmunit}%
+}
+\newdimen\ptmunit \ptmunit=1pt
+\setmathsizes[10/7/5]
+
+\ifx\tenbi\undefined \font\tenbi=ptmbi8z \relax \fi
+\normalmath % load families, normal shape
+\itvariables % \rm in math and avriables in math by current text font
+
+%% \mathchardef declarations
+
+\def\amsafam{4} \def\amsbfam{5} \def\txsycfam{6}
+\def\txexafam{7} \def\txmiafam{8}
+
+%% AMSA
+
+\mathchardef \boxdot "2\amsafam 00
+\mathchardef \boxplus "2\amsafam 01
+\mathchardef \boxtimes "2\amsafam 02
+\mathchardef \square "0\amsafam 03
+\mathchardef \blacksquare "0\amsafam 04
+\mathchardef \centerdot "2\amsafam 05
+\mathchardef \lozenge "0\amsafam 06
+\mathchardef \blacklozenge "0\amsafam 07
+\mathchardef \circlearrowright "3\amsafam 08
+\mathchardef \circlearrowleft "3\amsafam 09
+\mathchardef \rightleftharpoons "3\amsafam 0A
+\mathchardef \leftrightharpoons "3\amsafam 0B
+\mathchardef \boxminus "2\amsafam 0C
+\mathchardef \Vdash "3\amsafam 0D
+\mathchardef \Vvdash "3\amsafam 0E
+\mathchardef \vDash "3\amsafam 0F
+\mathchardef \twoheadrightarrow "3\amsafam 10
+\mathchardef \twoheadleftarrow "3\amsafam 11
+\mathchardef \leftleftarrows "3\amsafam 12
+\mathchardef \rightrightarrows "3\amsafam 13
+\mathchardef \upuparrows "3\amsafam 14
+\mathchardef \downdownarrows "3\amsafam 15
+\mathchardef \upharpoonright "3\amsafam 16
+\mathchardef \downharpoonright "3\amsafam 17
+\mathchardef \upharpoonleft "3\amsafam 18
+\mathchardef \downharpoonleft "3\amsafam 19
+\mathchardef \rightarrowtail "3\amsafam 1A
+\mathchardef \leftarrowtail "3\amsafam 1B
+\mathchardef \leftrightarrows "3\amsafam 1C
+\mathchardef \rightleftarrows "3\amsafam 1D
+\mathchardef \Lsh "3\amsafam 1E
+\mathchardef \Rsh "3\amsafam 1F
+\mathchardef \rightsquigarrow "3\amsafam 20
+\mathchardef \leftrightsquigarrow "3\amsafam 21
+\mathchardef \looparrowleft "3\amsafam 22
+\mathchardef \looparrowright "3\amsafam 23
+\mathchardef \circeq "3\amsafam 24
+\mathchardef \succsim "3\amsafam 25
+\mathchardef \gtrsim "3\amsafam 26
+\mathchardef \gtrapprox "3\amsafam 27
+\mathchardef \multimap "3\amsafam 28
+\mathchardef \therefore "3\amsafam 29
+\mathchardef \because "3\amsafam 2A
+\mathchardef \doteqdot "3\amsafam 2B
+\mathchardef \triangleq "3\amsafam 2C
+\mathchardef \precsim "3\amsafam 2D
+\mathchardef \lesssim "3\amsafam 2E
+\mathchardef \lessapprox "3\amsafam 2F
+\mathchardef \eqslantless "3\amsafam 30
+\mathchardef \eqslantgtr "3\amsafam 31
+\mathchardef \curlyeqprec "3\amsafam 32
+\mathchardef \curlyeqsucc "3\amsafam 33
+\mathchardef \preccurlyeq "3\amsafam 34
+\mathchardef \leqq "3\amsafam 35
+\mathchardef \leqslant "3\amsafam 36
+\mathchardef \lessgtr "3\amsafam 37
+\mathchardef \backprime "0\amsafam 38
+\mathchardef \risingdotseq "3\amsafam 3A
+\mathchardef \fallingdotseq "3\amsafam 3B
+\mathchardef \succcurlyeq "3\amsafam 3C
+\mathchardef \geqq "3\amsafam 3D
+\mathchardef \geqslant "3\amsafam 3E
+\mathchardef \gtrless "3\amsafam 3F
+\mathchardef \sqsubset "3\amsafam 40
+\mathchardef \sqsupset "3\amsafam 41
+\mathchardef \vartriangleright "3\amsafam 42
+\mathchardef \vartriangleleft "3\amsafam 43
+\mathchardef \trianglerighteq "3\amsafam 44
+\mathchardef \trianglelefteq "3\amsafam 45
+\mathchardef \bigstar "0\amsafam 46
+\mathchardef \between "3\amsafam 47
+\mathchardef \blacktriangledown "0\amsafam 48
+\mathchardef \blacktriangleright "3\amsafam 49
+\mathchardef \blacktriangleleft "3\amsafam 4A
+\mathchardef \vartriangle "3\amsafam 4D
+\mathchardef \blacktriangle "0\amsafam 4E
+\mathchardef \triangledown "0\amsafam 4F
+\mathchardef \eqcirc "3\amsafam 50
+\mathchardef \lesseqgtr "3\amsafam 51
+\mathchardef \gtreqless "3\amsafam 52
+\mathchardef \lesseqqgtr "3\amsafam 53
+\mathchardef \gtreqqless "3\amsafam 54
+\mathchardef \Rrightarrow "3\amsafam 56
+\mathchardef \Lleftarrow "3\amsafam 57
+\mathchardef \veebar "2\amsafam 59
+\mathchardef \barwedge "2\amsafam 5A
+\mathchardef \doublebarwedge "2\amsafam 5B
+\mathchardef \angle "0\amsafam 5C
+\mathchardef \measuredangle "0\amsafam 5D
+\mathchardef \sphericalangle "0\amsafam 5E
+\mathchardef \varpropto "3\amsafam 5F
+\mathchardef \smallsmile "3\amsafam 60
+\mathchardef \smallfrown "3\amsafam 61
+\mathchardef \Subset "3\amsafam 62
+\mathchardef \Supset "3\amsafam 63
+\mathchardef \Cup "2\amsafam 64
+\mathchardef \Cap "2\amsafam 65
+\mathchardef \curlywedge "2\amsafam 66
+\mathchardef \curlyvee "2\amsafam 67
+\mathchardef \leftthreetimes "2\amsafam 68
+\mathchardef \rightthreetimes "2\amsafam 69
+\mathchardef \subseteqq "3\amsafam 6A
+\mathchardef \supseteqq "3\amsafam 6B
+\mathchardef \bumpeq "3\amsafam 6C
+\mathchardef \Bumpeq "3\amsafam 6D
+\mathchardef \lll "3\amsafam 6E
+\mathchardef \ggg "3\amsafam 6F
+\def \ulcorner {\delimiter"4\amsafam 70\amsafam 70 }
+\def \urcorner {\delimiter"5\amsafam 71\amsafam 71 }
+\mathchardef \circledS "0\amsafam 73
+\mathchardef \pitchfork "3\amsafam 74
+\mathchardef \dotplus "2\amsafam 75
+\mathchardef \backsim "3\amsafam 76
+\mathchardef \backsimeq "3\amsafam 77
+\def \llcorner {\delimiter"4\amsafam 78\amsafam 78 }
+\def \lrcorner {\delimiter"5\amsafam 79\amsafam 79 }
+\mathchardef \complement "0\amsafam 7B
+\mathchardef \intercal "2\amsafam 7C
+\mathchardef \circledcirc "2\amsafam 7D
+\mathchardef \circledast "2\amsafam 7E
+\mathchardef \circleddash "2\amsafam 7F
+\mathchardef \rhd "2\amsafam 42
+\mathchardef \lhd "2\amsafam 43
+\mathchardef \unrhd "2\amsafam 44
+\mathchardef \unlhd "2\amsafam 45
+
+ \let\restriction\upharpoonright
+ \let\Doteq\doteqdot
+ \let\doublecup\Cup
+ \let\doublecap\Cap
+ \let\llless\lll
+ \let\gggtr\ggg
+ \let\Box=\square % LaTeX symbol
+ \let\Box=\square % LaTeX symbol
+
+%% AMSB
+
+\mathchardef \lvertneqq "3\amsbfam 00
+\mathchardef \gvertneqq "3\amsbfam 01
+\mathchardef \nleq "3\amsbfam 02
+\mathchardef \ngeq "3\amsbfam 03
+\mathchardef \nless "3\amsbfam 04
+\mathchardef \ngtr "3\amsbfam 05
+\mathchardef \nprec "3\amsbfam 06
+\mathchardef \nsucc "3\amsbfam 07
+\mathchardef \lneqq "3\amsbfam 08
+\mathchardef \gneqq "3\amsbfam 09
+\mathchardef \nleqslant "3\amsbfam 0A
+\mathchardef \ngeqslant "3\amsbfam 0B
+\mathchardef \lneq "3\amsbfam 0C
+\mathchardef \gneq "3\amsbfam 0D
+\mathchardef \npreceq "3\amsbfam 0E
+\mathchardef \nsucceq "3\amsbfam 0F
+\mathchardef \precnsim "3\amsbfam 10
+\mathchardef \succnsim "3\amsbfam 11
+\mathchardef \lnsim "3\amsbfam 12
+\mathchardef \gnsim "3\amsbfam 13
+\mathchardef \nleqq "3\amsbfam 14
+\mathchardef \ngeqq "3\amsbfam 15
+\mathchardef \precneqq "3\amsbfam 16
+\mathchardef \succneqq "3\amsbfam 17
+\mathchardef \precnapprox "3\amsbfam 18
+\mathchardef \succnapprox "3\amsbfam 19
+\mathchardef \lnapprox "3\amsbfam 1A
+\mathchardef \gnapprox "3\amsbfam 1B
+\mathchardef \nsim "3\amsbfam 1C
+\mathchardef \ncong "3\amsbfam 1D
+\mathchardef \diagup "0\amsbfam 1E
+\mathchardef \diagdown "0\amsbfam 1F
+\mathchardef \varsubsetneq "3\amsbfam 20
+\mathchardef \varsupsetneq "3\amsbfam 21
+\mathchardef \nsubseteqq "3\amsbfam 22
+\mathchardef \nsupseteqq "3\amsbfam 23
+\mathchardef \subsetneqq "3\amsbfam 24
+\mathchardef \supsetneqq "3\amsbfam 25
+\mathchardef \varsubsetneqq "3\amsbfam 26
+\mathchardef \varsupsetneqq "3\amsbfam 27
+\mathchardef \subsetneq "3\amsbfam 28
+\mathchardef \supsetneq "3\amsbfam 29
+\mathchardef \nsubseteq "3\amsbfam 2A
+\mathchardef \nsupseteq "3\amsbfam 2B
+\mathchardef \nparallel "3\amsbfam 2C
+\mathchardef \nmid "3\amsbfam 2D
+\mathchardef \nshortmid "3\amsbfam 2E
+\mathchardef \nshortparallel "3\amsbfam 2F
+\mathchardef \nvdash "3\amsbfam 30
+\mathchardef \nVdash "3\amsbfam 31
+\mathchardef \nvDash "3\amsbfam 32
+\mathchardef \nVDash "3\amsbfam 33
+\mathchardef \ntrianglerighteq "3\amsbfam 34
+\mathchardef \ntrianglelefteq "3\amsbfam 35
+\mathchardef \ntriangleleft "3\amsbfam 36
+\mathchardef \ntriangleright "3\amsbfam 37
+\mathchardef \nleftarrow "3\amsbfam 38
+\mathchardef \nrightarrow "3\amsbfam 39
+\mathchardef \nLeftarrow "3\amsbfam 3A
+\mathchardef \nRightarrow "3\amsbfam 3B
+\mathchardef \nLeftrightarrow "3\amsbfam 3C
+\mathchardef \nleftrightarrow "3\amsbfam 3D
+\mathchardef \divideontimes "2\amsbfam 3E
+\mathchardef \varnothing "0\amsbfam 3F
+\mathchardef \nexists "0\amsbfam 40
+\mathchardef \Finv "0\amsbfam 60
+\mathchardef \Game "0\amsbfam 61
+\mathchardef \mho "0\amsbfam 66
+\mathchardef \eth "0\amsbfam 67
+\mathchardef \eqsim "3\amsbfam 68
+\mathchardef \beth "0\amsbfam 69
+\mathchardef \gimel "0\amsbfam 6A
+\mathchardef \daleth "0\amsbfam 6B
+\mathchardef \lessdot "2\amsbfam 6C
+\mathchardef \gtrdot "2\amsbfam 6D
+\mathchardef \ltimes "2\amsbfam 6E
+\mathchardef \rtimes "2\amsbfam 6F
+\mathchardef \shortmid "3\amsbfam 70
+\mathchardef \shortparallel "3\amsbfam 71
+\mathchardef \smallsetminus "2\amsbfam 72
+\mathchardef \thicksim "3\amsbfam 73
+\mathchardef \thickapprox "3\amsbfam 74
+\mathchardef \approxeq "3\amsbfam 75
+\mathchardef \precapprox "3\amsbfam 76
+\mathchardef \succapprox "3\amsbfam 77
+\mathchardef \curvearrowleft "3\amsbfam 78
+\mathchardef \curvearrowright "3\amsbfam 79
+\mathchardef \digamma "0\amsbfam 7A
+\mathchardef \varkappa "0\amsbfam 7B
+\mathchardef \Bbbk "0\amsbfam 7C
+\mathchardef \hslash "0\amsbfam 7D
+\mathchardef \hbar "0\amsbfam 7E
+\mathchardef \backepsilon "3\amsbfam 7F
+
+%% TXC
+
+\mathchardef \mappedfromchar "3\txsycfam 00
+\mathchardef \Mapstochar "3\txsycfam 01
+\mathchardef \Mappedfromchar "3\txsycfam 02
+\mathchardef \mmapstochar "3\txsycfam 03
+\mathchardef \mmappedfromchar "3\txsycfam 04
+\mathchardef \Mmapstochar "3\txsycfam 05
+\mathchardef \Mmappedfromchar "3\txsycfam 06
+\mathchardef \medcirc "2\txsycfam 07
+\mathchardef \medbullet "2\txsycfam 08
+\mathchardef \varparallel "3\txsycfam 09
+\mathchardef \varparallelinv "3\txsycfam 0A
+\mathchardef \nvarparallel "3\txsycfam 0B
+\mathchardef \nvarparallelinv "3\txsycfam 0C
+\mathchardef \colonapprox "3\txsycfam 0D
+\mathchardef \colonsim "3\txsycfam 0E
+\mathchardef \Colonapprox "3\txsycfam 0F
+\mathchardef \Colonsim "3\txsycfam 10
+\mathchardef \doteq "3\txsycfam 11
+\mathchardef \multimapinv "3\txsycfam 12
+\mathchardef \multimapboth "3\txsycfam 13
+\mathchardef \multimapdot "3\txsycfam 14
+\mathchardef \multimapdotinv "3\txsycfam 15
+\mathchardef \multimapdotboth "3\txsycfam 16
+\mathchardef \multimapdotbothA "3\txsycfam 17
+\mathchardef \multimapdotbothB "3\txsycfam 18
+\mathchardef \VDash "3\txsycfam 19
+\mathchardef \VvDash "3\txsycfam 1A
+\mathchardef \cong "3\txsycfam 1B
+\mathchardef \preceqq "3\txsycfam 1C
+\mathchardef \succeqq "3\txsycfam 1D
+\mathchardef \nprecsim "3\txsycfam 1E
+\mathchardef \nsuccsim "3\txsycfam 1F
+\mathchardef \nlesssim "3\txsycfam 20
+\mathchardef \ngtrsim "3\txsycfam 21
+\mathchardef \nlessapprox "3\txsycfam 22
+\mathchardef \ngtrapprox "3\txsycfam 23
+\mathchardef \npreccurlyeq "3\txsycfam 24
+\mathchardef \nsucccurlyeq "3\txsycfam 25
+\mathchardef \ngtrless "3\txsycfam 26
+\mathchardef \nlessgtr "3\txsycfam 27
+\mathchardef \nbumpeq "3\txsycfam 28
+\mathchardef \nBumpeq "3\txsycfam 29
+\mathchardef \nbacksim "3\txsycfam 2A
+\mathchardef \nbacksimeq "3\txsycfam 2B
+\mathchardef \neq "3\txsycfam 2C
+\mathchardef \nasymp "3\txsycfam 2D
+\mathchardef \nequiv "3\txsycfam 2E
+\mathchardef \nsim "3\txsycfam 2F
+\mathchardef \napprox "3\txsycfam 30
+\mathchardef \nsubset "3\txsycfam 31
+\mathchardef \nsupset "3\txsycfam 32
+\mathchardef \nll "3\txsycfam 33
+\mathchardef \ngg "3\txsycfam 34
+\mathchardef \nthickapprox "3\txsycfam 35
+\mathchardef \napproxeq "3\txsycfam 36
+\mathchardef \nprecapprox "3\txsycfam 37
+\mathchardef \nsuccapprox "3\txsycfam 38
+\mathchardef \npreceqq "3\txsycfam 39
+\mathchardef \nsucceqq "3\txsycfam 3A
+\mathchardef \nsimeq "3\txsycfam 3B
+\mathchardef \notin "3\txsycfam 3C
+\mathchardef \notni "3\txsycfam 3D
+\mathchardef \nSubset "3\txsycfam 3E
+\mathchardef \nSupset "3\txsycfam 3F
+\mathchardef \nsqsubseteq "3\txsycfam 40
+\mathchardef \nsqsupseteq "3\txsycfam 41
+\mathchardef \coloneqq "3\txsycfam 42
+\mathchardef \eqqcolon "3\txsycfam 43
+\mathchardef \coloneq "3\txsycfam 44
+\mathchardef \eqcolon "3\txsycfam 45
+\mathchardef \Coloneqq "3\txsycfam 46
+\mathchardef \Eqqcolon "3\txsycfam 47
+\mathchardef \Coloneq "3\txsycfam 48
+\mathchardef \Eqcolon "3\txsycfam 49
+\mathchardef \strictif "3\txsycfam 4A
+\mathchardef \strictfi "3\txsycfam 4B
+\mathchardef \strictiff "3\txsycfam 4C
+\mathchardef \invamp "2\txsycfam 4D
+\def \lbag {\delimiter"4\txsycfam 4E\txexafam 30 }
+\def \rbag {\delimiter"5\txsycfam 4F\txexafam 31 }
+\mathchardef \Lbag "4\txsycfam 50
+\mathchardef \Rbag "5\txsycfam 51
+\mathchardef \circledless "3\txsycfam 52
+\mathchardef \circledgtr "3\txsycfam 53
+\mathchardef \circledwedge "2\txsycfam 54
+\mathchardef \circledvee "2\txsycfam 55
+\mathchardef \circledbar "2\txsycfam 56
+\mathchardef \circledbslash "2\txsycfam 57
+\mathchardef \lJoin "3\txsycfam 58
+\mathchardef \rJoin "3\txsycfam 59
+\mathchardef \Join "3\txsycfam 5A
+\mathchardef \openJoin "3\txsycfam 5B
+\mathchardef \lrtimes "3\txsycfam 5C
+\mathchardef \opentimes "3\txsycfam 5D
+\mathchardef \Diamond "0\txsycfam 5E
+\mathchardef \Diamondblack "0\txsycfam 5F
+\mathchardef \nplus "2\txsycfam 60
+\mathchardef \nsqsubset "3\txsycfam 61
+\mathchardef \nsqsupset "3\txsycfam 62
+\mathchardef \dashleftarrow "3\txsycfam 63
+\mathchardef \dashrightarrow "3\txsycfam 64
+\mathchardef \dashleftrightarrow "3\txsycfam 65
+\mathchardef \leftsquigarrow "3\txsycfam 66
+\mathchardef \ntwoheadrightarrow "3\txsycfam 67
+\mathchardef \ntwoheadleftarrow "3\txsycfam 68
+\mathchardef \boxast "2\txsycfam 69
+\mathchardef \boxbslash "2\txsycfam 6A
+\mathchardef \boxbar "2\txsycfam 6B
+\mathchardef \boxslash "2\txsycfam 6C
+\mathchardef \Wr "2\txsycfam 6D
+\mathchardef \lambdaslash "0\txsycfam 6E
+\mathchardef \lambdabar "0\txsycfam 6F
+\mathchardef \varclubsuit "0\txsycfam 70
+\mathchardef \vardiamondsuit "0\txsycfam 71
+\mathchardef \varheartsuit "0\txsycfam 72
+\mathchardef \varspadesuit "0\txsycfam 73
+\mathchardef \Nearrow "3\txsycfam 74
+\mathchardef \Searrow "3\txsycfam 75
+\mathchardef \Nwarrow "3\txsycfam 76
+\mathchardef \Swarrow "3\txsycfam 77
+\mathchardef \Top "0\txsycfam 78
+\mathchardef \Bot "0\txsycfam 79
+\mathchardef \Perp "3\txsycfam 79
+\mathchardef \leadstoext "3\txsycfam 7A
+\mathchardef \leadsto "3\txsycfam 7B
+\mathchardef \sqcupplus "2\txsycfam 7C
+\mathchardef \sqcapplus "2\txsycfam 7D
+\def \llbracket {\delimiter"4\txsycfam 7E\txexafam 12 }
+\def \rrbracket {\delimiter"5\txsycfam 7F\txexafam 13 }
+\mathchardef \boxright "3\txsycfam 80
+\mathchardef \boxleft "3\txsycfam 81
+\mathchardef \boxdotright "3\txsycfam 82
+\mathchardef \boxdotleft "3\txsycfam 83
+\mathchardef \Diamondright "3\txsycfam 84
+\mathchardef \Diamondleft "3\txsycfam 85
+\mathchardef \Diamonddotright "3\txsycfam 86
+\mathchardef \Diamonddotleft "3\txsycfam 87
+\mathchardef \boxRight "3\txsycfam 88
+\mathchardef \boxLeft "3\txsycfam 89
+\mathchardef \boxdotRight "3\txsycfam 8A
+\mathchardef \boxdotLeft "3\txsycfam 8B
+\mathchardef \DiamondRight "3\txsycfam 8C
+\mathchardef \DiamondLeft "3\txsycfam 8D
+\mathchardef \DiamonddotRight "3\txsycfam 8E
+\mathchardef \DiamonddotLeft "3\txsycfam 8F
+\mathchardef \Diamonddot "0\txsycfam 90
+\mathchardef \circleright "3\txsycfam 91
+\mathchardef \circleleft "3\txsycfam 92
+\mathchardef \circleddotright "3\txsycfam 93
+\mathchardef \circleddotleft "3\txsycfam 94
+\mathchardef \multimapbothvert "3\txsycfam 95
+\mathchardef \multimapdotbothvert "3\txsycfam 96
+\mathchardef \multimapdotbothBvert "3\txsycfam 97
+\mathchardef \multimapdotbothAvert "3\txsycfam 98
+
+ \def\mappedfrom{\leftarrow\mappedfromchar}
+ \def\longmappedfrom{\longleftarrow\mappedfromchar}
+ \def\Mapsto{\Mapstochar\Rightarrow}
+ \def\Longmapsto{\Mapstochar\Longrightarrow}
+ \def\Mappedfrom{\Leftarrow\Mappedfromchar}
+ \def\Longmappedfrom{\Longleftarrow\Mappedfromchar}
+ \def\mmapsto{\mmapstochar\rightarrow}
+ \def\longmmapsto{\mmapstochar\longrightarrow}
+ \def\mmappedfrom{\leftarrow\mmappedfromchar}
+ \def\longmmappedfrom{\longleftarrow\mmappedfromchar}
+ \def\Mmapsto{\Mmapstochar\Rightarrow}
+ \def\Longmmapsto{\Mmapstochar\Longrightarrow}
+ \def\Mmappedfrom{\Leftarrow\Mmappedfromchar}
+ \def\Longmmappedfrom{\Longleftarrow\Mmappedfromchar}
+ \let\ne=\neq
+ \let\notowns=\notni
+ \let\lrJoin=\Join
+ % \let\bowtie\lrtimes
+ \let\dasharrow\dashrightarrow
+ \let\circledotright\circleddotright
+ \let\circledotleft\circleddotleft
+
+
+%% TXexa large symbols
+
+\mathchardef \bignplus "1\txexafam 00
+\mathchardef \bigsqcupplus "1\txexafam 02
+\mathchardef \bigsqcapplus "1\txexafam 04
+\mathchardef \bigsqcap "1\txexafam 06
+\mathchardef \oiintop "1\txexafam 08
+\mathchardef \ointctrclockwiseop "1\txexafam 0A
+\mathchardef \ointclockwiseop "1\txexafam 0C
+\mathchardef \sqintop "1\txexafam 0E
+\mathchardef \varprod "1\txexafam 10
+\mathchardef \braacext "0\txexafam 20
+\mathchardef \iintop "1\txexafam 21
+\mathchardef \iiintop "1\txexafam 23
+\mathchardef \iiiintop "1\txexafam 25
+\mathchardef \idotsintop "1\txexafam 27
+\mathchardef \oiiintop "1\txexafam 29
+\mathchardef \varointctrclockwiseop "1\txexafam 2B
+\mathchardef \varointclockwiseop "1\txexafam 2D
+\mathchardef \fintop "1\txexafam 3E
+\mathchardef \oiintctrclockwiseop "1\txexafam 40
+\mathchardef \varoiintclockwiseop "1\txexafam 42
+\mathchardef \oiintclockwiseop "1\txexafam 48
+\mathchardef \varoiintctrclockwiseop "1\txexafam 4A
+\mathchardef \oiiintctrclockwiseop "1\txexafam 44
+\mathchardef \varoiiintclockwiseop "1\txexafam 46
+\mathchardef \oiiintclockwiseop "1\txexafam 4C
+\mathchardef \varoiiintctrclockwiseop "1\txexafam 4E
+\mathchardef \sqiintop "1\txexafam 50
+\mathchardef \sqiiintop "1\txexafam 52
+
+ \def\oiint{\oiintop\nolimits}
+ \def\ointctrclockwise{\ointctrclockwiseop\nolimits}
+ \def\ointclockwise{\ointclockwiseop\nolimits}
+ \def\iint{\iintop\nolimits}
+ \def\iiint{\iiintop\nolimits}
+ \def\sqint{\sqintop\nolimits}
+ \def\iiiint{\iiiintop\nolimits}
+ \def\oiiint{\oiiintop\nolimits}
+ \def\idotsint{\idotsintop\nolimits}
+ \def\varointctrclockwise{\varointctrclockwiseop\nolimits}
+ \def\varointclockwise{\varointclockwiseop\nolimits}
+ \def\fint{\fintop\nolimits}
+ \def\oiintctrclockwise{\oiintctrclockwiseop\nolimits}
+ \def\varoiintclockwise{\varoiintclockwiseop\nolimits}
+ \def\oiintclockwise{\oiintclockwiseop\nolimits}
+ \def\varoiintctrclockwise{\varoiintctrclockwiseop\nolimits}
+ \def\oiiintctrclockwise{\oiiintctrclockwiseop\nolimits}
+ \def\varoiiintclockwise{\varoiiintclockwiseop\nolimits}
+ \def\oiiintclockwise{\oiiintclockwiseop\nolimits}
+ \def\varoiiintctrclockwise{\varoiiintctrclockwiseop\nolimits}
+ \def\sqiint{\sqiintop\nolimits}
+ \def\sqiiint{\sqiiintop\nolimits}
+
+%% TXMIA
+
+\mathchardef \upalpha "0\txmiafam 0B
+\mathchardef \upbeta "0\txmiafam 0C
+\mathchardef \upgamma "0\txmiafam 0D
+\mathchardef \updelta "0\txmiafam 0E
+\mathchardef \upepsilon "0\txmiafam 0F
+\mathchardef \upzeta "0\txmiafam 10
+\mathchardef \upeta "0\txmiafam 11
+\mathchardef \uptheta "0\txmiafam 12
+\mathchardef \upiota "0\txmiafam 13
+\mathchardef \upkappa "0\txmiafam 14
+\mathchardef \uplambda "0\txmiafam 15
+\mathchardef \upmu "0\txmiafam 16
+\mathchardef \upnu "0\txmiafam 17
+\mathchardef \upxi "0\txmiafam 18
+\mathchardef \uppi "0\txmiafam 19
+\mathchardef \uprho "0\txmiafam 1A
+\mathchardef \upsigma "0\txmiafam 1B
+\mathchardef \uptau "0\txmiafam 1C
+\mathchardef \upupsilon "0\txmiafam 1D
+\mathchardef \upphi "0\txmiafam 1E
+\mathchardef \upchi "0\txmiafam 1F
+\mathchardef \uppsi "0\txmiafam 20
+\mathchardef \upomega "0\txmiafam 21
+\mathchardef \upvarepsilon "0\txmiafam 22
+\mathchardef \upvartheta "0\txmiafam 23
+\mathchardef \upvarpi "0\txmiafam 24
+\mathchardef \upvarrho "0\txmiafam 25
+\mathchardef \upvarsigma "0\txmiafam 26
+\mathchardef \upvarphi "0\txmiafam 27
+
+%%% macros
+
+\def\joinrel{\mathrel{\mkern-2.5mu}} %-3mu in plain TeX
+
+\let\circledplus\oplus
+\let\circledminus\ominus
+\let\circledtimes\otimes
+\let\circledslash\oslash
+\let\circleddot\odot
+
+%%% For \underbrace and \overbrace:
+%%% use brace extenstion bar (in "20 of txexa) instead of vrule
+
+\def\downbracefill{$\mathsurround0pt
+ \braceld\mkern-1mu
+ \cleaders\hbox{$\mkern-.5mu\braacext\mkern-.5mu$}\hfill
+ \mkern-1mu\braceru\bracelu\mkern-1mu
+ \cleaders\hbox{$\mkern-.5mu\braacext\mkern-.5mu$}\hfill
+ \mkern-1mu\bracerd$}
+
+\def\upbracefill{$\mathsurround0pt
+ \bracelu\mkern-1mu
+ \cleaders\hbox{$\mkern-.5mu\braacext\mkern-.5mu$}\hfill
+ \mkern-1mu\bracerd\braceld\mkern-1mu
+ \cleaders\hbox{$\mkern-.5mu\braacext\mkern-.5mu$}\hfill
+ \mkern-1mu\braceru$}
+
+%%% \big, \bigg, etc.
+
+\def\scalebig#1#2{{\left#1\vbox to#2\fontdimen6\textfont3{}%
+ \kern-\nulldelimiterspace\right.}}
+\def\big#1{\scalebig{#1}{.85}}
+\def\Big#1{\scalebig{#1}{1.15}}
+\def\bigg#1{\scalebig{#1}{1.45}}
+\def\Bigg#1{\scalebig{#1}{1.75}}
+
+%%% \not redefined:
+%%% \not= becomes \ne
+%%% \not< becomes \nless
+%%% \not> becomes \ngtr
+%%% if \notXXX is defined, \not\XXX becomes \notXXX;
+%%% if \nXXX is defined, \not\XXX becomes \nXXX;
+%%% otherwise, \not\XXX is done in the usual way.
+
+\mathchardef \notchar "3236
+
+\def\not#1{%
+ \ifx\TeX\relax \noexpand\not \else % \let\TeX=\relax in \output routine
+ \ifx #1=\ne \else
+ \ifx #1<\nless \else
+ \ifx #1>\ngtr \else
+ \bgroup\escapechar=-1\xdef\tmpn{\string#1}\egroup
+ \expandafter\ifx \csname not\tmpn\endcsname \relax
+ \expandafter\ifx \csname n\tmpn\endcsname \relax
+ \mathrel{\mathord{\notchar}\mathord{#1}}%
+ \else \csname n\tmpn\endcsname \fi
+ \else \csname not\tmpn\endcsname \fi
+ \fi\fi\fi\fi}
+
+\endinput
+
+% end of tx-math.tex file
+
diff --git a/Master/texmf-dist/tex/csplain/fonts/unifam.tex b/Master/texmf-dist/tex/csplain/fonts/unifam.tex
new file mode 100644
index 00000000000..6438b1bf86a
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/unifam.tex
@@ -0,0 +1,27 @@
+% unifam.tex: loads standard 4-fonts family in UNICODE as .otf files
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012
+
+% \famname includes the family name
+% \fontfeatures can include font features. If not, default font features are used.
+
+\ifx\directlua\undefined \else \ifx\luafonts\undefined \input luafonts
+\fi\fi % lua code to re-define \font primitive
+
+\ifx\fontfeatures\undefined
+ \def\fontfeatures{mapping=tex-text;script=latn;+tlig}
+\fi
+
+\font\tenrm="[\famname-regular]:\fontfeatures" \sizespec
+\font\tenbf="[\famname-bold]:\fontfeatures" \sizespec
+\font\tenit="[\famname-italic]:\fontfeatures" \sizespec
+\font\tenbi="[\famname-bolditalic]:\fontfeatures" \sizespec
+
+\font\tentt="[texgyrecursor-regular]" \sizespec
+
+\font\tenrmc="[\famname-regular]:+smcp;\fontfeatures" \sizespec
+\font\tenbfc="[\famname-bold]:+smcp;\fontfeatures" \sizespec
+\font\tenitc="[\famname-italic]:+smcp;\fontfeatures" \sizespec
+\font\tenbic="[\famname-bolditalic]:+smcp;\fontfeatures" \sizespec
+
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac.tex b/Master/texmf-dist/tex/csplain/opmac/opmac.tex
new file mode 100644
index 00000000000..d2594a3c2e9
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac.tex
@@ -0,0 +1,1486 @@
+% OPmac
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Petr Olsak, 2012
+
+%% The history of versions is at the end of this file, after \endpinput
+
+\ifx\OPmacversion\undefined \else \endinput \fi
+\def\OPmacversion{Dec. 2012}
+
+\immediate\write16{This is OPmac (Olsak's Plain macros), version <\OPmacversion>}
+
+%%%%%%%%%%%%%% Basic macros, sec. 3.1 in opmac-d.pdf
+
+\newcount\tmpnum % auxiliary count
+\newdimen\tmpdim % auxiliary dimen
+
+\def\opwarning#1{\immediate\write16{l.\the\inputlineno\space OPmac WARNING: #1.}}
+
+\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+
+\def\protectlist{}
+\def\addprotect#1{\addto\protectlist{\doprotect#1}}
+\addprotect~
+
+\newif\ifpdftex \pdftextrue
+\ifx\pdfoutput\undefined \pdftexfalse
+\else \ifnum\pdfoutput=0 \pdftexfalse \fi \fi
+
+\def\sdef#1{\expandafter\def\csname#1\endcsname}
+\def\sxdef#1{\expandafter\xdef\csname#1\endcsname}
+
+\def\adef#1{\lccode`\~=`#1\catcode`#1=13
+ \afterassignment\lccodetiezero
+ \lowercase{\def~}%
+}
+\def\lccodetiezero{\lccode`\~=0 }
+
+\def\isdefined #1#2{\expandafter\ifx \csname#1\endcsname \relax
+ \csname iffalse\expandafter\endcsname
+ \else
+ \csname iftrue\expandafter\endcsname
+ \fi
+}
+\def\isinlist#1#2#3{\def\tmp##1#2##2\end{\def\tmp{##2}%
+ \ifx\tmp\empty \csname iffalse\expandafter\endcsname \else
+ \csname iftrue\expandafter\endcsname \fi}%
+ \expandafter\tmp#1#2\end
+}
+\def\isnextchar#1#2#3{\def\tmpa{#2}\def\tmpb{#3}%
+ \let\tmp=#1\futurelet\next\isnextcharA
+}
+\def\isnextcharA{\ifx\tmp\next\expandafter\tmpa\else\expandafter\tmpb\fi}
+
+\def\uv#1{\clqq#1\crqq}
+\let\\=\undefined
+{\lccode`\?=`\% \lowercase{\gdef\percent{?}}}
+\def\,{\ifmmode \mskip\thinmuskip \else \kern.166em \fi}
+
+
+%%%%%%%%%%%%%% Global parameters, sec. 3.2 in opmac-d.pdf
+
+\widowpenalty=10000
+\clubpenalty=10000
+\showboxdepth=7
+\showboxbreadth=30
+
+\newdimen\iindent \iindent=\parindent
+ % indentation of items, TOC, captions, list of bib. references
+\newdimen\ttindent \ttindent=\parindent
+ % indentation in \begtt...\endtt and \verbinput
+
+\def\ttskip{\medskip} % space above and below \begtt, \verbinput
+\mathchardef\ttpenalty=100 % penalty between lines in \begtt, \verbinput
+\def\tthook{} % hook in \begtt, \verbinput
+\def\intthook{} % hook in in-text verbatim
+
+\def\iiskip{\medskip} % space above and below \begitems...\enditems
+\def\bibskip{\smallskip} % space between bibitems
+
+\def\tabstrut{\strut} % strut in the \table
+\def\tabiteml{\enspace} % left material before each \table item
+\def\tabitemr{\enspace} % right material after each \table item
+\def\vvkern{1pt} % space between vertical lines
+\def\hhkern{1pt} % space between horizontal lines
+
+\def\multiskip{\medskip} % space above and below \begmulti...\endmulti
+\newdimen\colsep \colsep=2em % space between columns
+
+\newdimen\mnoteindent \mnoteindent=10pt % ditance between mnote and text
+\newdimen\mnotesize \mnotesize=20mm % the width of the mnote paragraph
+
+\def\picdir{} % the directory with picture files
+\def\bibtexhook{} % hook in \usebibtex and \usebbl macros
+\def\chaphook{} % hook in \chap
+\def\sechook{} % hook in \sec
+\def\secchook{} % hook in \secc
+\def\cnvhook{} % hook before conversion of outlines
+\def\pghook{} % hook in \output rutine
+
+
+%%%%%%%%%%%%%% OPmac, CSplain and LaTeX logos, sec. 3.3 in opmac-d.pdf
+
+\def\OPmac{\leavevmode
+ \lower.2ex\hbox{\thefontscale[1400]O}\kern-.86em P{\em mac}}
+\def\CS{$\cal C$\kern-.1667em\lower.5ex\hbox{$\cal S$}}
+\def\csplain{\CS plain}
+
+\def\LaTeX{\tmpdim=.42ex L\kern-.36em \kern\slantcorr % slant correction
+ \raise\tmpdim\hbox{\thefontscale[710]A}%
+ \kern-.15em \kern-\slantcorr \TeX}
+\def\slantcorr{\expandafter\ignorept\the\fontdimen1\the\font\tmpdim}
+
+\addprotect\TeX \addprotect\OPmac \addprotect\CS \addprotect\LaTeX
+
+
+%%%%%%%%%%%%%% Sizes of fonts and \baselineskip, sec. 3.4 in opmac-d.pdf
+
+\ifx\regfont\undefined
+ \opwarning{csplain version <Nov. 2012> or later is recommended}
+ % macros from csplain, file csfontsm.tex:
+ \font\tenbi=csbxti10 \def\bi{\tenbi}
+ \def\sizespec{}
+ \def\resizefont #1{\expandafter
+ \font\expandafter#1\expandafter\resizefontskipat\fontname#1 \relax}
+ \def\regfont#1{\expandafter\def\expandafter\resizeall\expandafter{%
+ \resizeall \resizefont#1}}
+ \def\resizeall{}
+ \regfont\tenrm \regfont\tenit \regfont\tenbf \regfont\tenbi \regfont\tentt
+\fi
+
+\input ams-math % ams-math.tex is in csplain package Nov. 2012 or later
+
+\def\resizefontskipat#1 #2\relax{\whichtfm{#1} \sizespec\relax}
+
+\newdimen\ptunit \ptunit=1pt
+\newdimen\fontdim \fontdim=10pt
+
+{\lccode`\?=`\p \lccode`\!=`\t \lowercase{\gdef\ignorept#1?!{#1}}}
+
+\def\typosize[#1/#2]{\fontsizex[#1]\setbaselineskip[#2]\ignorespaces}
+\def\typoscale[#1/#2]{\fontscalex[#1]\scalebaselineskip[#2]\ignorespaces}
+
+\def\fontsizex[#1]{\if$#1$\else
+ \textfontsize[#1]%
+ \tmpdim=0.7\fontdim \edef\tmpa{\expandafter\ignorept\the\tmpdim}%
+ \tmpdim=0.5\fontdim \edef\tmpb{\expandafter\ignorept\the\tmpdim}%
+ \edef\tmp{\noexpand\setmathsizes[\expandafter\ignorept\the\fontdim/\tmpa/\tmpb]}%
+ \tmp \normalmath
+ \fi
+}
+\def\textfontsize[#1]{\if$#1$\else
+ \fontdim=#1\ptunit
+ \let\dgsize=\fontdim
+ \edef\sizespec{at\the\fontdim}%
+ \resizeall \rm
+ \fi
+}
+\def\setbaselineskip[#1]{\if$#1$\else
+ \tmpdim=#1\ptunit
+ \baselineskip=\tmpdim \relax
+ \bigskipamount=\tmpdim plus.33333\tmpdim minus.33333\tmpdim
+ \medskipamount=.5\tmpdim plus.16666\tmpdim minus.16666\tmpdim
+ \smallskipamount=.25\tmpdim plus.08333\tmpdim minus.08333\tmpdim
+ \normalbaselineskip=\tmpdim
+ \jot=.25\tmpdim
+ \maxdepth=.33333\tmpdim
+ \setbox\strutbox=\hbox{\vrule height.709\tmpdim depth.291\tmpdim width0pt}%
+ \fi
+}
+\def\withoutunit#1#2{\expandafter#1\expandafter[\expandafter\ignorept\the#2]}
+
+\def\fontscalex[#1]{\if$#1$\else
+ \tmpdim=#1pt \divide\tmpdim by1000
+ \tmpdim=\expandafter\ignorept\the\tmpdim \fontdim
+ \withoutunit\fontsizex\tmpdim
+ \fi
+}
+\def\textfontscale[#1]{\if$#1$\else
+ \tmpdim=#1pt \divide\tmpdim by1000
+ \tmpdim=\expandafter\ignorept\the\tmpdim \fontdim
+ \withoutunit\textfontsize\tmpdim
+ \fi
+}
+\def\scalebaselineskip[#1]{\if$#1$\else
+ \tmpdim=#1pt \divide\tmpdim by1000
+ \tmpdim=\expandafter\ignorept\the\tmpdim \baselineskip
+ \withoutunit\setbaselineskip\tmpdim
+ \fi
+}
+\def\thefontsize[#1]{%
+ \expandafter\let \expandafter\thefont \the\font
+ \def\sizespec{at#1\ptunit}\def\dgsize{#1\ptunit}\resizefont\thefont
+ \thefont \ignorespaces
+}
+\def\thefontscale[#1]{%
+ \tmpdim=#1pt \divide\tmpdim by1000
+ \tmpdim=\expandafter\ignorept\the\tmpdim \fontdim
+ \withoutunit\thefontsize\tmpdim
+}
+\def\magstep#1{\ifcase#1 1000\or1200\or1440\or1728\or2074\or2488\fi\space}
+
+\def\em {\expandafter\ifx \the\font \tenit \additcorr \rm \else
+ \expandafter\ifx \the\font \tenbf \bi\aftergroup\/\else
+ \expandafter\ifx \the\font \tenbi \additcorr \bf \else
+ \it \aftergroup\/\fi\fi\fi}
+\def\additcorr{\ifdim\lastskip>0pt \skip0=\lastskip \unskip\/\hskip\skip0 \else\/\fi}
+
+\addprotect\thefontsize \addprotect\thefontscale
+\addprotect\typosize \addprotect\typoscale
+\addprotect\textfontsize \addprotect\textfontscale
+\addprotect\em
+
+
+%%%%%%%%%%%%%% Multilingual support, sec. 3.5 in opmac-d.pdf
+
+\def\mtext#1{\csname mt:#1:\csname lan:\the\language\endcsname\endcsname}
+
+\sdef{mt:chap:en}{Chapter} \sdef{mt:chap:cz}{Kapitola} \sdef{mt:chap:sk}{Kapitola}
+\sdef{mt:t:en}{Table} \sdef{mt:t:cz}{Tabulka} \sdef{mt:t:sk}{Tabu\v lka}
+\sdef{mt:f:en}{Figure} \sdef{mt:f:cz}{Obr\'azek} \sdef{mt:f:sk}{Obr\'azok}
+
+\ifx\r\undefined \csname csaccents\endcsname \fi
+
+\sdef{lan:0}{en} \sdef{lan:100}{en} \sdef{lan:101}{en}
+\sdef{lan:5}{cz} \sdef{lan:15}{cz} \sdef{lan:115}{cz}
+\sdef{lan:6}{sk} \sdef{lan:16}{sk} \sdef{lan:116}{sk}
+
+%%%%%%%%%%%%%% REF file, sec 3.6 in opmac-d.pdf
+
+\newwrite\reffile
+\newread\testin
+
+\def\wrefrelax#1#2{}
+\let\wref=\wrefrelax
+
+\def\inputref{
+ \openin\testin=\jobname.ref
+ \ifeof\testin \else
+ \closein\testin
+ \input \jobname.ref
+ \fnotenum=0 \mnotenum=0
+ \immediate\openout\reffile=\jobname.ref
+ \def\wref##1##2{\write\reffile{\string##1##2}}
+ \immediate\write\reffile {\percent\percent\space OPmac - REF file}
+ \fi
+}
+\def\openref{%
+ \ifx\wref\wrefrelax
+ \immediate\openout\reffile=\jobname.ref
+ \gdef\wref##1##2{\write\reffile{\string##1##2}}%
+ \immediate\write\reffile
+ {\percent\percent\space OPmac - REF file (\string\openref)}%
+ \fi
+ \gdef\openref{}%
+}
+
+%%%%%%%%%%%%%% \label, \ref, \pgref, sec. 3.7 in opmac-d.pdf
+
+\def\label[#1]{\xdef\lastlabel{#1}\ignorespaces}
+
+\def\wlabel#1{%
+ \ifx\lastlabel\undefined \else
+ \dest[ref:\lastlabel]{2.1em}%
+ \edef\tmp{\wref\Xlabel{{\lastlabel}{#1}}}\tmp
+ \isdefined{lab:\lastlabel}\iftrue \else
+ \sxdef{lab:\lastlabel}{#1}%
+ \fi
+ \global\let\lastlabel=\undefined
+ \fi
+}
+\def\ref[#1]{\isdefined{lab:#1}%
+ \iftrue \reflink[#1]{\csname lab:#1\endcsname}%
+ \else ??\opwarning{label [#1] unknown. Try to TeX me again}\openref
+ \fi
+}
+\def\pgref[#1]{\isdefined{pgref:#1}%
+ \iftrue \pglink{\csname pgref:#1\endcsname}%
+ \else ??\opwarning{pg-label [#1] unknown. Try to TeX me again}\openref
+ \fi
+}
+\def\Xlabel#1#2{\sxdef{lab:#1}{#2}\sxdef{pgref:#1}{\the\lastpage}}
+
+
+%%%%%%%%%%%%%% Chapters, sections, subsections -- sec. 3.8 in opmac-d.pdf
+
+\def\titfont{\typoscale[\magstep4/\magstep4]\bf}
+\def\chapfont{\typoscale[\magstep3/\magstep3]\bfshape}
+\def\secfont{\typoscale[\magstep2/\magstep2]\bfshape}
+\def\seccfont{\typoscale[\magstep1/\magstep2]\bfshape}
+\def\bfshape{\let\tenit=\tenbi \boldmath \bf}
+
+\newcount\chapnum \newcount\secnum \newcount\seccnum
+
+\def\tit#1\par{\vglue4em
+ {\leftskip=0pt plus1fill \rightskip=\leftskip
+ \titfont \noindent #1\unskip\par}%
+ \nobreak\bigskip
+}
+\def\chap#1\par{\advance\chapnum by1
+ \chaphook \secnum=0 \seccnum=0 \relax
+ \edef\thechapnum{\the\chapnum.}%
+ \printchap{#1\unskip}%
+ \wlabel\thechapnum \wcontents\Xchap\thechapnum{#1}\nobreak
+}
+\def\sec#1\par{\par\advance\secnum by1
+ \sechook \seccnum=0 \tnum=0 \fnum=0 \dnum=0 \relax
+ \edef\thesecnum{\othe\chapnum.\the\secnum}%
+ \printsec{#1\unskip}%
+ \insertmark\thesecnum{#1\unskip}%
+ \wlabel\thesecnum \wcontents\Xsec\thesecnum{#1}\nobreak
+}
+\def\secc#1\par{\advance\seccnum by1
+ \secchook \relax
+ \edef\theseccnum{\othe\chapnum.\othe\secnum.\the\seccnum}%
+ \printsecc{#1\unskip}%
+ \wlabel\theseccnum \wcontents\Xsecc\theseccnum{#1}\nobreak
+}
+\def\wcontents#1#2#3{%
+ \expandafter\wref\expandafter#1\expandafter
+ {\expandafter{#2}{#3}{\the\pageno}}%
+}
+\def\othe#1.{\ifnum#1>0 \the#1.\fi}
+\def\thechapnum{} \def\thesecnum{} \def\theseccnum{}
+
+\def\insertmark#1#2{\toks0={#2}\mark{{#1} {\the\toks0}}}
+
+\def\printchap#1{\vfil\break
+ {\chapfont \noindent \dest[toc:\thechapnum]{1.3em}%
+ \mtext{chap} \thechapnum\par\nobreak\smallskip\noindent #1\nbpar}%
+ \nobreak\bigskip
+ \firstnoindent
+}
+\def\printsec#1{\removelastskip \goodbreak \bigskip
+ {\secfont \noindent \dest[toc:\thesecnum]{1.3em}\thesecnum\quad #1\nbpar}%
+ \nobreak\medskip
+ \firstnoindent
+}
+\def\printsecc#1{\removelastskip \goodbreak \medskip
+ {\seccfont \noindent
+ \dest[toc:\theseccnum]{1.3em}\theseccnum\quad #1\nbpar}%
+ \nobreak\medskip
+ \firstnoindent
+}
+\def\afternoindent{\global\everypar={\wipeepar\setbox0=\lastbox}}
+\def\wipeepar{\global\everypar={}}
+\let\firstnoindent=\afternoindent
+\def\nbpar{{\interlinepenalty=10000\par}}
+\def\nl{\hfil\break}
+
+
+%%%%%%%%%%%%%% Captions, equations -- sec. 3.9 in opmac-d.pdf
+
+\newcount\tnum \newcount\fnum \newcount\dnum
+
+\def\thetnum{\thesecnum.\the\tnum}
+\def\thefnum{\thesecnum.\the\fnum}
+\def\thednum{(\the\dnum)}
+
+\def\caption/#1 {\isdefined{#1num}%
+ \iftrue \advance \csname #1num\endcsname by1
+ \else \opwarning{Unknown caption /#1}%
+ \fi
+ \bgroup
+ \leftskip=\iindent plus1fil
+ \rightskip=\iindent plus-1fil
+ \parfillskip=\iindent plus2fil
+ \def\par{\endgraf\egroup}%
+ \noindent \wlabel{\csname the#1num\endcsname}%
+ {\bf \mtext{#1} \csname the#1num\endcsname}\enspace
+}
+\def\eqmark{\global\advance\dnum by1
+ \ifinner\else\eqno \fi \wlabel\thednum \thednum
+}
+
+%%%%%%%%%%%%%% Items -- sec. 3.10 in opmac-d.pdf
+
+\newcount\itemnum \itemnum=0
+
+\def\begitems{\iiskip\bgroup
+ \itemnum=0 \adef*{\startitem}
+ \advance\leftskip by\iindent
+ \let\printitem=\normalitem
+}
+\def\enditems{\par\egroup\iiskip}
+
+\def\startitem{\par \advance\itemnum by1
+ \noindent\llap{\printitem}\ignorespaces}
+\def\normalitem{$\bullet$\enspace}
+
+\def\style#1{\expandafter\let\expandafter\printitem\csname item:#1\endcsname
+ \ifx\printitem\relax \let\printitem=\normalitem \fi
+}
+\sdef{item:o}{\raise.4ex\hbox{$\scriptscriptstyle\bullet$} }
+\sdef{item:-}{- }
+\sdef{item:n}{\the\itemnum. }
+\sdef{item:N}{\the\itemnum) }
+\sdef{item:i}{(\romannumeral\itemnum) }
+\sdef{item:I}{\uppercase\expandafter{\romannumeral\itemnum}\kern.5em}
+\sdef{item:a}{\athe\itemnum) }
+\sdef{item:A}{\uppercase\expandafter{\athe\itemnum}) }
+\sdef{item:x}{\raise.3ex\fullrectangle{.6ex} }
+\sdef{item:X}{\raise.2ex\fullrectangle{1ex}\kern.5em}
+
+\def\fullrectangle#1{\hbox{\vrule height#1 width#1}}
+
+\def\athe#1{\ifcase#1?\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or
+ m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\else ?\fi
+}
+
+%%%%%%%%%%%%%% TOC -- sec. 3.11 in opmac-d.pdf
+
+\def\toclist{} \newif\ifischap \ischapfalse
+
+\def\Xchap#1#2#3{\ischaptrue\addto\toclist{\tocline{0}{\bf}{#1}{#2}{#3}}}
+\def\Xsec#1#2#3{\addto\toclist{\tocline{1}{\rm}{#1}{#2}{#3}}}
+\def\Xsecc#1#2#3{\addto\toclist{\tocline{2}{\rm}{#1}{#2}{#3}}}
+
+\def\tocline#1#2#3#4#5{{\leftskip=#1\iindent \rightskip=2\iindent
+ \ifischap\advance\leftskip by\iindent\fi
+ \ifnum#1>1 \advance\leftskip by\iindent\fi
+ \noindent\llap{#2\toclink{#3}\enspace}%
+ {#2#4\unskip}\tocdotfill\pglink{#5}\hskip-2\iindent\null\par}}
+\def\tocdotfill{\leaders\hbox to.8em{\hss.\hss}\hfill}
+
+\def\maketoc{\par \ifx\toclist\empty
+ \opwarning{\noexpand\maketoc -- data unavailable, TeX me again}\openref
+ \else \toclist \fi}
+
+
+%%%%%%%%%%%%%% Index -- sec. 3.12 on opmac-d.pdf
+
+\def\iindex#1{\openref\wref\Xindex{{#1}{\the\pageno}}}
+
+\def\ii #1 {\leavevmode\def\tmp{#1}\iiA #1,,}
+
+\def\iiA #1,{\if$#1$\else\def\tmpa{#1}%
+ \ifx\tmpa\iiatsign \expandafter\iiB\tmp,,%
+ \else\iindex{#1}\fi
+ \expandafter\iiA\fi}
+\def\iiatsign{@}
+
+\def\iiB #1,{\if$#1$\else
+ \iiC#1/\relax
+ \expandafter\iiB\fi
+}
+\def\iiC #1/#2\relax{\if$#2$\else\iindex{#2#1}\fi}
+
+\def\iid #1 {\leavevmode\iindex{#1}#1\futurelet\tmp\iiD}
+\def\iiD{\ifx\tmp,\else\ifx\tmp.\else\space\fi\fi}
+
+\def\Xindex#1#2{\bgroup \def~{ }%
+ \isdefined{,#1}\iftrue
+ \expandafter\firstdata \csname,#1\endcsname \XindexA
+ \ifnum#2=\tmpa % \ii on the same page
+ \else
+ \tmpnum=#2 \advance\tmpnum by-1
+ \expandafter\seconddata \csname,#1\endcsname \XindexB
+ \if\tmpb+% state: the pagelist ends by a pagenumber
+ \ifnum\tmpnum=\tmpa % the consecutive page
+ \sxdef{,#1}{{#2/-}{\tmp\iiendash}}
+ \else % the pages drop
+ \sxdef{,#1}{{#2/+}{\tmp, #2}}
+ \fi
+ \else % state: the pagelist ends by --
+ \ifnum\tmpnum=\tmpa % the consecutive page
+ \sxdef{,#1}{{#2/-}{\tmp}}
+ \else % the pages drop
+ \sxdef{,#1}{{#2/+}{\tmp\tmpa, #2}}
+ \fi
+ \fi
+ \fi
+ \else % first occurrence of the index item #1
+ \sxdef{,#1}{{#2/+}{#2}}
+ \global \expandafter\addto \expandafter\iilist \csname,#1\endcsname
+ \fi
+ \egroup
+}
+\def\iilist{} \def\iiendash{--}
+
+\def\firstdata#1#2{\expandafter\expandafter\expandafter #2\expandafter\firstdataA#1}
+\def\firstdataA#1#2{#1&}
+\def\seconddata#1#2{\expandafter\expandafter\expandafter #2\expandafter\seconddataA#1}
+\def\seconddataA#1#2{#2&}
+
+\def\XindexA#1/#2&{\def\tmpa{#1}\let\tmpb=#2}
+\def\XindexB#1&{\def\tmp{#1}}
+
+\def\makeindex{\par
+ \ifx\iilist\empty \opwarning{index data-buffer is empty. TeX me again}
+ \else
+ \bgroup
+ \setprimarysorting
+ \def\act##1{\ifx##1\relax \else
+ \firstdata##1\XindexA \seconddata##1\XindexB
+ \if\tmpb+%
+ \preparesorting##1% converted item by sorting data in \tmpb
+ \xdef##1{{\tmpb}{\tmp}}
+ \else
+ \preparesorting##1% converted item by sorting data in \tmpb
+ \xdef##1{{\tmpb}{\tmp\tmpa}}
+ \fi
+ \expandafter\act\fi}
+ \expandafter \act \iilist \relax
+ \egroup
+ \dosorting % sorting is in progress
+ \iiparparams
+ \gdef\act##1{\ifx##1\relax \else \prepii##1%
+ \seconddata##1\printiipages \expandafter\act \fi}
+ \expandafter \act \iilist \relax
+ \orippx \global\let\act=\undefined \global\let\orippx=\undefined
+ \fi
+}
+\def\printiipages#1&{#1\par}
+
+\def\prepii #1{\isinlist \iispeclist #1\iftrue
+ \expandafter\expandafter\expandafter \printii \csname\string#1\endcsname&
+ \else \expandafter\prepiiA\string #1&
+ \fi
+}
+\def\prepiiA #1#2#3&{\printii#3&}
+
+\def\iis #1 #2{\bgroup \def~{ }%
+ \global\expandafter\addto\expandafter\iispeclist\csname,#1\endcsname
+ \global\sdef{\expandafter\string\csname,#1\endcsname}{#2}%
+ \egroup
+}
+\def\iispeclist{}
+
+\def\printii #1&{\gdef\currii{#1}\noindent\everyii
+ \hskip-\iindent \ignorespaces\printiiA#1//}
+\def\printiiA #1/{\if$#1$\expandafter\printiiB\else
+ \expandafter\scanprevii\previi/&\gdef\tmpb{#1}%
+ \ifx\tmpa\tmpb \iiemdash \else#1 \gdef\previi{}\fi
+ \expandafter\printiiA\fi
+}
+\def\printiiB{\let\previi=\currii}
+\def\iiemdash{\kern.1em---\space}
+\def\everyii{}
+
+\def\iiparparams{%
+ \xdef\orippx{\global\rightskip=\the\rightskip
+ \global\leftskip=\the\leftskip
+ \global\exhyphenpenalty=\the\exhyphenpenalty}
+ \global\rightskip=0pt plus1fil
+ \global\exhyphenpenalty=10000
+ \global\leftskip=\iindent
+}
+
+\def\scanprevii#1/#2&{\def\previi{#2}\def\tmpa{#1}}
+\def\previi{} % previous index item
+
+
+%%%%%%%%%%%%%% Sorting -- sec. 3.13 in opmac-d.pdf
+
+\def\sortingdata{%
+ /,{ },-,&,@,%
+ aA\"a\"A\'a\'A,%
+ bB,%
+ cC,%
+ \v c\v C,%
+ dD\v d\v D,%
+ eE\'e\'E\v e\v E,%
+ fF,%
+ gG,%
+ h^^HH,%
+ ^^T^^U^^V,%
+ iI\'i\'I,%
+ jJ,%
+ kK,%
+ lL\'l\'L\v l\v L,%
+ mM,%
+ nN\v n\v N,%
+ oO\"o\"O\'o\'O\^o\^O,%
+ pP,%
+ qQ,%
+ rR\'r\'R,%
+ \v r\v R,%
+ sS,%
+ \v s\v S,%
+ tT\v t\v T,%
+ uU\"u\"U\'u\'U\r u\r U,%
+ vV,%
+ wW,%
+ xX,%
+ yY,\'y\'Y,%
+ zZ,%
+ \v z\v Z,%
+ 0,1,2,3,4,5,6,7,8,9,'.%
+}
+\def\setprimarysorting {\csname sort:\csname lan:\the\language\endcsname \endcsname
+ \def\act##1{\ifx##1.\else
+ \ifx##1,\advance\tmpnum by1
+ \else \lccode`##1=\tmpnum \fi
+ \expandafter \act \fi}%
+ \ifx\r\undefined
+ \opwarning{\noexpand\csaccents is unused, falling back to ASCII sorting}%
+ \gdef\sortingdata{.}\global\let\chsorting=n%
+ \else
+ \xdef\sortingdata{\sortingdata}% expand sorting data now
+ \fi
+ \tmpnum=133 \expandafter \act\sortingdata \setignoredchars
+}
+\sdef{sort:en}{\global\let\chsorting=n} % skipping ch processing in English language
+
+\def\setsecondarysorting {\def\act##1{\ifx##1.\else
+ \ifx##1,\else \advance\tmpnum by1 \lccode`##1=\tmpnum \fi
+ \expandafter \act \fi}%
+ \tmpnum=133 \expandafter \act\sortingdata \setignoredchars
+}
+\bgroup
+\lccode`4=`c \lccode`5=`h \lccode`6=`C \lccode`7=`H
+\lowercase{
+\gdef\iiscanch #145#2\relax{#1\if$#2$\else^^T\iiscanch #2\relax\fi}
+\gdef\iiscanCh #165#2\relax{#1\if$#2$\else^^U\iiscanCh #2\relax\fi}
+\gdef\iiscanCH #167#2\relax{#1\if$#2$\else^^V\iiscanCH #2\relax\fi}
+\gdef\preparesorting#1{\expandafter\preparesortingA\string#1&}
+\gdef\preparesortingA#1#2#3&{\xdef\tmpb{#3}%
+ \ifx\chsorting\undefined
+ \xdef\tmpb{\expandafter\iiscanch\tmpb 45\relax}%
+ \xdef\tmpb{\expandafter\iiscanCh\tmpb 65\relax}%
+ \xdef\tmpb{\expandafter\iiscanCH\tmpb 67\relax}\fi
+ \lowercase\expandafter{\expandafter\gdef\expandafter\tmpb\expandafter{\tmpb}}%
+ \xdef\tmpb{\expandafter\removedot\tmpb.\relax}%
+}}
+\egroup
+
+\def\removedot #1.#2\relax{#1\if$#2$\else\removedot #2\relax\fi}
+\def\setignoredchars{\setlccodes ,.;.?.!.:.'.".|.(.).[.].<.>.=.+.{}{}}
+
+\newif \ifAleB
+
+\def\isAleB #1#2{%
+ \edef\tmp{\firstdata#1\empty\relax\firstdata#2\empty\relax%
+ \noexpand#1\noexpand#2}%
+ \expandafter \testAleB \tmp
+}
+\def\testAleB #1#2\relax #3#4\relax #5#6{%
+ \if #1#3\if #1&\testAleBsecondary #5#6%
+ \else \testAleB #2\relax #4\relax #5#6%
+ \fi
+ \else \ifnum `#1<`#3 \AleBtrue \else \AleBfalse \fi
+ \fi
+}
+\def\testAleBsecondary#1#2{%
+ \bgroup
+ \setsecondarysorting
+ \preparesorting#1\let\tmpa=\tmpb \preparesorting#2%
+ \edef\tmp{\tmpa0\relax\tmpb1\relax}%
+ \expandafter\testAleBsecondaryX \tmp
+ \egroup
+}
+\def\testAleBsecondaryX #1#2\relax #3#4\relax {%
+ \if #1#3\testAleBsecondaryX #2\relax #4\relax
+ \else \ifnum `#1<`#3 \global\AleBtrue \else \global \AleBfalse \fi
+ \fi
+}
+\def\dosorting{%
+ \message{Opmac: Sorting index...}
+ \def\act##1{\ifx##1\relax\else \global\addto\iilist{##1,}%
+ \expandafter\act\fi}
+ \expandafter\removeiilist \expandafter\act \iilist\relax
+ \expandafter\removeiilist \expandafter\mergesort \iilist \end,\end
+}
+\def\removeiilist{\gdef\iilist{}}
+
+\def\mergesort #1#2,#3{% by Miroslav Olsak
+ \ifx,#1 % prazdna-skupina,neco, (#2=neco #3=pokracovani)
+ \addto\iilist{#2,} % dvojice skupin vyresena
+ \return{\fif\mergesort#3}% % \mergesort pokracovani
+ \fi
+ \ifx,#3 % neco,prazna-skupina, (#1#2=neco #3=,)
+ \addto\iilist{#1#2,}% % dvojice skupin vyresena
+ \return{\fif\mergesort}% % \mergesort dalsi
+ \fi
+ \ifx\end#3 % neco,konec (#1#2=neco)
+ \ifx\empty\iilist % neco=kompletni setrideny seznam
+ \def\iilist{#1#2}%
+ \return{\fif\fif\gobbletoend}% % koncim
+ \else % neco=posledni skupina nebo \end
+ \return{\fif\fif \expandafter\removeiilist % spojim \indexbuffer+necoa cele znova
+ \expandafter\mergesort\iilist#1#2,#3}%
+ \fi\fi % zatriduji: p1+neco1,p2+neco2, (#1#2=p1+neco1 #3=p2)
+ \isAleB #1#3\ifAleB % p1<p2
+ \addto\iilist{#1}% % p1 do bufferu
+ \return{\fif\mergesort#2,#3}% % \mergesort neco1,p2+neco2,
+ \else % p1>p2
+ \addto\iilist{#3}% % p2 do bufferu
+ \return{\fif\mergesort#1#2,}% % \mergesort p1+neco1,neco2,
+ \fi
+ \relax % zarazka, na ktere se zastavi \return
+}
+\def\return#1#2\fi\relax{#1} \def\fif{\fi}
+\def\gobbletoend #1\end{}
+
+
+%%%%%%%%%%%%%% \begmulti ... \endmulti TBN p. 244, 245 -- sec. 3.14 in opmac-d.pdf
+
+\def\corrsize #1{%% #1 := #1 + \splittopskip - \topskip
+ \advance #1 by \splittopskip \advance #1 by-\topskip}
+
+\def\begmulti #1 {\par\wipeepar\multiskip\penalty0 \def\Ncols{#1}
+ \splittopskip=\baselineskip
+ \setbox6=\vbox\bgroup\penalty0
+ %% \hsize := Sirka sloupce = (\hsize+\colsep) / n - \colsep
+ \advance\hsize by\colsep
+ \divide\hsize by\Ncols \advance\hsize by-\colsep
+ \dimen0=0pt
+ \def\par{\endgraf\advance\dimen0 by\the\prevgraf\baselineskip
+ \ifdim\dimen0>.9\maxdimen \message{flushcolumns:}%
+ \global\let\balancecolumns=\flushcolumns \expandafter \endmulti
+ \fi}%
+}
+\def\endmulti{\vskip-\prevdepth\vfil\egroup \setbox1=\vsplit6 to0pt
+ %% \dimen1 := the free space on the page
+ \ifdim\pagegoal=\maxdimen \dimen1=\vsize \corrsize{\dimen1}
+ \else \dimen1=\pagegoal \advance\dimen1 by-\pagetotal \fi
+ \ifdim \dimen1<2\baselineskip
+ \vfil\break \dimen1=\vsize \corrsize{\dimen1} \fi
+ \dimen0=\ht6 \divide\dimen0 by\Ncols \relax
+ %% split the material to more pages?
+ \ifdim \dimen0>\dimen1 \splitpart
+ \else \balancecolumns \fi % only balancing
+ \multiskip\relax}
+\def\makecolumns{\bgroup % full page, destination height: \dimen1
+ \vbadness=20000 \setbox1=\hbox{}\tmpnum=0
+ \loop \ifnum\Ncols>\tmpnum
+ \advance\tmpnum by1
+ \setbox1=\hbox{\unhbox1 \vsplit6 to\dimen1 \hss}
+ \repeat
+ \hbox{}\nobreak\vskip-\splittopskip \nointerlineskip
+ \line{\unhbox1\unskip}
+ \egroup}
+\def\splitpart{%
+ \makecolumns % full page
+ \vskip 0pt plus 1fil minus\baselineskip \break
+ \dimen0=\ht6 \divide\dimen0 by\Ncols \relax
+ \dimen1=\vsize \corrsize{\dimen1}\dimen2=\dimen1
+ \advance\dimen2 by-\Ncols\baselineskip
+ %% split the material to more pages?
+ \ifvoid6 \else
+ \ifdim \dimen0>\dimen2 \expandafter\expandafter\expandafter \splitpart
+ \else \balancecolumns % last balancing
+ \fi \fi
+}
+
+\def\balancecolumns{\bgroup \setbox7=\copy6 % destination height: \dimen0
+ \ifdim\dimen0>\baselineskip \else \dimen0=\baselineskip \fi
+ \vbadness=20000
+ \def\tmp{%
+ \setbox1=\hbox{}\tmpnum=0
+ \loop \ifnum\Ncols>\tmpnum
+ \advance\tmpnum by1
+ \setbox1=\hbox{\unhbox1
+ \ifvoid6 \hbox to\wd6{\hss}\else \vsplit6 to\dimen0 \fi\hss}
+ \repeat
+ \ifvoid6 \else
+ \advance \dimen0 by.2\baselineskip
+ \setbox6=\copy7
+ \expandafter \tmp \fi}\tmp
+ \hbox{}\nobreak\vskip-\splittopskip \nointerlineskip
+ \hbox to\hsize{\unhbox1\unskip}%
+ \egroup
+}
+\def\flushcolumns#1\relax{\fi\fi\fi
+ \setbox6=\vbox\bgroup\penalty0
+ \global\let\balancecolumns=\ibalancecolumns
+ \dimen0=\ht6 \unvbox6 \unskip\unskip
+ \advance\hsize by\colsep
+ \divide\hsize by\Ncols \advance\hsize by-\colsep
+ \def\par{\endgraf\advance\dimen0 by\the\prevgraf\baselineskip
+ \ifdim\dimen0>.9\maxdimen \message{flush-columns:}%
+ \global\let\balancecolumns=\flushcolumns \expandafter \endmulti
+ \fi}%
+}
+\let\ibalancecolumns=\balancecolumns
+
+%%%%%%%%%%%%%% Colors -- sec. 3.15 in opmac-d.pdf
+
+\newif\ifpgcolor \pgcolorfalse
+\newcount\lastpage \lastpage=0 % the last page of the document
+
+\def\Blue{\setcmykcolor{1.0 1.0 0.0 0}}
+\def\Red{\setcmykcolor{0.0 1.0 1.0 0}}
+\def\Brown{\setcmykcolor{0 0.67 0.67 0.5}}
+\def\Green{\setcmykcolor{1.0 0.0 1.0 0.0}}
+\def\Yellow{\setcmykcolor{0.0 0.0 1 0}}
+\def\Cyan{\setcmykcolor{1.0 0.0 0 0}}
+\def\Magenta{\setcmykcolor{0.0 1.0 0 0}}
+\def\White{\setcmykcolor{0 0 0 0}}
+\def\Grey{\setcmykcolor{0 0 0 0.5}}
+\def\LightGrey{\setcmykcolor{0 0 0 0.2}}
+\def\Black{\setcmykcolor{0 0 0 1}\global\pgcolorfalse}
+
+\ifpdftex
+ \def\setcmykcolor#1{\special{PDF:#1 \pdfK}%
+ \ifpgcolor\else
+ \openref\expandafter\wref\expandafter\Xpdfcolor\expandafter{\pdfK{#1}}%
+ \fi
+ }
+\else
+ \def\setcmykcolor#1{}
+\fi
+
+\def\linecolor#1{{\def\pdfK{K}#1}}
+\def\pdfK{k}
+\def\locpgcolor{\global\pgcolortrue}
+
+\def\Xpdfcolork#1{\def\pdflastcolork{#1}}
+\def\XpdfcolorK#1{\def\pdflastcolorK{#1}}
+\def\pdfblackcolor{0 0 0 1}
+\let\pdflastcolork=\pdfblackcolor \let\pdflastcolorK=\pdfblackcolor
+
+\def\Xpage#1{\lastpage=#1 \fnotenumlocal=0
+ \ifx\pdflastcolork\pdfblackcolor\else
+ \isdefined{pg:#1}\iftrue \else \sxdef{pg:#1}{}\fi
+ {\let\setpgcolor=\relax \sxdef{pg:#1}%
+ {\csname pg:#1\endcsname\setpgcolor k{\pdflastcolork}}}\fi
+ \ifx\pdflastcolorK\pdfblackcolor\else
+ \isdefined{pg:#1}\iftrue \else \sxdef{pg:#1}{}\fi
+ {\let\setpgcolor=\relax \sxdef{pg:#1}%
+ {\csname pg:#1\endcsname\setpgcolor K{\pdflastcolorK}}}\fi
+}
+\def\setpgcolor#1#2{\special{PDF:#2 #1}}
+
+\def\draft{\edef\tmp{\headline={\noexpand\draftbox{\tenbf DRAFT}\the\headline}}
+ \ifpdftex \tmp \else
+ \opwarning{\string\draft: Grey color is possible in pdfTeX only}\fi}
+
+\def\draftbox#1{\vbox to0pt{\setbox0=\hbox{\typosize[10/]#1}%
+ \kern.5\vsize \kern4\wd0 \hbox to0pt{\kern.5\hsize \kern-2.5\wd0
+ \pdfsave \pdfrotate{55}\pdfscale{10}{10}%
+ \hbox to0pt{\locpgcolor\LightGrey \box0\hss\Black}%
+ \pdfrestore
+\hss}\vss}\hss}
+
+
+%%%%%%%%%%%%%% Hyperrefs -- sec. 3.16 in opmac-d.pdf
+
+\def\destactive[#1:#2]#3{\if$#2$\else\ifvmode
+ \tmpdim=\prevdepth \prevdepth=-1000pt
+ \destbox[#1:#2]{#3}\prevdepth=\tmpdim
+ \else \destbox[#1:#2]{#3}%
+ \fi\fi
+}
+\def\destbox[#1]#2{\vbox to0pt{\kern-#2 \pdfdest name{#1} xyz\vss}}
+\def\dest[#1]#2{}
+
+\def\link[#1:#2]#3#4{\leavevmode\pdfstartlink height.9em depth.3em
+ \pdfborder{#1} goto name{#1:#2}\relax
+ \ifx\Black#3#4\else#3#4\Black\fi \pdfendlink
+}
+\def\urllink[#1:#2]#3{{\leavevmode\pdfstartlink height.9em depth.3em
+ \pdfborder{#1}user{/Subtype/Link/A << /Type/Action/S/URI/URI(#2)>>}\relax
+ \urlcolor{#3}\Black\pdfendlink}%
+}
+\def\url{\leavevmode\bgroup \adef{/}{\\}%
+ \catcode`\_=12 \catcode`\#=12 \catcode`\~=12 \dourl}
+\def\dourl#1{\def\\{/}\ulink[url:#1]{\tt\def\\{\discretionary{/}{}{/}}#1}\egroup}
+
+\def\toclink#1{#1}
+\def\pglink#1{#1}
+\def\citelink#1{#1}
+\def\reflink[#1]#2{#2}
+\def\ulink[#1]#2{#2}
+
+\def\hyperlinks#1#2{%
+ \let\dest=\destactive
+ \def\toclink##1{\locpgcolor\link[toc:##1]{#1}{##1}}%
+ \def\pglink##1{\locpgcolor\link[pg:##1]{#1}{##1}}%
+ \def\citelink##1{\locpgcolor\link[cite:##1]{#1}{##1}}%
+ \def\reflink[##1]##2{\locpgcolor\link[ref:##1]{#1}{##2}}%
+ \def\ulink[##1]##2{\urllink[##1]{##2}}%
+ \def\urlcolor{#2}%
+}
+
+\def\pdfborder#1{\if$#1$\else \isdefined{#1border}\iftrue
+ \if$\csname#1border\endcsname$\else
+ attr{/C[\csname#1border\endcsname] /Border[0 0 1]}%
+ \fi\fi\fi
+}
+
+\ifpdftex \else
+ \def\dest[#1]#2{}
+ \def\link[#1]#2#3{#3}
+ \def\urllink[#1]#2{#2}
+ \def\hyperlinks#1#2{}
+\fi
+
+
+%%%%%%%%%%%%%% Outlines -- sec. 3.17 in opmac-d.pdf
+
+\def\outlines#1{\openref\ifx\toclist\empty
+ \opwarning{\noexpand\outlines -- data unavailable. TeX me again}%
+ \else
+ {\let\tocline=\outlinesA
+ \count0=0 \count1=0 \toclist % calculate numbers o childs
+ \def\outlinelevel{#1}\let\tocline=\outlinesB
+ \count0=0 \count1=0 \toclist}% create outlines
+ \fi
+}
+\def\outlinesA#1#2#3#4#5{%
+ \advance\count#1 by1
+ \ifcase#1\or
+ \addoneol{ol:\the\count0}\or
+ \addoneol{ol:\the\count0:\the\count1}\fi
+}
+\def\addoneol#1{\isdefined{#1}%
+ \iftrue \tmpnum=\csname#1\endcsname\relax
+ \advance\tmpnum by1 \sxdef{#1}{\the\tmpnum}%
+ \else \sxdef{#1}{1}%
+ \fi
+}
+\def\outlinesB#1#2#3#4#5{%
+ \advance\count#1 by1
+ \ifcase#1\tmpnum=\isdefined{ol:\the\count0}%
+ \iftrue\csname ol:\the\count0\endcsname\else0\fi \or
+ \tmpnum=\isdefined{ol:\the\count0:\the\count1}%
+ \iftrue\csname ol:\the\count0:\the\count1\endcsname\else0\fi \or
+ \tmpnum = 0 \fi
+ \protectlist \def~{ }\setcnvcodesA
+ \expandafter \setlccodes \toasciidata{}{}%
+ \cnvhook \lowercase{\gdef\tmp{#4}}%
+ \pdfoutline goto name{toc:#3} count
+ \ifnum#1<\outlinelevel\space\else-\fi\tmpnum {\tmp}\relax
+}
+\def\setcnvcodesA{\global\let\setcnvcodesA=\relax % I am working only once
+ \ifx\r\undefined
+ \gdef\toasciidata{}
+ \opwarning{\noexpand\csaccents unused, CZ/SK outline-conversion is off}%
+ \else
+ \xdef\toasciidata{\toasciidata}%
+ \fi
+}
+\def\toasciidata{% Removes Czech+Slovak accents
+ AA\'AA\"AA\'aa\" aaBBCC\v CC\v ccDD\v DD\v ddEE\'EE\v EE\'ee\v ee%
+ FFGGHHII\'II\'iiJJKKLL\'LL\v LL\'ll\v llMMNN\v NN\v nnOO\'OO\"OO\^OO%
+ \'oo\"oo\^ooPPQQRR\v RR\v rrSS\v SS\v ssTT\v TT\v ttUU\'UU\"UU\r UU%
+ \'uu\"uu\r uuVVWWXXYY\'YY\'yyZZ\v ZZ\v zz%
+}
+\def\setlccodes#1#2{\if\relax#2\relax \else \lccode`#1=`#2 \expandafter \setlccodes \fi}
+
+\def\insertoutline#1{\pdfdest name{oul:#1} xyz\relax
+ \pdfoutline goto name{oul:#1} count0 {#1}\relax
+}
+
+\ifpdftex \else
+ \def\outlines#1{\opwarning{DVI output has no outlines}\gdef\outlines##1{}}
+ \let\insertoutline=\outlines
+\fi
+
+
+%%%%%%%%%%%%%% Verbatim, \begtt, \endtt -- sec. 3.18 in opmac-d.pdf
+
+\newcount\ttline \ttline=-1
+\newcount\viline
+\newread\vifile
+
+\def\setverb{\def\do##1{\catcode`##1=12}\dospecials \catcode`\*=12 }
+\def\begtt{\ttskip\bgroup \wipeepar
+ \setverb \adef{ }{ }%
+ \ifx\savedttchar\undefined \else \catcode\savedttchar=12 \fi
+ \parindent=\ttindent
+ \tthook\relax
+ \ifnum\ttline<0 \else
+ \tenrm \thefontscale[700]\let\sevenrm=\thefont
+ \everypar={\global\advance\ttline by1
+ \llap{\sevenrm\the\ttline\kern.9em}}\fi
+ \def\par##1{\endgraf\ifx##1\egroup\else\penalty\ttpenalty\leavevmode\fi ##1}
+ \obeylines \startverb}
+{\catcode`\|=0 \catcode`\\=12
+|gdef|startverb#1\endtt{|tt#1|egroup|ttskip|testparA}}
+\def\testparA{\afterassignment\testparB\let\tmpa= }
+\def\testparB{\futurelet\tmpa\testparC}
+\def\testparC{\ifx\tmpa\par\else\afternoindent\fi}
+
+\def\activettchar#1{%
+ \ifx\savedttchar\undefined\else \catcode\savedttchar=\savedttcharc \fi
+ \chardef\savedttchar=`#1%
+ \chardef\savedttcharc=\catcode`#1%
+ \lccode`\~=`#1
+ \lowercase {\def~}{\leavevmode\hbox\bgroup\setverb\adef{ }{ }%
+ \intthook\tt\readverb}%
+ \lowercase{\def\readverb ##1~}{##1\egroup}%
+ \lccode`\~=0 \catcode\savedttchar=13
+}
+
+\def\verbinput (#1) #2 {\par \def\tmpa{#2}%
+ \ifx\vifilename\tmpa \else
+ \openin\vifile=#2
+ \global\viline=0 \global\let\vifilename=\tmpa
+ \ifeof\vifile
+ \opwarning{\noexpand\verbinput - file "#2" is unable to reading}
+ \expandafter\expandafter\expandafter\skiptorelax
+ \fi
+ \fi
+ \viscanparameter #1+\relax
+}
+\def\skiptorelax#1\relax{}
+
+\def \viscanparameter #1+#2\relax{%
+ \if$#2$\viscanminus(#1)\else \viscanplus(#1+#2)\fi
+}
+\def\viscanplus(#1+#2+){%
+ \if$#1$\tmpnum=\viline
+ \else \ifnum#1<0 \tmpnum=\viline \advance\tmpnum by-#1
+ \else \tmpnum=#1
+ \advance\tmpnum by-1
+ \ifnum\tmpnum<0 \tmpnum=0 \fi % (0+13) = (1+13)
+ \fi \fi
+ \edef\vinolines{\the\tmpnum}%
+ \if$#2$\def\vidolines{0}\else\edef\vidolines{#2}\fi
+ \doverbinput
+}
+\def\viscanminus(#1-#2){%
+ \if$#1$\tmpnum=0
+ \else \tmpnum=#1 \advance\tmpnum by-1 \fi
+ \ifnum\tmpnum<0 \tmpnum=0 \fi % (0-13) = (1-13)
+ \edef\vinolines{\the\tmpnum}%
+ \if$#2$\tmpnum=0
+ \else \tmpnum=#2 \advance\tmpnum by-\vinolines \fi
+ \edef\vidolines{\the\tmpnum}%
+ \doverbinput
+}
+\def\doverbinput{%
+ \tmpnum=\vinolines
+ \advance\tmpnum by-\viline
+ \ifnum\tmpnum<0
+ \openin\vifile=\vifilename\space
+ \global\viline=0
+ \else
+ \edef\vinolines{\the\tmpnum}%
+ \fi
+ \ttskip\bgroup \wipeepar
+ \setverb \adef{ }{ }%
+ \ifx\savedttchar\undefined \else \catcode\savedttchar=12 \fi
+ \parindent=\ttindent
+ \tthook\relax
+ \ifnum\ttline<-1 \else
+ \tenrm \thefontscale[700]\let\sevenrm=\thefont \fi
+ \tmpnum=0 \tt
+ \loop \ifeof\vifile \tmpnum=\vinolines\space \fi
+ \ifnum\tmpnum<\vinolines\space
+ \vireadline \advance\tmpnum by1 \repeat %% skip line
+ \tmpnum=0 \ifnum\vidolines=0 \tmpnum=-1 \fi
+ \loop \ifeof\vifile \tmpnum=\vidolines\space \fi
+ \ifnum\tmpnum<\vidolines\space
+ \vireadline \penalty\ttpenalty \viprintline %% print line
+ \ifnum\vidolines=0 \else\advance\tmpnum by1 \fi \repeat
+ \egroup\ttskip\testparB
+}
+\def\vireadline{\read\vifile to \tmp \global\advance\viline by1 }
+\def\viprintline{\indent
+ \ifnum \ttline<-1 \else
+ \llap{\sevenrm\ifnum\ttline<0 \the\viline \else
+ \global\advance\ttline by1 \the\ttline \fi \kern.9em}%
+ \fi
+ \tmp\par % print the line from \tmp
+}
+
+
+%%%%%%%%%%%%%% \table -- sec. 3.19 in opmac-d.pdf
+
+\newtoks\tabdata
+\def\tabstrutA{\tabstrut}
+\newcount\colnum \colnum=0
+\def\ddlinedata{}
+\def\vvleft{}
+
+\def\table#1#2{\vbox{\offinterlineskip
+ \def\tmpa{}\scantabdata#1\relax
+ \halign\expandafter{\the\tabdata\tabstrutA\cr#2\crcr}}}
+
+\def\scantabdata#1{%
+ \ifx#1\relax\let\scantabdata=\relax
+ \else\if#1|\addtabvrule
+ \else\expandafter\ifx\csname tabdeclare#1\endcsname \relax
+ \opwarning{tab-declare letter #1 unknown, ignored}%
+ \else\expandafter \addtabitem\expandafter{\csname tabdeclare#1\endcsname}%
+ \fi\fi\fi \scantabdata
+}
+\def\tabdeclarec{\tabiteml\hfil##\unsskip\hfil\tabitemr}
+\def\tabdeclarel{\tabiteml##\unsskip\hfil\tabitemr}
+\def\tabdeclarer{\tabiteml\hfil##\unsskip\tabitemr}
+
+\def\unsskip{\ifdim\lastskip>0pt \unskip\fi}
+\def\addtabitem#1{\ifnum\colnum>0 \addtabdata{&}\addto\ddlinedata{&\dditem}\fi
+ \advance\colnum by1 \let\tmpa=\relax \expandafter\addtabdata\expandafter{#1}}
+\def\addtabdata#1{\expandafter\tabdata\expandafter{\the\tabdata#1}}
+\def\addtabvrule{\ifx\tmpa\vrule \addtabdata{\kern\vvkern}%
+ \ifnum\colnum=0\def\vvleft{\vvitem}\else\addto\ddlinedata{\vvitem}\fi\fi
+ \let\tmpa=\vrule \addtabdata{\vrule}}
+
+\def\crl{\cr\noalign{\hrule}}
+\def\crll{\cr\noalign{\hrule\kern\hhkern\hrule}}
+
+\def\crli{\cr \omit \gdef\dditem{\omit\tablinefil}\gdef\vvitem{\tabvvline}%
+ \vvleft\tablinefil\ddlinedata\cr}
+\def\crlli{\crli\noalign{\kern\hhkern}\crli}
+\def\tablinefil{\leaders\hrule\hfil}
+\def\tabvvline{\vrule\kern\vvkern\vrule}
+
+\def\tskip{\afterassignment\tskipA \tmpdim}
+\def\tskipA{\gdef\dditem{}\gdef\vvitem{}\gdef\tabstrutA{}%
+ \vrule height\tmpdim width0pt \ddlinedata\cr
+ \gdef\tabstrutA{\tabstrut}}
+
+\let\orihrule=\hrule \let\orivrule=\vrule
+\def\rulewidth{\afterassignment\rulewidthA \tmpdim}
+\def\rulewidthA{\edef\hrule{\orihrule height\the\tmpdim}%
+ \edef\vrule{\orivrule width\the\tmpdim}}
+
+\def\frame#1{\setbox0=\hbox{#1}\setbox1=\vbox{\hrule}%
+ \tmpdim=\dp0 \advance\tmpdim by\ht1 \advance\tmpdim by\hhkern
+ \vbox{\hrule\hbox{\vrule\kern\vvkern
+ \vbox{\kern\hhkern\box0\kern\hhkern}\kern\vvkern\vrule}%
+ \hrule\kern-\tmpdim\hbox{\vrule depth\tmpdim width0pt}}}
+
+
+%%%%%%%%%%%%%% \inspic -- sec. 3.20 in opmac-d.pdf
+
+\newdimen\picw \picw=0pt
+
+\ifpdftex
+ \def\inspic #1 {\ifdim\picw=0pt
+ \opwarning{\noexpand\inspic -- the width \noexpand\picw is not set}%
+ \else
+ \hbox{\pdfximage width\picw {\picdir#1}\pdfrefximage\pdflastximage}%
+ \fi
+ }
+\else
+ \def\inspic #1 {\opwarning
+ {The \noexpand\inspic is supported for PDF output only}}
+\fi
+
+%%%%%%%%%%%%%%% transformation matrix -- sec. 3.21 in opmac-d.pdf
+
+\def\pdfscale#1#2{\pdfsetmatrix{#1 0 0 #2}}
+
+\def\pdfrotate#1{\tmpdim=#1pt
+ \ifdim\tmpdim=0pt
+ \else \ifdim\tmpdim=90pt \pdfsetmatrix{0 1 -1 0}%
+ \else \edef\tmp{#1}\expandafter\pdfrotateA\tmp..\relax
+ \fi \fi
+}
+\def\pdfrotateA #1.#2.#3\relax{%
+ \def\tmp##1.##2\relax {##1}%
+ \tmpnum=\expandafter \tmp \the\tmpdim \relax % round
+ \ifdim\tmpdim>0pt \def\tmpa{}\else\def\tmpa{-}\fi % save -
+ \loop \ifnum\tmpnum<0 \advance\tmpnum by360 \repeat
+ \loop \ifnum\tmpnum>360 \advance\tmpnum by-360 \repeat
+ \loop \ifnum\tmpnum>90 \pdfrotate{90}\advance\tmpnum by-90 \repeat
+ \ifnum\tmpnum=90 \pdfrotate{90}\else
+ \ifnum\tmpnum>44 \pdfsetmatrix{.7071 .7071 -.7071 .7071}%
+ \advance\tmpnum by-45 \fi
+ \ifnum\tmpnum>22 \pdfsetmatrix{.9272 .3746 -.3746 .9272}%
+ \advance\tmpnum by-22 \fi
+ \ifnum\tmpnum>0
+ \pdfsetmatrix{\smallcos \smallsin -\smallsin \smallcos}%
+ \fi\fi
+ \if$#2$\else % fraction part
+ \tmpdim=.01745329pt % \pi/180
+ \tmpdim=.#2\tmpdim %
+ \edef\tmp{\expandafter\ignorept\the\tmpdim\space}%
+ \ifx\tmpa\empty \pdfsetmatrix{1 \tmp -\tmp 1}%
+ \else \pdfsetmatrix{1 -\tmp \tmp 1}%
+ \fi\fi
+}
+\def\smallcos{.\ifcase\tmpnum \or9998\or9994\or9986\or9976\or9962\or9945\or
+ 9925\or9903\or9877\or9848\or9816\or9781\or9744\or9703\or9659\or9613\or
+ 9563\or9511\or9455\or9397\or9336\or9272\fi\space}
+\def\smallsin{.\ifcase\tmpnum 0\or0175\or0359\or0523\or0698\or0872\or1045\or
+ 1219\or1391\or1564\or1736\or1908\or2079\or2250\or2419\or2588\or2756\or
+ 2924\or309\or3256\or342\or3584\or3746\fi\space}
+
+\ifpdftex \else
+ \def\pdfsetmatrix#1{} \def\pdfsave{} \def\pdfrestore{}
+\fi
+
+
+%%%%%%%%%%%%%% \fnote, \mnote -- sec 3.22 in opmac-d.pdf
+
+\newcount\fnotenum \fnotenum=0
+\newcount\fnotenumlocal
+
+\def\fnote#1{\global\advance \fnotenum by1
+ \leavevmode\openref\wref\Xfnote{}%
+ \isdefined{fn:\the\fnotenum}\iftrue
+ \else\opwarning{unknown \noexpand\fnote mark. TeX me again}\fi
+ \fnmarkx{\typoscale[800/800]\vfootnote\fnmarkx{#1}}%
+}
+\def\fnotemark#1{{\advance\fnotenum by#1\relax
+ \isdefined{fn:\the\fnotenum}\iftrue\thefnote
+ \else$^?$\opwarning{unknown \string\fnotemark. TeX me again}\fi}%
+}
+\def\fnotetext#1{\global\advance \fnotenum by1 \openref\wref\Xfnote{}%
+ {\typoscale[800/800]\vfootnote\fnmarkx{#1}}
+}
+\def\fnmarkx{\isdefined{fn:\the\fnotenum}\iftrue\thefnote\else$^?$\fi}
+\def\thefnote{$^{\locfnum}$)}
+\def\locfnum{\csname fn:\the\fnotenum\endcsname}
+
+\def\Xfnote{\advance\fnotenumlocal by1 \advance\fnotenum by1
+ \sxdef{fn:\the\fnotenum}{\the\fnotenumlocal}}
+
+\newcount\mnotenum \mnotenum=0 % global counter of mnotes
+
+\def\mnote#1{\ifvmode \mnoteA{#1}\nobreak\vskip-\baselineskip
+ \else \strut\vadjust{\kern-\dp\strutbox \mnoteA{#1}\kern\dp\strutbox}%
+ \fi
+}
+\def\mnoteA#1{\global\advance \mnotenum by1
+ \isdefined{mn:\the\mnotenum}\iftrue
+ \else\opwarning{unknown \noexpand\mnote side. TeX me again}\fi
+ \edef\tmp{\csname mn:\the\mnotenum\endcsname}%
+ \openref\wref\Xmnote{}%
+ \expandafter\ifx\tmp \left
+ \hbox to0pt{\kern-\mnotesize \kern-\mnoteindent
+ \vbox to0pt{\vss \setbox0=\vtop{%
+ \hsize=\mnotesize \leftskip=0pt plus 1fill\noindent#1}%
+ \dp0=0pt \box0}\hss}%
+ \else
+ \hbox to0pt{\kern\hsize \kern\mnoteindent
+ \vbox to0pt{\vss \setbox0=\vtop{%
+ \hsize=\mnotesize \rightskip=0pt plus 1fil\noindent#1}%
+ \dp0=0pt \box0}\hss}%
+ \fi
+}
+\def\Xmnote{\advance\mnotenum by1
+ \sxdef{mn:\the\mnotenum}{\ifodd\lastpage \right \else \left \fi}}
+
+\def\fixmnotes#1{\tmpnum=0
+ \loop \advance\tmpnum by1
+ \isdefined{mn:\the\tmpnum}\iftrue \sxdef{mn:\the\tmpnum}{#1}\repeat}
+
+%%%%%%%%%%%%%% \cite, \bib, \usebibtex, \usebbl -- sec. 3.23 in opmac-d.pdf
+
+\newwrite\auxfile % AUX file for BibTeX
+\newcount\bibnum % the bibitem counter
+\newcount\lastcitenum \lastcitenum=0 % for \shortcitations
+
+\def\cite[#1]{{[\chardef\tmpb=0 \citeA #1,,,%
+ \ifnum\tmpb>0 \printdashcite{\the\tmpb}\fi]}}
+\def\nocite[#1]{{\def\docite##1{}\citeA #1,,,}}
+\def\citeA #1#2,{\if#1,\else \rcite{#1#2}\expandafter\citeA\fi}
+\def\citesep{}
+
+\def\rcite#1{%
+ \if *#1\addcitelist{*}\expandafter \skiptorelax \fi
+ \expandafter \ifx \csname bib:#1\endcsname \relax
+ \addcitelist{#1}%
+ \opwarning{The cite [#1] unknown. Try to TeX me again}%
+ \docite{}\openref
+ \expandafter\gdef\csname bib:#1\endcsname {}%
+ \expandafter \skiptorelax \fi
+ \expandafter \ifx \csname bib:#1\endcsname \empty
+ \docite{}%
+ \expandafter \skiptorelax \fi
+ \def\bibnn##1{}%
+ \if &\csname bib:#1\endcsname
+ \addcitelist{#1}%
+ \def\bibnn##1##2{##1}%
+ \sxdef{bib:#1}{\csname bib:#1\endcsname}%
+ \fi
+ \docite{\csname bib:#1\endcsname}%
+ \relax
+}
+\def\printcite#1{\citesep\citelink{#1}\def\citesep{,\hskip.2em\relax}}
+\def\printdashcite#1{\hbox{--}\citelink{#1}}
+
+\def\docite#1{\if$#1$??%
+ \else
+ \ifnum\lastcitenum=0 % only comma separated list
+ \printcite{#1}%
+ \else
+ \ifx\citesep\empty % first cite item
+ \lastcitenum=#1\relax
+ \printcite{#1}%
+ \else % next cite item
+ \advance\lastcitenum by1
+ \ifnum\lastcitenum=#1\relax % cosecutive cite item
+ \mathchardef\tmpb=\lastcitenum
+ \else % there is a gap between cite items
+ \lastcitenum=#1\relax
+ \ifnum\tmpb=0 % previous items were printed
+ \printcite{#1}%
+ \else
+ \printdashcite{\the\tmpb}\printcite{#1}\chardef\tmpb=0
+ \fi\fi\fi\fi\fi
+}
+\def\shortcitations{\lastcitenum=1 }
+
+\def\bib[#1]{\par \ifnum\bibnum>0 \bibskip \fi
+ \advance\bibnum by1
+ \wbib{#1}{\the\bibnum}%
+ \hangindent=\iindent \hangafter=1
+ \noindent \dest[cite:\the\bibnum]{1.2em}%
+ \hskip\iindent \llap{[\the\bibnum] }\ignorespaces
+}
+\def\wbib#1#2{\edef\tmp{\wref\Xbib{{#1}{#2}}}%
+ \ifx\tmp\empty\else \immediate\tmp \fi
+}
+\def\Xbib#1#2{\sdef{bib:#1}{\bibnn{#2}&}}
+
+\def\addcitelist#1{\global\addto\citelist{\lcite[#1]}}
+\def\writeaux#1{\immediate\write\auxfile{\string\citation{#1}}}
+\def\writeXcite#1{\openref\immediate\wref\Xcite{{#1}}}
+\def\citelist{} \def\citelistB{}
+
+\def\usebibtex#1#2{%
+ \openref \openauxfile{#1}{#2}%
+ \def\lcite[##1]{\writeaux{##1}}\citelist
+ \global\let\addcitelist=\writeaux
+ \bgroup \readbblfile{\jobname}\egroup
+}
+\def\openauxfile#1#2{%
+ \immediate\openout\auxfile=\jobname.aux
+ \immediate\write\auxfile
+ {\percent\percent\space Opmac: AUX file reserved for bibtex only}%
+ \immediate\write\auxfile{\string\bibdata{#1}}%
+ \immediate\write\auxfile{\string\bibstyle{#2}}%
+}
+\def\readbblfile #1{%
+ \openin\testin=#1.bbl
+ \ifeof\testin
+ \opwarning{.bbl file doesn't exist.
+ Use the ``bibtex #1'' command}%
+ \else
+ \closein\testin
+ \bibnum=0
+ \def\begin##1##2{}\def\end##1{}% LaTeX environment
+ \def\newcommand##1 {}%
+ \def\httpAddr##1{\url{http:##1}}\def\\{\hfill\break}%
+ \def\newblock{\hskip .11em plus.33em minus.07em}%
+ \def\mbox{\leavevmode\hbox}\let\em=\it
+ \leftskip=\iindent
+ \bibtexhook\relax
+ \input #1.bbl
+ \par
+ \fi
+}
+\def\bibitem{\isnextchar[{\bibitemB}{\def\tmpa{}\bibitemC}}
+\def\bibitemB[#1]{\def\tmpa{#1}\bibitemC}
+\def\bibitemC#1{\bibitemD{#1}}
+\def\bibitemD#1{\ifnum\bibnum>0 \bibskip \fi
+ \advance\bibnum by1
+ \noindent \dest[cite:\if$\tmpa$\the\bibnum\else\tmpa\fi]{1.2em}%
+ \if$\tmpa$\llap{[\the\bibnum] }\wbib{#1}{\the\bibnum}\else
+ \hskip-\iindent [\tmpa]\wbib{#1}{\tmpa}\enskip
+ \fi
+ \ignorespaces
+}
+\def\genbbl#1#2{\openauxfile{#1}{#2}%
+ \immediate\write\auxfile{\string\citation{*}}%
+ \bgroup
+ \iindent=4em
+ \def\bibitemC##1{\ifnum\bibnum>0 \bibskip \fi
+ \advance\bibnum by1
+ \noindent \llap{[##1]\enspace}\ignorespaces
+ }%
+ \readbblfile{\jobname}%
+ \egroup
+}
+\def\usebbl/#1 #2 {\isdefined{bbl:#1}%
+ \iftrue \csname bbl:#1\endcsname {#2}\else
+ \opwarning{\string\usebbl/#1 #2 ... the `#1' type undefined}%
+ \fi
+}
+\sdef{bbl:a}#1{\bgroup \readbblfile{#1}\egroup}
+
+\sdef{bbl:b}#1{\bgroup
+ \let\lcite=\relax \xdef\citelist{\citelist\citelistB}%
+ \def\bibitemC##1 ##2\par{%
+ \isinlist\citelist{[##1]}\iftrue \bibitemD{##1}##2\par\fi}%
+ \readbblfile{#1}%
+ \global\let\addcitelist=\writeXcite
+ \egroup
+}
+\sdef{bbl:c}#1{\bgroup
+ \let\lcite=\relax \xdef\citelist{\citelist\citelistB}%
+ \def\bibitemC##1 ##2\par{%
+ \isinlist\citelist{[##1]}\iftrue
+ \ifx\tmpa\empty \sdef{bb:##1}{\bibitemD{##1}##2\par}%
+ \else \toks0={##2\par}%
+ \edef\tmpa{\noexpand\sdef{bb:##1}{% \tmpa have to expand
+ \noexpand\bibitemB[\tmpa]{##1}\the\toks0}}\tmpa
+ \fi\fi}%
+ \readbblfile{#1}%
+ \def\bibitemC##1{\bibitemD{##1}}%
+ \def\lcite[##1]{\csname bb:##1\endcsname}\citelist
+ \global\let\addcitelist=\writeXcite
+ \egroup
+}
+\def\Xcite#1{\addto\citelistB{\lcite[#1]}}
+
+
+%%%%%%%%%%%%%% output -- sec. 3.24 in opmac-d.pdf
+
+\output={\opmacoutput}
+
+\def\opmacoutput{\def\nl{ }%
+ \setbox0=\vbox{\makeheadline\prepage\pagebody\makefootline}%
+ \pghook \protectlist
+ \shipout\box0 \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+\def\doprotect#1{\let#1=\relax}
+
+\def\prepage{\wref\Xpage{{\the\pageno}}%
+ \dest[pg:\the\pageno]{25pt}%
+ \csname pg:\the\pageno\endcsname
+}
+
+\footline={\locpgcolor\Black \hss\tenrm\thefontsize[10]\the\pageno\hss}
+
+
+%%%%%%%%%%%%%% margins -- sec. 3.25 in opmac-d.pdf
+
+\newdimen\pgwidth \newdimen\pgheight \pgwidth=0pt
+\newdimen\shiftoffset
+
+\def\margins/#1 #2 (#3,#4,#5,#6)#7 {\def\tmp{#7}%
+ \ifx\tmp\empty
+ \opwarning{\string\margins: missing unit, mm inserted}\def\tmp{mm}\fi
+ \addto\tmp{\relax}%
+ \setpagedimens #2 % setting \pgwidth, \pgheight
+ \ifdim\pgwidth=0pt \else
+ \hoffset=-1\trueunit in \voffset=-1\trueunit in
+ \if$#3$\if$#4$\tmpdim=\pgwidth \advance\tmpdim -\hsize
+ \divide\tmpdim by2 \advance\hoffset \tmpdim % left=right
+ \else \rbmargin\hoffset\hsize{#4\tmp}% only right margin
+ \fi
+ \else \if$#4$\advance\hoffset #3\tmp % only left margin
+ \else \hsize=\pgwidth % left+right margin
+ \advance\hsize -#3\tmp \advance\hsize -#4\tmp
+ \advance\hoffset #3\tmp
+ \fi\fi
+ \if$#5$\if$#6$\tmpdim=\pgheight \advance\tmpdim -\vsize
+ \divide\tmpdim by2 \advance\voffset \tmpdim % top=bottom
+ \else \rbmargin\voffset\vsize{#6\tmp}% only bottom margin
+ \fi
+ \else \if$#6$\advance\voffset #5\tmp % only top margin
+ \else \vsize=\pgheight % top+bottom margin
+ \advance\vsize -#5\tmp \advance\vsize -#6\tmp
+ \advance\voffset #5\tmp
+ \fi\fi
+ \if 1#1\else \if 2#1% double-page layout
+ \shiftoffset=\pgwidth \advance\shiftoffset -\hsize
+ \advance\shiftoffset -2\hoffset \advance\shiftoffset -2in
+ \addto\pghook{\ifodd\pageno \else \advance\hoffset \shiftoffset \fi}
+ \else \opwarning{use \string\margins/1 or \string\margins/2}%
+ \fi\fi\fi
+}
+\def\rbmargin#1#2#3{\advance#1\pgwidth \advance#1-#2 \advance#1-#3}
+
+\def\setpagedimens#1 {\isdefined{pgs:#1}\iftrue
+ \expandafter\expandafter\expandafter \setpagedimensA \csname pgs:#1\endcsname&%
+ \else \opwarning{page specification "#1" is undefined}\fi}
+\def\setpagedimensA (#1,#2)#3&{\pgwidth=#1\trueunit#3 \pgheight=#2\trueunit#3\relax
+ \ifx\pdfpagewidth\undefined \else
+ \pdfpagewidth=\pgwidth \pdfpageheight=\pgheight \fi}
+
+\sdef{pgs:a3}{(297,420)mm} \sdef{pgs:a4}{(210,297)mm} \sdef{pgs:a5}{(148,210)mm}
+\sdef{pgs:a3l}{(420,297)mm} \sdef{pgs:a4l}{(297,210)mm} \sdef{pgs:a5l}{(210,148)mm}
+\sdef{pgs:b5}{(176,250)mm} \sdef{pgs:letter}{(8.5,11)in}
+
+\def\trueunit{}
+\def\magscale[#1]{\mag=#1\def\trueunit{true}%
+ \ifdim\pgwidth=0pt \else \truedimen\pgwidth \truedimen\pgheight \fi
+ \ifx\pdfpagewidth\undefined \else
+ \truedimen\pdfpagewidth \truedimen\pdfpageheight
+ \pdfhorigin=1truein \pdfvorigin=1truein % Origin is independent off \mag
+ \fi}
+\def\truedimen#1{#1=\expandafter\ignorept\the#1truept }
+
+%%%%%%%%%%%%%% REF file is read now -- sec 3.26 in opmac-d.pdf
+
+\inputref
+\endinput
+
+%%%%%%%%%%%%%% History of versions:
+
+beta (a) Nov. 2012 ... first released version.
+Dec. 2012 ... first stable version
+
+%%%%%%%%%%%%%% End of opmac.tex
+