summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-25 21:50:26 +0000
committerKarl Berry <karl@freefriends.org>2016-04-25 21:50:26 +0000
commit6b9c748b268e3e8cc785287f5d31bc7e15db2e76 (patch)
treef9864d3619856f96457e0dee23a45b4a96d07e3d
parentad6971d5fe287aa59138369c498a8037d6832589 (diff)
csplain (25apr16)
git-svn-id: svn://tug.org/texlive/trunk@40747 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/csplain/base/csplain.ini6
-rw-r--r--Master/texmf-dist/tex/csplain/base/plaina4.tex10
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cavantga.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cbookman.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/chelvet.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cncent.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cpalatin.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex65
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-antt.tex90
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-arev.tex29
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-bera.tex53
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex66
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-charter.tex33
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex67
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-heros.tex298
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex66
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-polta.tex133
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-schola.tex66
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-termes.tex66
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/ctimes.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/ff-mac.tex148
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/fontfam-catalog.tex55
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex34
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/fontfam.tex126
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex12
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac.tex20
26 files changed, 1058 insertions, 415 deletions
diff --git a/Master/texmf-dist/tex/csplain/base/csplain.ini b/Master/texmf-dist/tex/csplain/base/csplain.ini
index b773142266c..2f54f278bcb 100644
--- a/Master/texmf-dist/tex/csplain/base/csplain.ini
+++ b/Master/texmf-dist/tex/csplain/base/csplain.ini
@@ -13,7 +13,7 @@
\input plaina4 % \hsize and \vsize for A4
\everyjob=\expandafter{\the\everyjob
- \message{The format: csplain <Mar. 2016>.}
+ \message{The format: csplain <Apr. 2016>.}
\message{The cs-fonts are preloaded and A4 size implicitly defined.}}
\ifx\xprncode\undefined \else %% The encTeX is detected
\count255=128 % All codes > 128 are printable:
@@ -245,6 +245,10 @@ file extcode.tex renamed to il2code.tex (suggested by Jan Kasprzak)
* \input luatex85.sty for LuaTeX specific added
* \input ucode for XeTeX and LuaTeX as default
+** 17 ** <Apr. 2016>
+* plaina4: \recount@true for \pdfpagewidth,height added
+* ff-mac.tex introduced, cs-*.tex rewritten based on ff-mac.tex
+
COPYRIGHT
=========
diff --git a/Master/texmf-dist/tex/csplain/base/plaina4.tex b/Master/texmf-dist/tex/csplain/base/plaina4.tex
index de7966476da..5a5db96dae4 100644
--- a/Master/texmf-dist/tex/csplain/base/plaina4.tex
+++ b/Master/texmf-dist/tex/csplain/base/plaina4.tex
@@ -14,11 +14,13 @@
\gdef\m@g{\mag\count@
\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
+ \recount@true\pdfpagewidth % \recont@true added by P. O Apr. 2016
+ \recount@true\pdfpageheight % because media size is distribution-dependent
+ \recount@true\pdfhorigin
+ \recount@true\pdfvorigin
\fi
}
+\gdef\recount@true#1{#1=\expandafter\recount@trueA\the#1truept\relax}
+{\catcode`p=12 \gdef\recount@trueA#1p#2{#1}}
}
diff --git a/Master/texmf-dist/tex/csplain/fonts/cavantga.tex b/Master/texmf-dist/tex/csplain/fonts/cavantga.tex
index 0ee89f56310..fd1276c0412 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cavantga.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cavantga.tex
@@ -24,8 +24,6 @@
\ifx\font\corkencoded \else \input chars-8z \fi
-\ifx\mathpreloaded X\else \input tx-math \fi
-
\let\setsimplemath=\relax % this command is obsolete
% The \TeX logo corrected by Ivo Jancik for AvantGarde fonts family
@@ -33,4 +31,7 @@
\ifx\origTeX\undefined \let\origTeX=\TeX \fi
\let\TeX=\agTeX
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+
% end of cavantga.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cbookman.tex b/Master/texmf-dist/tex/csplain/fonts/cbookman.tex
index 5fa2a157dc9..0cc2266d9a9 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cbookman.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cbookman.tex
@@ -24,8 +24,6 @@
\ifx\font\corkencoded \else \input chars-8z \fi
-\ifx\mathpreloaded X\else \input tx-math \fi
-
\let\setsimplemath=\relax % this command is obsolete
% The \TeX logo corrected by Ivo Jancik for Bookman fonts family
@@ -33,4 +31,7 @@
\ifx\origTeX\undefined \let\origTeX=\TeX \fi
\let\TeX=\bmTeX
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+
% end of cbookman.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/chelvet.tex b/Master/texmf-dist/tex/csplain/fonts/chelvet.tex
index 3209362ced3..85a5cb7c1e9 100644
--- a/Master/texmf-dist/tex/csplain/fonts/chelvet.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/chelvet.tex
@@ -52,8 +52,6 @@
\ifx\font\corkencoded \else \input chars-8z \fi
-\ifx\mathpreloaded X\else \input tx-math \fi
-
\let\setsimplemath=\relax % this command is obsolete
% The \TeX logo corrected by Ivo Jancik for Helvetica fonts family
@@ -61,4 +59,7 @@
\ifx\origTeX\undefined \let\origTeX=\TeX \fi
\let\TeX=\hvTeX
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+
% end of chelvet.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cncent.tex b/Master/texmf-dist/tex/csplain/fonts/cncent.tex
index 9a180a76776..dc73e350851 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cncent.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cncent.tex
@@ -24,8 +24,6 @@
\ifx\font\corkencoded \else \input chars-8z \fi
-\ifx\mathpreloaded X\else \input tx-math \fi
-
\let\setsimplemath=\relax % this command is obsolete
% The \TeX logo corrected by Ivo Jancik for NewCentury fonts family
@@ -33,4 +31,7 @@
\ifx\origTeX\undefined \let\origTeX=\TeX \fi
\let\TeX=\ncTeX
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+
% end of cncent.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex b/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex
index 8fe9b45ce3f..5a27e50558b 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cpalatin.tex
@@ -24,8 +24,6 @@
\ifx\font\corkencoded \else \input chars-8z \fi
-\ifx\mathpreloaded X\else \input tx-math \fi
-
\let\setsimplemath=\relax % this command is obsolete
% The \TeX logo corrected by Ivo Jancik for Palatino fonts family
@@ -33,4 +31,7 @@
\ifx\origTeX\undefined \let\origTeX=\TeX \fi
\let\TeX=\palTeX
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+
% 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
index 75c3e994890..5bece955b4b 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-adventor.tex
@@ -1,42 +1,53 @@
-% The file cs-adventor.tex (C) Petr Olsak, 2012
-% Use "\input cs-adventor" to set the Termes fonts family in text mode
+% The file cs-adventor.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-adventor" to set the TG Adventor font family in text mode
-\message{FONT: Adventor -
- \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+\ifx\ffdecl\undefined \input ff-mac \fi
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+\ffdecl [TG Adventor] {\rm \bf \it \bi} {\caps} {} {TX} {8z 8t U}
-\ifx\font\unicoded \def\famname{texgyreadventor} \input unifam
-\else
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
-\font\tenrm=\tmp-qagr \sizespec
-\font\tenbf=\tmp-qagb \sizespec
-\font\tenit=\tmp-qagri \sizespec
-\font\tenbi=\tmp-qagbi \sizespec
+\ismacro\fotenc{8t}\ifttrue
-\font\tenrmc=\tmp-qagr-sc \sizespec
-\font\tenbfc=\tmp-qagb-sc \sizespec
-\font\tenitc=\tmp-qagri-sc \sizespec
-\font\tenbic=\tmp-qagbi-sc \sizespec
+ \font\tenrm = ec-qagr \sizespec
+ \font\tenbf = ec-qagb \sizespec
+ \font\tenit = ec-qagri \sizespec
+ \font\tenbi = ec-qagbi \sizespec
+
+ \def\ffnamegen{ec-qag\ffvarV\capsV}
\fi
-\tenrm
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-qagr \sizespec
+ \font\tenbf = cs-qagb \sizespec
+ \font\tenit = cs-qagri \sizespec
+ \font\tenbi = cs-qagbi \sizespec
+
+ \def\ffnamegen{cs-qag\ffvarV\capsV}
+ \input chars-8z
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{U}\iftrue
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
+ \font\tenrm = "[texgyreadventor-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyreadventor-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyreadventor-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyreadventor-bolditalic]:\fontfeatures" \sizespec
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \def\ffnamegen{"[texgyreadventor-\ffvarV]:\capsV\fontfeatures"}
-% end of cs-adventor.tex
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex b/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex
index 927ec4a8cf8..0ec9f50b1d6 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-antt.tex
@@ -1,57 +1,47 @@
% 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\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenlr \regfont\tenli
- \regfont\tenmr \regfont\tenmi
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
- \regfont\tenlrc \regfont\tenlic
- \regfont\tenmrc \regfont\tenmic
+% Petr Olsak, 2012, 2016
+
+\ifx\ffdecl\undefined \input ff-mac \fi
+
+\ffdecl [Antykwa Torunska]
+ {\rm \bf \it \bi \lr \mr \li \mi} {} {\liweight} {TX} {8z 8t}
+
+\ffvars {r}{b}{ri}{bi}
+\def\wli{\ffvars{l}{m}{li}{mi}\ffsetX}
+\def\nowli{\ffvars{r}{b}{ri}{bi}\ffsetX}
+
+\ismacro\fotenc{8t}\ifttrue
+
+ \font\tenrm = ec-anttr \sizespec
+ \font\tenbf = ec-anttb \sizespec
+ \font\tenit = ec-anttri \sizespec
+ \font\tenbi = ec-anttbi \sizespec
+
+ \def\ffnamegen{ec-antt\ffvarV}
+
+\fi
+
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-anttr \sizespec
+ \font\tenbf = cs-anttb \sizespec
+ \font\tenit = cs-anttri \sizespec
+ \font\tenbi = cs-anttbi \sizespec
+
+ \def\ffnamegen{cs-antt\ffvarV}
+ \input chars-8z
+
\fi
+\tenrm % don't remember to initialize the family with normal font.
-\def\txr{cs-anttr} \def\txmi{mi-anttri}
-\def\txb{cs-anttb} \def\txbi{mi-anttbi}
+\def\liweight{\wli\fam}
+\def\lr{\wli\rm}
+\def\mr{\wli\bf}
+\def\li{\wli\it}
+\def\mi{\wli\bi}
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
+\ifx\loadmathfonts\relax \endinput \fi
\ifx\mathpreloaded X\else \input tx-math \fi
-% end of cs-antt.tex
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex b/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex
index 71df60b33ad..6ec209780bd 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-arev.tex
@@ -1,21 +1,24 @@
% cs-arev.tex: fonts loading file of ArevSans
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Petr Olsak, 2012
+% Petr Olsak, 2012, 2016
-\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
+\ifx\ffdecl\undefined \input ff-mac \fi
-\message{FONT: ArevSans -
- \string\rm, \string\it, \string\bf, \string\bi\space and math loaded.}
+\ffdecl [ArevSans] {\rm \bf \it \bi} {} {} {TX} {8t}
-\font\tenrm=favr\tmp
-\font\tenbf=favb\tmp
-\font\tenit=favri\tmp
-\font\tenbi=favbi\tmp
+\ismacro\fotenc{8t}\ifttrue
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \font\tenrm = favr8t \sizespec
+ \font\tenbf = favb8t \sizespec
+ \font\tenit = favri8t \sizespec
+ \font\tenbi = favbi8t \sizespec
+
+ \let\ffnamegen=\undefined % ... no modifiers
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
-% end of cs-arev.tex
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex b/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex
index c48d240a6e2..451ae6984ac 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-bera.tex
@@ -2,40 +2,29 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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
+\ifx\ffdecl\undefined \input ff-mac \fi
+
+\ffdecl [Bera] {\rm \bf \it \bi} {\sans} {} {TX} {8t}
+
+\ffvars {r}{b}{ro}{bo}
+\def\sans{\ffsetV{sans}{s}\ffsetX} \def\nosans{\ffsetV{sans}{e}\ffsetX}
+\def\sansV{e}
+
+\ismacro\fotenc{8t}\ifttrue
+
+ \font\tenrm = fver8t \sizespec
+ \font\tenbf = fveb8t \sizespec
+ \font\tenit = fvero8t \sizespec
+ \font\tenbi = fvebo8t \sizespec
+
+ \def\ffnamegen{fv\sansV \ffvarV 8t}
-\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\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrms \regfont\tenits
- \regfont\tenbfs \regfont\tenbis
- \regfont\tenttit
- \regfont\tenttbf \regfont\tenttbi
\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\def\sserif{\sans\fam}
+\ifx\loadmathfonts\relax \endinput \fi
\ifx\mathpreloaded X\else \input tx-math \fi
-% end of cs-bera.tex
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex b/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex
index 60528cfd5b1..b9098168624 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-bonum.tex
@@ -1,41 +1,53 @@
-% The file cs-bonum.tex (C) Petr Olsak, 2012
-% Use "\input cs-bonum" to set the Termes fonts family in text mode
+% The file cs-bonum.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-bonum" to set the TG Bonum font family in text mode
-\message{FONT: Bonum -
- \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+\ifx\ffdecl\undefined \input ff-mac \fi
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+\ffdecl [TG Bonum] {\rm \bf \it \bi} {\caps} {} {TX} {8z 8t U}
-\ifx\font\unicoded \def\famname{texgyrebonum} \input unifam
-\else
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
-\font\tenrm=\tmp-qbkr \sizespec
-\font\tenbf=\tmp-qbkb \sizespec
-\font\tenit=\tmp-qbkri \sizespec
-\font\tenbi=\tmp-qbkbi \sizespec
+\ismacro\fotenc{8t}\ifttrue
-\font\tenrmc=\tmp-qbkr-sc \sizespec
-\font\tenbfc=\tmp-qbkb-sc \sizespec
-\font\tenitc=\tmp-qbkri-sc \sizespec
-\font\tenbic=\tmp-qbkbi-sc \sizespec
+ \font\tenrm = ec-qbkr \sizespec
+ \font\tenbf = ec-qbkb \sizespec
+ \font\tenit = ec-qbkri \sizespec
+ \font\tenbi = ec-qbkbi \sizespec
+
+ \def\ffnamegen{ec-qbk\ffvarV\capsV}
\fi
-\tenrm
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-qbkr \sizespec
+ \font\tenbf = cs-qbkb \sizespec
+ \font\tenit = cs-qbkri \sizespec
+ \font\tenbi = cs-qbkbi \sizespec
+
+ \def\ffnamegen{cs-qbk\ffvarV\capsV}
+ \input chars-8z
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{U}\iftrue
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \font\tenrm = "[texgyrebonum-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyrebonum-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyrebonum-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyrebonum-bolditalic]:\fontfeatures" \sizespec
+
+ \def\ffnamegen{"[texgyrebonum-\ffvarV]:\capsV\fontfeatures"}
-% end of cs-bonum.tex
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex b/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex
index a1381320f14..05445a4b162 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-charter.tex
@@ -1,24 +1,33 @@
% cs-charter.tex: fonts loading file of Charter fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Petr Olsak, 2012
+% Petr Olsak, 2012, 2016
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{8t \sizespec}\else \def\tmp{8z \sizespec}\fi
+\ifx\ffdecl\undefined \input ff-mac \fi
-\message{FONT: Charter -
- \string\rm, \string\it, \string\bf, \string\bi}
+\ffdecl [Charter] {\rm \bf \it \bi} {} {} {TX} {8z 8t}
-\ifx\font\unicoded \message{WARNING: This font family is unavailable in UNICODE.}
- \endinput\fi
+\ismacro\fotenc{8t}\ifttrue
-\font\tenrm=bchr\tmp
-\font\tenbf=bchb\tmp
-\font\tenit=bchri\tmp
-\font\tenbi=bchbi\tmp
+ \font\tenrm = bchr8t
+ \font\tenbf = bchb8t
+ \font\tenit = bchri8t
+ \font\tenbi = bchbi8t
+
+\fi
+
+\ismacro\fotenc{8z}\ifttrue
+
+ \font\tenrm = bchr8z
+ \font\tenbf = bchb8z
+ \font\tenit = bchri8z
+ \font\tenbi = bchbi8z
+ \input chars-8z
+
+\fi
\tenrm
-\ifx\font\corkencoded\else \input chars-8z \fi
+\ifx\loadmathfonts\relax \endinput \fi
\ifx\mathpreloaded X\else \input tx-math \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
index 3639bd50ca6..3c37149f64b 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-cursor.tex
@@ -1,36 +1,53 @@
-% The file cs-cursor.tex (C) Petr Olsak, 2012
-% Use "\input cs-cursor" to set the Termes fonts family in text mode
+% The file cs-cursor.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-cursor" to set the TG Cursor font family in text mode
-\message{FONT: Termes -
- \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+\ifx\ffdecl\undefined \input ff-mac \fi
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+\ffdecl [TG Cursor] {\rm \bf \it \bi} {\caps} {} {TX} {8z 8t U}
-\font\tenrm=\tmp-qcrr \sizespec
-\font\tenbf=\tmp-qcrb \sizespec
-\font\tenit=\tmp-qcrri \sizespec
-\font\tenbi=\tmp-qcrbi \sizespec
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
-\font\tenrmc=\tmp-qcrr-sc \sizespec
-\font\tenbfc=\tmp-qcrb-sc \sizespec
-\font\tenitc=\tmp-qcrri-sc \sizespec
-\font\tenbic=\tmp-qcrbi-sc \sizespec
+\ismacro\fotenc{8t}\ifttrue
-\tenrm
+ \font\tenrm = ec-qcrr \sizespec
+ \font\tenbf = ec-qcrb \sizespec
+ \font\tenit = ec-qcrri \sizespec
+ \font\tenbi = ec-qcrbi \sizespec
+
+ \def\ffnamegen{ec-qcr\ffvarV\capsV}
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{8z}\iftrue
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \font\tenrm = cs-qcrr \sizespec
+ \font\tenbf = cs-qcrb \sizespec
+ \font\tenit = cs-qcrri \sizespec
+ \font\tenbi = cs-qcrbi \sizespec
+
+ \def\ffnamegen{cs-qcr\ffvarV\capsV}
+ \input chars-8z
+
+\fi
+
+\ismacro\fotenc{U}\iftrue
-% end of cs-cursor.tex
+ \font\tenrm = "[texgyrecursor-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyrecursor-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyrecursor-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyrecursor-bolditalic]:\fontfeatures" \sizespec
+
+ \def\ffnamegen{"[texgyrecursor-\ffvarV]:\capsV\fontfeatures"}
+
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
index 92d9b08a7eb..c2f9b698dc6 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
@@ -1,66 +1,254 @@
-% 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
-
-\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
+% The file cs-heros.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-heros" to set the TG Heros font family in text mode
+
+% See end of this file for more information
+
+\ifx\ffdecl\undefined \input ff-mac \fi
+
+\ffdecl [TG Heros] {\rm \bf \it \bi} {\caps \cond} {} {TX} {8z 8t U}
+
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\cond{\ffsetV{cond}{c}\ffsetX} \def\nocond{\ffsetV{cond}{}\ffsetX}
+\def\capsV{}
+\def\condV{}
+
+\ismacro\fotenc{8t}\ifttrue
+
+ \font\tenrm = ec-qhvr \sizespec
+ \font\tenbf = ec-qhvb \sizespec
+ \font\tenit = ec-qhvri \sizespec
+ \font\tenbi = ec-qhvbi \sizespec
+
+ \def\ffnamegen{ec-qhv\condV\ffvarV\capsV}
\fi
-\tenrm
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-qhvr \sizespec
+ \font\tenbf = cs-qhvb \sizespec
+ \font\tenit = cs-qhvri \sizespec
+ \font\tenbi = cs-qhvbi \sizespec
+
+ \def\ffnamegen{cs-qhv\condV\ffvarV\capsV}
+ \input chars-8z
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
- \regfont\tenrmn \regfont\tenitn
- \regfont\tenbfn \regfont\tenbin
- \regfont\tenrmnc \regfont\tenitnc
- \regfont\tenbfnc \regfont\tenbinc
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{U}\iftrue
+
+ \font\tenrm = "[texgyreheros-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyreheros-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyreheros-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyreheros-bolditalic]:\fontfeatures" \sizespec
-\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}
+ \def\ffnamegen{"[texgyreheros\condV-\ffvarV]:\capsV\fontfeatures"}
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+ \def\cond{\ffsetV{cond}{cn}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\def\narrow{\cond\fam}
+
+\ifx\loadmathfonts\relax \endinput \fi
\ifx\mathpreloaded X\else \input tx-math \fi
-% end of cs-heros.tex
+\endinput
+
+--------------------------------------------------------------
+
+For users
+=========
+
+There are four basic font selectors: \rm, \bf, \it, \bi. They are ready
+to print text in Heros (like Helvetica) variants after \input cs-heros.
+
+You can use "modifiers" of these basic variants: \cond, \caps. They can be
+independently combined but must be immediately followed by \rm, \bf, \it,
+\bi or \fam. Examples:
+
+\cond\rm ... Normal condensed.
+\caps\cond\it ... Caps & small-caps plus condensed italics.
+\caps\fam ... Caps & small-caps, now all basic selectors.
+ \rm, \bf, \it, \bi keeps this modification.
+
+All font selectors and their modifiers do setting locally inside TeX group.
+
+Note, that \modifier\fam keeps the currently selected basic variant. This
+variant is modified by \modifier\fam and all consecutive basic variant
+selectors are modified too. So, you can select all font features
+independently to others.
+
+{\it Italics \caps\fam caps italics, \bf caps bold \it caps italic.}
+
+but \modifier\rm (or \modifier\bf etc.) sets only one individual font.
+
+{\it Italic \caps\rm caps \bf normal bold}
+
+The TX math fonts are loaded together with this text family. If you need not
+load special fonts then you can set \let\loadmathfonts=\relax before \input
+cs-heros. Of course, you can input any different math font collection, for
+example \input ntx-math.
+
+You can combine fonts from more families. Load the main family last. You can
+use \ffletfont\newselector = {mod+var}{size} for keeping variants from
+previous loading. Example:
+
+\input cs-heros
+\ffletfont \titlefont = {\cond\bf}{at14pt} % Heros condensed for titles
+\input cs-termes % Termes at 10 pt for normal text
+
+If you are using XeTeX or LuaTeX then the U (unicode) encoding is used and
+OTF fonts are loaded. You can use \useff{text} in such case. This works like
+another modifier and does modification of font-features. Use
+otfinfo -f file.otf to inspect the font features of used font. Example:
+
+\useff{+onum;+salt}\bf ... use Bold variant with oldstyle digits and
+ stylistic alternatives
+\useff{+onum;+salt}\fam ... use given features for whole family.
+
+
+For font-file developers
+========================
+
+Use \ifx\ffdecl\undefined \input ff-mac \fi first. The ff-mac.tex macro file
+provides:
+
+\sizespec .. is empty or it keeps the special size specification of the font.
+\ffdecl .... prints font message and checks the font encoding.
+\ffvars .... declares four basic variants (values for \ffvarV)
+\setfmV, \setfm ... macros used in font modifiers
+\ismacro ... test if the macro is defined as given.
+\fotenc .... encoding of text fonts.
+\fontfeatures ... default (or user defined) fontfeatures if Unicode
+ fonts are used.
+\ffalias ... register alias of a font name.
+\regsizes .. register optical sizes.
+
+You must declare four basic variants \tenrm, \tembf, \tenit and \tenbi
+using \font primitive. These four basic variants work immediately after
+font-file is read because \rm, \bf, \it and \bi expands to \tenrm, \tenbf,
+\tenit and \tenbi.
+
+You can declare more cases for various font encondings. User can define font
+encoding by \def\fontenc{something}. Note, that ff-mac.tex keeps the \fotenc
+macro unchanged, but if it is not defined then it does:
+
+- \def\fotenc{8z} if CSplain is used without \input t1code nor \input ucode
+- \def\fotenc{8t} if \input t1code or pdfTeX without CSplain is used
+- \def\fotenc{U} if \input ucode or XeTeX or LuaTeX is used
+
+8z means IL2 encoding (default in CSplain), 8t means T1 encoding and U means
+Unicode.
+
+If the family does not provide all four basic variants then keep missing
+variants undeclared and use parameter {!} in appropriate \ffvars parameter.
+
+Last two lines in the code above loads the default math fonts. The "X"
+letter (as \mathpreloaded) is reserved for TX fonts collection. The "A"
+letter is reserved for AMS math fonts.
+
+
+\ffdecl [Family Name] {basic selectors} {modifiers} {comment} {math} {enc}
+-------------------------------------------------------------------------
+
+This macro stops reading the file (with warning) if the \fotenc is not
+included in the provided encodings given in the last parameter. Else it
+prints the message about font family, its selectors, modifiers and appends
+the comment.
+
+
+\ffvars {normal} {bold} {italic} {bolditalic}
+---------------------------------------------
+
+This macro gives the values to the \ffvarV macro dependent on what basic
+variant is needed. The \ffvarV macro is used in \ffnamegen. See below.
+
+If you need to implement font modifier (say \modfoo), then define
+
+\def\modfoo{\ffsetV{foo}{text}\ffsetX} \def\nomodfoo{\ffsetV{foo}{}\ffsetX}
+
+The \modfoo activate modifier and \nomodfoo deactivate it. The macro
+\ffsetV{foo}{text} define \fooV as text. So, you can use \fooV in \ffnamegen.
+
+Next, define default value for \fooV by \def\fooV{}.
+
+Finally, define the generic font name using \ffvarV and \fooV in it.
+These names are expanded to basic variant name given by \ffvars and the
+actual value of \fooV given by \ffsetV. For example, if the metric names of
+the font family are
+
+ baaRMwhat.tfm ... normal
+ baaBFwhat.tfm ... bold
+ baaRMwhatFF.tfm ... normal modified by FF
+ baaBFwhatFF.tfm ... bold modified by FF
+
+then declare \ffvars {RM} {BF} {!} {!} and define
+
+ \def\modfoo{\ffsetV{foo}{FF}\ffsetX} \def\nomodfoo{\ffsetV{foo}{}\ffsetX}
+
+and finaly define \ffnamegen as:
+
+ \def\ffnamegen{baa\ffvarV what\fooV}
+
+The font modifiers are based on the fact that font names of fonts includes
+these modifiers flags at given place in the name and they are independent
+one to another.
+
+All (modified) variants can be used in all various sizes by standard
+resizing tools given in CSplain or OPmac.
+
+
+\ffalias {virtual-name} {real-name}
+-----------------------------------
+
+The \ffalias macro provides substitution of virtual-name by real-name.
+The virtual-name is a result of the expansion of \ffnamegen and real-name is
+definitely used.
+
+Example. Suppose that baaBFwhatFF.tfm is not present and when the \modfoo\bf
+is used then error during loading baaBFwhatFF.tfm occurs. To avoid this, you
+can declare:
+
+\ffalias {baaBFwhatFF} {baaRMwhatFF}
+
+Now, the baaRMwhatFF.tfm is used instead baaBFwhatFF.tfm.
+
+
+\regsizes {modifiers} {data}
+----------------------------
+
+You can use \ffoptV in the \ffnamegen. It includes the optical size value of
+the font. For example, Antykwa Poltawkiego includes:
+
+ec-antpr6.tfm ec-antpr8.tfm ec-antpr10.tfm ec-antpr12.tfm ex-antpr17.tfm
+
+and analogical names are used for all basic variants {r}{b}{ri}{bi} and for
+\caps variants. You can see to the cs-polta.tex file that the \ffnamegen is
+defined by \def\ffnamegen{ec-antp\ffvarV\ffoptV\capsV}.
+
+If the \ffoptV is used in \ffnamegen then you must register optical
+sizes for all variants and modified variants into internal data structure.
+The \regsizes macro does this. Code from cs-polta.tex looks like this:
+
+\regsizes {} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {\wli} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {\wli\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
+
+There are two independent modifiers \wli and \caps, so there are four
+possible modifications. These modifications are included in the first
+parameter. The second "data" parameter includes couples
+"bondary =optsize boundary =optsize" etc. If the desired size is 11.5pt (for
+example) then it fits to the bounaries [11pt, 14pt), thus the value 12 is
+used in the \ffoptV macro.
+
+The \regsizes is implemented by \regtfm macro, see the ams-math.tex file.
+
+You cannot combine \ffalias together with \regsizes.
+----------------------------------------
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex b/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex
index 4e9d119b544..66d17c6c9aa 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-pagella.tex
@@ -1,41 +1,53 @@
-% The file cs-pagella.tex (C) Petr Olsak, 2012
-% Use "\input cs-pagella" to set the Termes fonts family in text mode
+% The file cs-pagella.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-pagella" to set the TG Pagella font family in text mode
-\message{FONT: Pagella -
- \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+\ifx\ffdecl\undefined \input ff-mac \fi
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+\ffdecl [TG Pagella] {\rm \bf \it \bi} {\caps} {} {TX} {8z 8t U}
-\ifx\font\unicoded \def\famname{texgyrepagella} \input unifam
-\else
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
-\font\tenrm=\tmp-qplr \sizespec
-\font\tenbf=\tmp-qplb \sizespec
-\font\tenit=\tmp-qplri \sizespec
-\font\tenbi=\tmp-qplbi \sizespec
+\ismacro\fotenc{8t}\ifttrue
-\font\tenrmc=\tmp-qplr-sc \sizespec
-\font\tenbfc=\tmp-qplb-sc \sizespec
-\font\tenitc=\tmp-qplri-sc \sizespec
-\font\tenbic=\tmp-qplbi-sc \sizespec
+ \font\tenrm = ec-qplr \sizespec
+ \font\tenbf = ec-qplb \sizespec
+ \font\tenit = ec-qplri \sizespec
+ \font\tenbi = ec-qplbi \sizespec
+
+ \def\ffnamegen{ec-qpl\ffvarV\capsV}
\fi
-\tenrm
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-qplr \sizespec
+ \font\tenbf = cs-qplb \sizespec
+ \font\tenit = cs-qplri \sizespec
+ \font\tenbi = cs-qplbi \sizespec
+
+ \def\ffnamegen{cs-qpl\ffvarV\capsV}
+ \input chars-8z
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{U}\iftrue
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \font\tenrm = "[texgyrepagella-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyrepagella-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyrepagella-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyrepagella-bolditalic]:\fontfeatures" \sizespec
+
+ \def\ffnamegen{"[texgyrepagella-\ffvarV]:\capsV\fontfeatures"}
-% end of cs-pagella.tex
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex b/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
index 9e1a92953e5..39d08eb6736 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
@@ -1,59 +1,82 @@
-% 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
-
-\let\dgsize=\undefined
-
-\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\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenlr \regfont\tenli
- \regfont\tenmr \regfont\tenmi
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
- \regfont\tenlrc \regfont\tenlic
- \regfont\tenmrc \regfont\tenmic
+% cs-polta.tex: fonts loading file of Antykwa Torunska
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2012, 2016
+
+\ifx\ffdecl\undefined \input ff-mac \fi
+
+\ffdecl [Antykwa Poltawskiego]
+ {\rm \bf \it \bi \lr \mr \li \mi} {\caps \wli} {} {TX} {8z 8t U}
+
+\ffvars {r}{b}{ri}{bi}
+\def\wli{\ffvars{l}{m}{li}{mi}\ffsetX}
+\def\nowli{\ffvars{r}{b}{ri}{bi}\ffsetX}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX}
+\def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
+
+\ismacro\fotenc{8t}\ifttrue
+
+ \font\tenrm = ec-antpr10 \sizespec
+ \font\tenbf = ec-antpb10 \sizespec
+ \font\tenit = ec-antpri10 \sizespec
+ \font\tenbi = ec-antpbi10 \sizespec
+
+ \def\ffnamegen{ec-antp\ffvarV\ffoptV\capsV}
+
\fi
-\ifx\mathpreloaded X\else \input tx-math \fi
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-antpr10 \sizespec
+ \font\tenbf = cs-antpb10 \sizespec
+ \font\tenit = cs-antpri10 \sizespec
+ \font\tenbi = cs-antpbi10 \sizespec
+
+ \def\ffnamegen{cs-antp\ffvarV\ffoptV\capsV}
+ \input chars-8z
+
+\fi
+
+\ismacro\fotenc{U}\iftrue
-\ifx\font\corkencoded \else \input chars-8z \fi
+ \font\tenrm = "[antpolt-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[antpolt-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[antpolt-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[antpolt-bolditalic]:\fontfeatures" \sizespec
+
+ \def\ffnamegen{"[antpolt\wliV\ffoptV-\ffvarV]:\capsV\fontfeatures"}
+
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\wli{\ffsetV{wli}{lt}\ffsetX}
+ \def\nowli{\ffsetV{wli}{}\ffsetX}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+ \def\nocaps{\ffsetV{caps}{}\ffsetX}
+ \def\wliV{}
+
+ \regsizes {} {0 =expd 7 =semiexpd 9 ={} 11 =semicond 14 =cond}
+ \regsizes {\wli} {0 =expd 7 =semiexpd 9 ={} 11 =semicond 14 =cond}
+ \regsizes {\caps} {0 =expd 7 =semiexpd 9 ={} 11 =semicond 14 =cond}
+ \regsizes {\wli\caps} {0 =expd 7 =semiexpd 9 ={} 11 =semicond 14 =cond}
+
+\else
+
+ \regsizes {} {0 =6 7 =8 9 =10 11 =12 14 =17}
+ \regsizes {\wli} {0 =6 7 =8 9 =10 11 =12 14 =17}
+ \regsizes {\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
+ \regsizes {\wli\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
+
+\fi
+
+\tenrm % don't remember to initialize the family with normal font.
+
+
+\def\liweight{\wli\fam}
+\def\lr{\wli\rm}
+\def\mr{\wli\bf}
+\def\li{\wli\it}
+\def\mi{\wli\bi}
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
-% end of cs-polta.tex
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex b/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex
index fb685604a5e..8a2cb8e88c9 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-schola.tex
@@ -1,41 +1,53 @@
-% The file cs-schola.tex (C) Petr Olsak, 2012
-% Use "\input cs-schola" to set the Termes fonts family in text mode
+% The file cs-schola.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-schola" to set the TG Schola font family in text mode
-\message{FONT: Schola -
- \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+\ifx\ffdecl\undefined \input ff-mac \fi
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+\ffdecl [TG Schola] {\rm \bf \it \bi} {\caps} {} {TX} {8z 8t U}
-\ifx\font\unicoded \def\famname{texgyreschola} \input unifam
-\else
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
-\font\tenrm=\tmp-qcsr \sizespec
-\font\tenbf=\tmp-qcsb \sizespec
-\font\tenit=\tmp-qcsri \sizespec
-\font\tenbi=\tmp-qcsbi \sizespec
+\ismacro\fotenc{8t}\ifttrue
-\font\tenrmc=\tmp-qcsr-sc \sizespec
-\font\tenbfc=\tmp-qcsb-sc \sizespec
-\font\tenitc=\tmp-qcsri-sc \sizespec
-\font\tenbic=\tmp-qcsbi-sc \sizespec
+ \font\tenrm = ec-qcsr \sizespec
+ \font\tenbf = ec-qcsb \sizespec
+ \font\tenit = ec-qcsri \sizespec
+ \font\tenbi = ec-qcsbi \sizespec
+
+ \def\ffnamegen{ec-qcs\ffvarV\capsV}
\fi
-\tenrm
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-qcsr \sizespec
+ \font\tenbf = cs-qcsb \sizespec
+ \font\tenit = cs-qcsri \sizespec
+ \font\tenbi = cs-qcsbi \sizespec
+
+ \def\ffnamegen{cs-qcs\ffvarV\capsV}
+ \input chars-8z
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{U}\iftrue
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \font\tenrm = "[texgyreschola-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyreschola-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyreschola-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyreschola-bolditalic]:\fontfeatures" \sizespec
+
+ \def\ffnamegen{"[texgyreschola-\ffvarV]:\capsV\fontfeatures"}
-% end of cs-schola.tex
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex b/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex
index b6225925eb4..228c9b5cd05 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-termes.tex
@@ -1,41 +1,53 @@
-% The file cs-termes.tex (C) Petr Olsak, 2012
-% Use "\input cs-termes" to set the Termes fonts family in text mode
+% The file cs-termes.tex (C) Petr Olsak, 2012, 2016
+% Use "\input cs-termes" to set the TG Termes font family in text mode
-\message{FONT: Termes -
- \string\rm, \string\it, \string\bf, \string\bi, \string\caps\string\rm...}
+\ifx\ffdecl\undefined \input ff-mac \fi
-\ifx\sizespec\undefined \def\sizespec{}\fi
-\ifx\font\corkencoded \def\tmp{ec}\else \def\tmp{cs}\fi
+\ffdecl [TG Termes] {\rm \bf \it \bi} {\caps} {} {TX} {8z 8t U}
-\ifx\font\unicoded \def\famname{texgyretermes} \input unifam
-\else
+\ffvars {r}{b}{ri}{bi}
+\def\caps{\ffsetV{caps}{-sc}\ffsetX} \def\nocaps{\ffsetV{caps}{}\ffsetX}
+\def\capsV{}
-\font\tenrm=\tmp-qtmr \sizespec
-\font\tenbf=\tmp-qtmb \sizespec
-\font\tenit=\tmp-qtmri \sizespec
-\font\tenbi=\tmp-qtmbi \sizespec
+\ismacro\fotenc{8t}\ifttrue
-\font\tenrmc=\tmp-qtmr-sc \sizespec
-\font\tenbfc=\tmp-qtmb-sc \sizespec
-\font\tenitc=\tmp-qtmri-sc \sizespec
-\font\tenbic=\tmp-qtmbi-sc \sizespec
+ \font\tenrm = ec-qtmr \sizespec
+ \font\tenbf = ec-qtmb \sizespec
+ \font\tenit = ec-qtmri \sizespec
+ \font\tenbi = ec-qtmbi \sizespec
+
+ \def\ffnamegen{ec-qtm\ffvarV\capsV}
\fi
-\tenrm
+\ismacro\fotenc{8z}\iftrue
+
+ \font\tenrm = cs-qtmr \sizespec
+ \font\tenbf = cs-qtmb \sizespec
+ \font\tenit = cs-qtmri \sizespec
+ \font\tenbi = cs-qtmbi \sizespec
+
+ \def\ffnamegen{cs-qtm\ffvarV\capsV}
+ \input chars-8z
-\ifx\regfontdefault\undefined \else
- \regfontdefault
- \regfont\tenrmc \regfont\tenitc
- \regfont\tenbfc \regfont\tenbic
\fi
-\def\caps#1{{\escapechar=-1 \expandafter}%
- \expandafter\csname\expandafter\tenonlytext\string#1c\endcsname}
-\def\tenonlytext{ten}
+\ismacro\fotenc{U}\iftrue
-\ifx\font\corkencoded\else \ifx\font\unicoded\else \input chars-8z \fi\fi
-\ifx\mathpreloaded X\else \input tx-math \fi
+ \font\tenrm = "[texgyretermes-regular]:\fontfeatures" \sizespec
+ \font\tenbf = "[texgyretermes-bold]:\fontfeatures" \sizespec
+ \font\tenit = "[texgyretermes-italic]:\fontfeatures" \sizespec
+ \font\tenbi = "[texgyretermes-bolditalic]:\fontfeatures" \sizespec
+
+ \def\ffnamegen{"[texgyretermes-\ffvarV]:\capsV\fontfeatures"}
-% end of cs-termes.tex
+ \ffvars {regular} {bold} {italic} {bolditalic}
+ \def\caps{\ffsetV{caps}{+smcp;}\ffsetX}
+
+\fi
+\tenrm % don't remember to initialize the family with normal font.
+
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/fonts/ctimes.tex b/Master/texmf-dist/tex/csplain/fonts/ctimes.tex
index 6b3fdb4aa4e..dd769e1aeb5 100644
--- a/Master/texmf-dist/tex/csplain/fonts/ctimes.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/ctimes.tex
@@ -24,8 +24,6 @@
\ifx\font\corkencoded \else \input chars-8z \fi
-\ifx\mathpreloaded X\else \input tx-math \fi
-
\let\setsimplemath=\relax % this command is obsolete
% The \TeX logo corrected by Ivo Jancik for Times fonts family
@@ -33,5 +31,8 @@
\ifx\origTeX\undefined \let\origTeX=\TeX \fi
\let\TeX=\tmTeX
+\ifx\loadmathfonts\relax \endinput \fi
+\ifx\mathpreloaded X\else \input tx-math \fi
+
% end of ctimes.tex
diff --git a/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex b/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex
new file mode 100644
index 00000000000..4d4a06d790c
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex
@@ -0,0 +1,148 @@
+% ff-mac.tex -- support for font files
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak 2016
+
+% This file is part of csplain package.
+% See the file cs-heros.tex for more details.
+
+\def\ffdecl [#1]#2#3#4#5#6{\ffdecltest#6 {}
+ \iftrue
+ {\toks2={#2}\toks3={#3}\toks4={#4}%
+ \immediate\write16{FONT: #1 - \the\toks2
+ \ifx\relax#3\relax\else ; mod:\the\toks3 \fi
+ \ifx\relax#4\relax\else ; \the\toks4 \fi
+ \ifx\loadmathfonts\relax \else ; +#5\fi}}%
+ \else
+ \message{WARNING: #1 family is not available in
+ \fotenc\space encoding. Ignored.}%
+ \endinput
+ \fi
+}
+\def\ffdecltest#1 {\ifx\relax#1\relax \expandafter \ffdecltestfin
+ \else
+ \ismacro\fotenc{#1}\iftrue \ffdecltestfound \fi
+ \expandafter\ffdecltest
+ \fi
+}
+\def\ffdecltestfin\iftrue{\iffalse}
+\def\ffdecltestfound#1\iftrue{\fi\fi \iftrue}
+
+\ifx\sizespec\undefined \def\sizespec{}\fi
+
+\ifx\fotenc\undefined
+ \ifx\chyph\undefined \def\fotenc{8t}\else \def\fotenc{8z}\fi
+ \ifx\font\corkencoded \def\fotenc{8t}\fi
+ \ifx\font\unicoded \def\fotenc{U}\fi
+ \def\tmp#1#2\relax{\def\tmp{#2}}\tmp ^^^^abcd\relax
+ \ifx\tmp\empty \def\fotenc{U}\fi % Unicode engine
+\fi
+
+\ifx\protected\undefined
+ \let\tryprotected=\relax
+ \ifx\addprotect\undefined \else
+ \addprotect\ffvars \addprotect\ffsetV \addprotect\ffsetY
+ \fi
+\else \let\tryprotected=\protected \fi
+
+\tryprotected\def\ffvars#1#2#3#4{%
+ \def\ffvarY##1{\ifcase##1 #1\or#2\or#3\or#4\fi}%
+}
+\tryprotected\def\ffsetV#1#2{\expandafter\def\csname #1V\endcsname{#2}}
+
+\long\def\ffsetX#1{\ifx#1\fam \ffsetY=\else
+ \ifx#1\rm \ffsetY0\else \ifx#1\bf \ffsetY1\else
+ \ifx#1\it \ffsetY2\else \ifx#1\bi \ffsetY3\else
+ \ffsetZ#1\fi\fi\fi\fi\fi
+}
+\def\ffsetZ#1\fi\fi\fi\fi\fi{\fi\fi\fi\fi\fi#1}
+
+\tryprotected\def\ffsetY#1{%
+ \ifx=#1\ffsetW0\tenrm \ffsetW1\tenbf \ffsetW2\tenit \ffsetW3\tenbi
+ \else \edef\ffvarV{\ffvarY{#1}}%
+ \if!\ffvarV\else \ffsetF\ffmodfont\ffmodfont \fi
+ \fi
+}
+\def\ffsetF#1{%
+ \ifx\dgsize\undefined
+ \expandafter\readsizespec\sizespec at\relax
+ \font#1=\whichtfm{\ffnamegen} \sizespec\relax
+ \let\dgsize=\undefined
+ \else \font#1=\whichtfm{\ffnamegen} \sizezpec\relax
+ \fi
+}
+\def\readsizespec#1at#2\relax{\ifx!#2\def\dgsize{#1}\else
+ \ifx\relax#2\relax \def\dgsize{10pt}\else \readsizespec#2!\relax\fi\fi
+}
+\def\ffsetW#1#2{\edef\ffvarV{\ffvarY{#1}}%
+ \expandafter\ifx\the\font#2\ffsetF#2#2\else\ffsetF#2\fi
+}
+\def\ismacro#1#2#3{\def\tmp{#2}\ifx#1\tmp}
+
+\def\ffletfont#1=#2#3{%
+ {\def\sizespec{#3}\let\ffsetFa=\ffsetF
+ \def\ffsetF##1##2{\ffsetFa#1}\def\ffsetW##1##2{}%
+ \ffsetX#2\global\let\tmp=#1}\let#1=\tmp
+}
+\ifx\regtfm\undefined %%%%% \regtfm, \whichtfm from ams-math.tex:
+
+\def\regtfm #1 0 #2 *{\expandafter
+ \def\csname#1:reg\endcsname{#2 16380 \relax}%
+ \def\tmpa{#1}\reversetfm #2 * %
+}
+\def\reversetfm #1 #2 {\expandafter
+ \let\csname#1:reg\expandafter\endcsname
+ \csname\tmpa:reg\endcsname
+ \if*#2\else \expandafter\reversetfm \fi
+}
+\def\whichtfm #1{\ifx\dgsize\undefined #1\else
+ \expandafter \ifx\csname#1:reg\endcsname\relax
+ #1%
+ \else
+ \expandafter\expandafter\expandafter \dowhichtfm
+ \csname #1:reg\expandafter\endcsname
+ \fi \fi
+}
+\def\dowhichtfm #1 #2 {%
+ \ifdim\dgsize<#2pt #1\expandafter\ignoretfm\else \expandafter\dowhichtfm
+\fi
+}
+\def\ignoretfm #1\relax{}
+
+\fi % of \ifx\regtfm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\ffalias#1#2{\expandafter\edef\csname#1:reg\endcsname{#2 16380 \relax}}
+
+\def\ffoptV{}
+\def\regsizes#1#2{\bgroup \aftergroup\regsizesC #1\relax
+ \let\regtfm=\relax \gdef\tmp{}%
+ \edef\ffvarV{\ffvarY{0}}\if!\ffvarV\else \regsizesA{#2}\fi
+ \edef\ffvarV{\ffvarY{1}}\if!\ffvarV\else \regsizesA{#2}\fi
+ \edef\ffvarV{\ffvarY{2}}\if!\ffvarV\else \regsizesA{#2}\fi
+ \edef\ffvarV{\ffvarY{3}}\if!\ffvarV\else \regsizesA{#2}\fi
+ \egroup
+}
+\def\regsizesA#1{\def\ffoptV{}\xdef\tmp{\tmp\regtfm \ffnamegen}%
+ \regsizesB#1 * =
+}
+\def\regsizesB#1 =#2 {\if*#1\xdef\tmp{\tmp\space*}%
+ \else \def\ffoptV{#2}\xdef\tmp{\tmp\space #1 \ffnamegen}%
+ \expandafter\regsizesB\fi
+}
+\def\regsizesC{\tmp\xdef\tmp{}}
+
+\def\useff#1{} % do nothing with non U encoding
+
+\ismacro\fotenc{U}\iftrue\else \endinput \fi %%%%%%%%%%%%%%%%%%%
+
+\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} % default
+\fi
+
+\def\useff#1{\ffsetU{#1}\ffsetX}
+\tryprotected\def\ffsetU#1{\edef\fontfeatures{\fontfeatures;#1}}
+\ifx\tryprotected\relax \ifx\addprotect\undefined \else \addprotect\ffsetU \fi\fi
+
+\endinput
diff --git a/Master/texmf-dist/tex/csplain/opmac/fontfam-catalog.tex b/Master/texmf-dist/tex/csplain/opmac/fontfam-catalog.tex
new file mode 100644
index 00000000000..56ac94e3c53
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/opmac/fontfam-catalog.tex
@@ -0,0 +1,55 @@
+%% fontfam-catalog.tex
+%%%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2016
+
+% This is module for OPmac macros, see http://petr.olsak.net/opmac.html
+% This module is automatically loaded when \fontfam[Catalog] is used.
+
+% See end of the file fontfam.tex for more details.
+
+\def\fontfamexecC#1#2#3#4#5#6#7{\testfotenc{#6}%
+ \iftrue\ifx\relax#2\relax \else
+ \par #7
+ \edef\basicfont{\fontname\the\font}%
+ \noindent {[#1]}\par\nobreak
+ \def\variants{#2}
+ \pcatA {}#3\relax
+ \medskip
+ \fi\fi
+}
+\def\pcatA#1{\ifx#1\relax\par\else
+ \def\prefix{#1}\expandafter\pcatB\variants\relax
+ \expandafter\pcatA\fi
+}
+\def\pcatB#1{\ifx#1\relax\par\else
+ \indent
+ {\currtt \ifx\prefix\empty \else \expandafter\string\prefix\fi
+ \string#1 }{\prefix#1%
+ \edef\tmp{\ifx\prefix\empty\else\fontname\the\font\fi}%
+ \ifx\tmp\basicfont {\currtt Not available}\else \fontfamsample \fi
+ \par}%
+ \expandafter\pcatB\fi
+}
+
+\nonum\sec Font Catalogue
+
+\begingroup
+
+Generated \the\day/\the\month/\the\year\space by
+{\tt \string\fontfam[Catalog]} (from OPmac).
+Encoding: \fotenc, \dimen0=\baselineskip
+size: \expandafter\ignorept\the\fontdim /\expandafter\ignorept\the\dimen0
+\bigskip
+
+\ifx\sizespec\empty \def\sizespec{at10pt}\fi
+\letfont\currtt=\tentt
+\ifx\loadmathfonts\undefined \let\loadmathfonts=\relax \fi
+\let\fontfamexec=\fontfamexecC
+\ifx\fontfamsample\undefined
+ \def\fontfamsample{ABCDabcd áéíóúů řžč ÁÉÍÓÚŮ ŘŽČ 0123456789}
+\fi
+\fontfamL
+\endgroup
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex b/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex
new file mode 100644
index 00000000000..448805b6f89
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex
@@ -0,0 +1,34 @@
+
+\setfontfam [LM fonts] {\rm \it \bf \bi \tt} {\caps} {} {AMS} (8t 8z U) {\input lmfonts}
+\famalias{latinmodern}{lmfonts} \famalias{lmfont}{lmfonts}
+\famalias{latinmodernfonts}{lmfonts} \famalias{latinmodern}{lmfonts}
+
+\setfontfam [Times] {\rm \it \bf \bi \tt} {} {} {TX} (8t 8z) {\input ctimes}
+\famalias{timesroman}{times}
+\setfontfam [Helvetica] {\rm \it \bf \bi \tt} {\cond} {} {TX} (8t 8z) {\input chelvet}
+\setfontfam [Avantgarde] {\rm \it \bf \bi \tt} {} {} {TX} (8t 8z) {\input cavantga}
+\setfontfam [Bookman] {\rm \it \bf \bi \tt} {} {} {TX} (8t 8z) {\input cbookman}
+\setfontfam [Palatino] {\rm \it \bf \bi \tt} {} {} {TX} (8t 8z) {\input cpalatin}
+\setfontfam [New Century] {\rm \it \bf \bi \tt} {} {} {TX} (8t 8z) {\input cncent}
+
+\setfontfam [TG Termes] {\rm \it \bf \bi} {\caps} {} {TX} (8t 8z U) {\input cs-termes}
+\famalias{termes}{tgtermes} \famalias{texgyretermes}{tgtermes}
+\setfontfam [TG Heros] {\rm \it \bf \bi} {\caps \cond} {} {TX} (8t 8z U) {\input cs-heros}
+\famalias{heros}{tgheros} \famalias{texgyreheros}{tgheros}
+\setfontfam [TG Adventor] {\rm \it \bf \bi} {\caps} {} {TX} (8t 8z U) {\input cs-adventor}
+\famalias{adventor}{tgadventor} \famalias{texgyreadventor}{tgadventor}
+\setfontfam [TG Bonum] {\rm \it \bf \bi} {\caps} {} {TX} (8t 8z U) {\input cs-bonum}
+\famalias{bonum}{tgbonum} \famalias{texgyrebonum}{tgbonum}
+\setfontfam [TG Pagella] {\rm \it \bf \bi} {\caps} {} {TX} (8t 8z U) {\input cs-pagella}
+\famalias{pagella}{tgpagella} \famalias{texgyrepagella}{tgpagella}
+\setfontfam [TG Schola] {\rm \it \bf \bi} {\caps} {} {TX} (8t 8z U) {\input cs-schola}
+\famalias{schola}{tgschola} \famalias{texgyreschola}{tgschola}
+\setfontfam [TG Cursor] {\rm \it \bf \bi} {\caps} {} {TX} (8t 8z U) {\input cs-cursor}
+\famalias{cursor}{tgcursor} \famalias{texgyrecursor}{tgcursor}
+
+\setfontfam [Antykwa Torunska] {\lr \li \rm \it \mr \mi \bf \bi} {} {} {TX} (8t 8z) {\input cs-antt}
+\setfontfam [Antykwa Poltawskiego] {\rm \it \bf \bi} {\caps \wli} {} {TX} (8t 8z U) {\input cs-polta}
+
+\setfontfam [Charter] {\rm \it \bf \bi} {} {} {TX} (8t 8z) {\input cs-charter}
+\setfontfam [Arev Sans] {\rm \it \bf \bi} {} {} {TX} (8t) {\input cs-arev}
+\setfontfam [Bera] {\rm \it \bf \bi} {\sans} {} {TX} (8t) {\input cs-bera}
diff --git a/Master/texmf-dist/tex/csplain/opmac/fontfam.tex b/Master/texmf-dist/tex/csplain/opmac/fontfam.tex
new file mode 100644
index 00000000000..519249fbb83
--- /dev/null
+++ b/Master/texmf-dist/tex/csplain/opmac/fontfam.tex
@@ -0,0 +1,126 @@
+%% fontfam.tex
+%%%%%%%%%%%%%%%%%%%%
+% Petr Olsak, 2016
+
+% This is module for OPmac macros, see http://petr.olsak.net/opmac.html
+% The file is read automatically when \fontfam macro is used.
+% The command:
+% \fontfam [Font Family Name]
+% loads the approriate fontfile or lists the available
+% Font Family Names if unknown. Example:
+% \fontfam [Times] or \fontfam [Times Roman] ... does \input ctimes
+
+% See end of this file this for more details.
+
+\ifx\OPmacversion\udefined \input opmac \fi
+
+\def\fontfamL{}
+\def\setfontfam [#1]{\def\fsname{}\setfsname #1 {} \setfontfamB{#1}}
+\def\setfsname #1 {\ifx\relax#1\relax
+ \lowercase\expandafter{\expandafter\def\expandafter\fsname\expandafter{\fsname}}%
+ \else \addto\fsname{#1}\expandafter\setfsname\fi
+}
+\def\setfontfamB#1#2#3#4#5#6(#7)#8{\sdef{fs:\fsname}{\fontfamexec{#1}{#2}{#3}{#4}{#5}{#7}{#8}}%
+ \expandafter\addto\expandafter\fontfamL\csname fs:\fsname\endcsname
+}
+\def\fontfam[#1]{\def\fontfamname{#1}%
+ \ifx\fotenc\undefined
+ \ifx\chyph\undefined \def\fotenc{8t}\else \def\fotenc{8z}\fi
+ \ifx\font\corkencoded \def\fotenc{8t}\fi
+ \ifx\font\unicoded \def\fotenc{U}\fi
+ \def\tmp##1##2\relax{\def\tmp{##2}}\tmp ^^^^abcd\relax
+ \ifx\tmp\empty \def\fotenc{U}\fi
+ \fi
+ \let\fontfamexec=\fontfamexecA
+ \def\fsname{}\setfsname #1 {}
+ \expandafter \ifx \csname fs:\fsname\endcsname \relax
+ \immediate\write16{\string\fontfam: unknown font family [#1] (\fotenc). Choose:}
+ {\let\fontfamexec=\fontfamexecB \fontfamL}%
+ \else \csname fs:\fsname\expandafter\expandafter\expandafter\endcsname
+ \fi
+}
+\def\fontfamexecA#1#2#3#4#5#6#7{\testfotenc{#6}\iftrue#7 \else
+ \opwarning{The [#1] family is unavailable in (\fotenc) encoding}\fi
+}
+\def\fontfamexecB#1#2#3#4#5#6#7{\testfotenc{#6}%
+ \iftrue
+ {\toks2={#2}\toks3={#3}\toks4={#4}%
+ \immediate\write16{\space[#1] \space
+ {\the\toks2
+ \ifx\relax#3\relax \else ; mod:\the\toks3 \fi
+ \ifx\relax#4\relax \else ; \the\toks4 \fi
+ \ifx\relax#5\relax \else ; +#5\fi} (#6)}}%
+ \fi
+}
+\def\testfotenc#1{\def\tmpa{ #1 }\edef\tmpb{\space\fotenc\space}%
+ \ifx\relax#1\relax \def\tmpa{x}\def\tmpb{x}\fi
+ \expandafter\isinlist\expandafter\tmpa\expandafter{\tmpb}%
+}
+
+\def\famalias#1#2{\slet{fs:#1}{fs:#2}}
+
+\input fontfam-global
+
+\openin10=fontfam-local
+\ifeof10 \else \closein10 \input fontfam-local \fi
+
+\setfontfam [Catalog] {} {} {print catalogue} {} () {\input fontfam-catalog}
+\famalias{catalogue}{catalog}
+
+\endinput
+
+------------------------------------------------------------
+
+After
+
+ \input opmac
+
+you can use
+
+ \fontfam [Font Family Name].
+
+The [Font Family Names] are declared in fontfam-global.tex file and a user
+can set his/her own data to fontfam-local.tex file with analogical syntax.
+
+The parameter [Font Family Name] is case insensitive and the spaces are
+irrelevat in it. So [Times Roman] is the same as [TimesRoman] or [timesroman].
+
+If a required [Font Family Name] is not known, then all available Font Family
+Names are printed on terminal and into log file. Typical usage: \fontfam [?].
+
+If a required [Font Family Name] is known then appropriate \input fontfile
+is done. Nothing more. This means that \fontfam gives you possibility to
+keep a good overview about fontfiles.
+
+You can use special parameter \fontfam [Catalog]. Then all available font
+families are printed to the document with font samples. The pre-defined font
+sample can be rewritten: \def\fontfamsample{...}.
+
+Each fontfile supports a limited set of encodings of the fonts. This is
+listed in round brackets: 8t means T1 encoding, 8z means IL2 encoding and
+U means Unicode. The default encoding is 8t in pdftex, 8z in pdfcsplain.
+XeTeX or LuaTeX uses U as default. The csplain provides one change of default
+encoding at begining of the document using \input t1code or \input ucode.
+
+If a fontfile (required by [Font Family name]) does not provide chosen encoding
+then warning occurs and nothig is done. The list of [Font Family Names]
+printed by \fontfam [?] or \fontfam [Catalog] includes only those Names
+which provides the encoding currently chosen.
+
+The fontfam-global.tex or fontfam-local.tex files uses \setfontfam with
+following format:
+
+\setfontfam [Name] {variants} {modifiers} {comment} {math} (encodings) {\input fontfile}
+
+And \famalias can be used:
+
+\famalias{aliasname}{origname}
+
+The aliasname and origname must be lowecase and without spaces. See
+fontfam-global.tex for examples.
+
+Note that the macro file fontfam.tex and the data fontfam-global.tex and
+fontfam-local.tex are read on demand only when \fontfam macro is used in
+OPmac. It is not loaded by OPmac directly because user may not need to use
+\fontfam, so the data are irrelevant in such case. And you can generate
+a TeX format with opmac macros.
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex b/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex
index d5c90b9733d..ead50e6b3d0 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex
@@ -14,7 +14,7 @@
% before using the command \usebib.
% For more information see the end of this file.
-\ifx\usebib\udefined \else \endinput \fi
+\ifx\MakeReference\udefined \else \endinput \fi
\ifx\OPmacversion\undefined \input opmac \fi
\ifx\printbib\undefined
\errmessage{Please, upgrade OPmac to version Apr. 2014 or newer}
@@ -52,7 +52,7 @@
\global\let\addcitelist=\writeXcite
\def\tmp##1[*]##2\relax{\def\tmp{##2}}\expandafter\tmp\citelist[*]\relax
\ifx\tmp\empty\else % there was \nocite[*] used.
- \setbox0=\vbox{\def\citelist{}\adef@{\readentry}%
+ \setbox0=\vbox{\def\citelist{}\adef@{\readbibentry}%
\input #3.bib
\expandafter}\expandafter\def\expandafter\citelist\expandafter{\citelist}%
\fi
@@ -64,9 +64,9 @@
\egroup
\fi
}
-\def\readentry#1#{\readentryA}
-\def\readentryA#1{\readentryB#1,,\relax!.}
-\def\readentryB#1#2,#3\relax!.{\addto\citelist{\citeI[#1#2]}}
+\def\readbibentry#1#{\readbibentryA}
+\def\readbibentryA#1{\readbibentryB#1,,\relax!.}
+\def\readbibentryB#1#2,#3\relax!.{\addto\citelist{\citeI[#1#2]}}
% Corrections in librarian macros:
@@ -324,6 +324,6 @@ History:
Apr. 2014: released
Jan. 2016: "first entry wins" implemented
-
+Apr. 2016: \readentry -> \readbibentry, \usebib->\MakeReference
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of the opmac-bib.tex
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac.tex b/Master/texmf-dist/tex/csplain/opmac/opmac.tex
index 28940e0864e..7ecc4ac5581 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac.tex
@@ -1,11 +1,11 @@
% OPmac
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Petr Olsak, 2012 -- 2015
+%% Petr Olsak, 2012 -- 2016
%% The history of versions is at the end of this file, after \endpinput
\ifx\OPmacversion\undefined \else \endinput \fi
-\def\OPmacversion{Apr. 2016b}
+\def\OPmacversion{Apr. 2016c}
\immediate\write16{This is OPmac (Olsak's Plain macros), version <\OPmacversion>}
%%%%%%%%%%%%%% Basic macros, sec. 3.1 in opmac-d.pdf
@@ -73,7 +73,6 @@
}
\egroup
-
%%%%%%%%%%%%%% Global parameters, sec. 3.2 in opmac-d.pdf
\widowpenalty=10000
@@ -243,6 +242,7 @@
\addprotect\textfontsize \addprotect\textfontscale
\addprotect\em
+\def\fontfam{\par \input fontfam \fontfam}
%%%%%%%%%%%%%% Multilingual support, sec. 3.5 in opmac-d.pdf
@@ -321,7 +321,6 @@
}
\def\Xlabel#1#2{\sxdef{lab:#1}{#2}\sxdef{pgref:#1}{\the\lastpage}}
-
%%%%%%%%%%%%%% Chapters, sections, subsections -- sec. 3.8 in opmac-d.pdf
\def\printchap#1{\vfil\break
@@ -410,7 +409,6 @@
\def\nbpar{{\interlinepenalty=10000\endgraf}}
\def\nl{\hfil\break}
-
%%%%%%%%%%%%%% Captions, equations -- sec. 3.9 in opmac-d.pdf
\newcount\tnum \newcount\fnum \newcount\dnum
@@ -616,7 +614,6 @@
\def\scanprevii#1/#2&{\def\previi{#2}\def\tmpa{#1}\edef\tmpa{\meaning\tmpa}}
\def\previi{} % previous index item
-
%%%%%%%%%%%%%% Sorting -- sec. 3.13 in opmac-d.pdf
\def\sortingdata{%
@@ -765,7 +762,6 @@
\def\sortreturn#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
\newcount\mullines
@@ -901,7 +897,6 @@
\def\draft{\opwarning{\string\draft: Grey color is possible in pdfTeX only}}
\fi
-
%%%%%%%%%%%%%% Hyperrefs -- sec. 3.16 in opmac-d.pdf
\def\destheight{1.4em}
@@ -975,7 +970,6 @@
\def\urlslashslash{/\urlskip/}
\addprotect\url
-
%%%%%%%%%%%%%% Outlines -- sec. 3.17 in opmac-d.pdf
\def\outlines#1{\pdfcatalog{/PageMode/UseOutlines}\openref\ifx\toclist\empty
@@ -1045,7 +1039,6 @@
\let\insertoutline=\outlines
\fi
-
%%%%%%%%%%%%%% Verbatim, \begtt, \endtt -- sec. 3.18 in opmac-d.pdf
\newcount\ttline \ttline=-1
@@ -1154,7 +1147,6 @@
\def\vireadline{\read\vifile to \tmp \global\advance\viline by1 }
\def\viprintline{\expandafter\addto\expandafter\tmpb\expandafter{\tmp}}
-
%%%%%%%%%%%%%% \table -- sec. 3.19 in opmac-d.pdf
\newtoks\tabdata
@@ -1211,7 +1203,6 @@
\hbox{\kern\hhkern#1\kern\hhkern}%
}\kern\vvkern\hrule}\vrule}}
-
%%%%%%%%%%%%%% \inspic -- sec. 3.20 in opmac-d.pdf
\newdimen\picwidth \picwidth=0pt \let\picw=\picwidth
@@ -1272,7 +1263,6 @@
\def\pdfsetmatrix#1{} \def\pdfsave{} \def\pdfrestore{}
\fi
-
%%%%%%%%%%%%%% \fnote, \mnote -- sec 3.22 in opmac-d.pdf
\newcount\fnotenum \fnotenum=0
@@ -1332,7 +1322,6 @@
\def\fixmnotes#1{\def\mnotesfixed{#1}}
-
%%%%%%%%%%%%%% \cite, \bib, \usebibtex, \usebbl -- sec. 3.23 in opmac-d.pdf
\newwrite\auxfile % AUX file for BibTeX
@@ -1529,6 +1518,7 @@
}
\def\Xcite#1{\addto\citelistB{\citeI[#1]}}
+\def\usebib{\par \input opmac-bib \usebib}
%%%%%%%%%%%%%% output -- sec. 3.24 in opmac-d.pdf
@@ -1567,7 +1557,6 @@
\newcount\lastpage \lastpage=0 % the last page of the document
\def\Xpage#1{\lastpage=#1 \fnotenumlocal=0 }
-
%%%%%%%%%%%%%% margins -- sec. 3.25 in opmac-d.pdf
\newdimen\pgwidth \newdimen\pgheight \pgwidth=0pt
@@ -1772,5 +1761,6 @@ Apr. 2016 \frame: redundant group removed
Apr. 2016a \eoldef introduced to \tit, \chap, \sec, \secc, see OPmac trick 0121
Apr. 2016b \input opmac-luatex.tex introduced
\slet introduced
+Apr. 2016c \fontfam introduced, \usebib as module loaded
%%%%%%%%%%%%%% End of opmac.tex