summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/csplain
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-14 22:06:41 +0000
committerKarl Berry <karl@freefriends.org>2016-05-14 22:06:41 +0000
commit78b3da14d95f97822feea5df357606f86b357105 (patch)
tree70a99215921f9df540f587b95824a6f59516ebb0 /Master/texmf-dist/tex/csplain
parent762dec7ad6e5083c542b5697ce206634feb3dd06 (diff)
csplain (14may16)
git-svn-id: svn://tug.org/texlive/trunk@41124 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/csplain')
-rw-r--r--Master/texmf-dist/tex/csplain/base/csplain.ini1
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/kp-math.tex14
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/uni-math.tex121
3 files changed, 86 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/csplain/base/csplain.ini b/Master/texmf-dist/tex/csplain/base/csplain.ini
index a3683fd75f2..671db3f2848 100644
--- a/Master/texmf-dist/tex/csplain/base/csplain.ini
+++ b/Master/texmf-dist/tex/csplain/base/csplain.ini
@@ -257,6 +257,7 @@ file extcode.tex renamed to il2code.tex (suggested by Jan Kasprzak)
* exchars.tex: \tgexchars introduced, \edef used in \setexfont
* uni-math.tex introduced
* luafonts.tex: corrected \let\luafonts=\relax
+* kp-math.tex + uni-math.tex corrected: \setmathdimens added
COPYRIGHT
=========
diff --git a/Master/texmf-dist/tex/csplain/fonts/kp-math.tex b/Master/texmf-dist/tex/csplain/fonts/kp-math.tex
index 74bf7a3775f..1c8ef380671 100644
--- a/Master/texmf-dist/tex/csplain/fonts/kp-math.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/kp-math.tex
@@ -56,7 +56,7 @@
\loadmathfamily 9 {jkp\kpmatl syd\kpmatw} % script
\loadmathfamily 10 {jkp\kpmatssb bn7t} % (sans serif) bold
\loadmathfamily 11 {jkp\kpmatssb bmi\kpmatf} % (sans serif) bold slanted
- \setkpsumsw
+ \setmathdimens \setkpsumsw
}
\def\boldmath{%
\loadmathfamily 0 {jkp\kpmatss\kpmatl bn7t} % KP 7t
@@ -71,9 +71,17 @@
\loadmathfamily 9 {jkp\kpmatl bsyd\kpmatw} % script
\loadmathfamily 10 {jkp\kpmatssb bn7t} % sans serif bold
\loadmathfamily 11 {jkp\kpmatssb bmi\kpmatf} % sans serif bold slanted
- \setkpsumsw
+ \setmathdimens \setkpsumsw
+}
+\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\setkpsumsw{%
\ismacro\kpmatss{ss}\iftrue
\mathchardef\sum="13B4 \mathchardef\prod="13B5 \mathchardef\coprod="13C4
diff --git a/Master/texmf-dist/tex/csplain/fonts/uni-math.tex b/Master/texmf-dist/tex/csplain/fonts/uni-math.tex
index 1528c3abb4b..1180eb1606a 100644
--- a/Master/texmf-dist/tex/csplain/fonts/uni-math.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/uni-math.tex
@@ -19,22 +19,34 @@
% \typosize[12/14.4] ...
\ifx\Umathcode\undefined
- \message{uni-math: Unicoded engine not detected. Macro-file ignored...}
+ \message{uni-math WARNING: Unicoded engine not detected. Macro-file ignored...}
\endinput\fi
-\ifx\unimathfont\undefined
- \message{uni-math: You must define \noexpand\unimathfont first.}
- \bgroup
- \toks0={Examples: \def\unimathfont{[xits-math]} ... XITS MATH^^J
+\def\umathname#1#2{"#1:\mfontfeatures#2"}
+\def\mfontfeatures{mode=base;script=math;}
+
+\ifx\unimathfont\relax\else % \relax ... font will be declared later
+ \ifx\unimathfont\undefined \def\unimathfont{??}\fi
+ \suppressfontnotfounderror=1
+ \font\mF=\umathname{\unimathfont}{} \relax
+ \suppressfontnotfounderror=0
+ \ifx\mF\nullfont
+ \message{uni-math WARNING: \string\unimathfont{\unimathfont} isn't loadable.}
+ \bgroup
+ \toks0={Examples:^^J
+ \def\unimathfont{[xits-math]} ... XITS MATH^^J
\def\unimathfont{[latinmodern-math]} ... Latin Modern Math^^J
\def\unimathfont{[texgyretermes-math]} ... TeXGyre Termes Math^^J
\def\unimathfont{[texgyrebonum-math]} ... TeXGyre Bonum Math^^J
\def\unimathfont{[texgyrepagella-math]} ... TeXGyre Pagella Math^^J
\def\unimathfont{[texgyreschola-math]} ... TeXGyre Schola Math^^J
- Note brackets if file name is used. Don't use quotes "...".
- }\newlinechar=`^^J \message{\the\toks0}\message{Macrofile ignored...}
- \egroup
- \endinput\fi
+ \def\unimathfont{[Asana-Math]} ... Asana Math^^J
+ \let\unimathfont=\relax ... Don't load the font right now.^^J
+ Note brackets if direct file name is used. Don't use quotes "...".
+ }\newlinechar=`^^J \message{\the\toks0}\message{Macrofile ignored...}
+ \egroup
+ \endinput\fi
+\fi
\message{FONT: \unimathfont\space - Unicode Math (v. \unimathversion) prepared.}
\let\mathpreloaded=U
@@ -43,50 +55,32 @@
\fi\fi
\def\normalmath{%
- \loadumathfamily 1 {\unimathfont} % Base font
- \loadmathfamily 4 rsfs % script
+ \loadumathfamily 1 {\unimathfont}{} % Base font
+ \loadmathfamily 4 rsfs % script
+ \setmathdimens
}
-\def\boldmath{\ifmmode \fakeboldmath \else
- \everymath=\expandafter{\the\everymath \fakeboldmath}%
- \everydisplay=\expandafter{\the\everydisplay \fakeboldmath}%
- \fi % unfortunatelly, we have no real bold version of whole math symbols
+\def\boldmath{%
+ \loadumathfamily 1 {\unimathfont}{embolden=1.7;} \fakeboldwarn
+ \loadmathfamily 4 rsfs % script
+ \setmathdimens
}
-\def\fakeboldmath{\dimen0=0.02em \def\tmp##1.##2##3;{##1.##2}%
- \putfakebold{2 Tr \expandafter\tmp\the\dimen0; w}%
- \aftergroup\nofakeboldmath
- \let\fakeboldmath=\relax
-}
-\def\nofakeboldmath{\putfakebold{0 Tr}}
+\def\fakeboldwarn{\ifx\directlua\undefined\else
+ \message{WARNING: Fake-bold font is not supported by LuaTeX.}\fi}
-\ifx\pdfliteral\undefined \ifx \pdfextension\undefined
- \def\putfakebold#1{\special{pdf:literal #1}}
-\else \def\putfakebold{\pdfextension literal}\fi
-\else \let\putfakebold=\pdfliteral \fi
+\ifx\regtmf\undefined \input ff-mac \fi
-\def\regtfm #1 0 #2 *{\expandafter % copied from ams-math
- \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
-}
\regtfm rsfs 0 rsfs5 6 rsfs7 8.5 rsfs10 *
\count18=4 % Note: if you want to combine more Math fonts at another math family slots,
% don't use family 2 and 3. They are reserved for \fontdimens.
-\def\umathname#1#2{"#1:\mfontfeatures;#2"}
-\def\mfontfeatures{mode=base;script=math;}
-
-\def\loadumathfamily #1 #2 {
- \let\dgsize=\sizemtext \font\mF=\umathname{#2}{} at\dgsize \textfont#1=\mF
+\def\loadumathfamily #1 #2#3 {
+ \let\dgsize=\sizemtext \font\mF=\umathname{#2}{#3} at\dgsize \textfont#1=\mF
\ifnum#1=1 \textfont2=\mF \textfont3=\mF \fi
- \let\dgsize=\sizemscript \font\mF=\umathname{#2}{+ssty=0;} at\dgsize
+ \let\dgsize=\sizemscript \font\mF=\umathname{#2}{+ssty=0;#3} at\dgsize
\scriptfont#1=\mF
\ifnum#1=1 \scriptfont2=\mF \scriptfont3=\mF \fi
- \let\dgsize=\sizemsscript \font\mF=\umathname{#2}{+ssty=1;} at\dgsize
+ \let\dgsize=\sizemsscript \font\mF=\umathname{#2}{+ssty=1;#3} at\dgsize
\scriptscriptfont#1=\mF
\ifnum#1=1 \scriptscriptfont2=\mF \scriptscriptfont3=\mF \fi
\let\dgsize=\undefined
@@ -106,7 +100,17 @@
\ifx\ptmunit\undefined \csname newdimen\endcsname\ptmunit\fi \ptmunit=1\ptunit
\ifx\sizemtext\undefined \setmathsizes[10/7/5]\fi
-\ifx\normalmathloading\relax\else \normalmath \fi % load the fonts
+\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
+}
+% load the fonts:
+\ifx\normalmathloading\relax\else \ifx\unimathfont\relax\else \normalmath \fi\fi
\newcount\umathnumA \newcount\umathnumB
@@ -144,13 +148,13 @@
}
\umathnumB="0391
\greekdef \Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa
-\Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \varTheta \Sigma \Tau \Upsilon \Phi \Chi \Psi
-\Omega \relax
+ \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \varTheta \Sigma \Tau \Upsilon \Phi
+ \Chi \Psi \Omega \relax
\umathnumB="03B1
\greekdef \alpha \beta \gamma \delta \epsilon \zeta \eta \theta \iota \kappa
-\lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi
-\chi \psi \omega \varbeta \vartheta \phi \varpi \relax
+ \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon
+ \varphi \chi \psi \omega \varbeta \vartheta \phi \varpi \relax
\chardef\ncharrmA=`A \chardef\ncharrma=`a
\chardef\ncharbfA="1D400 \chardef\ncharbfa="1D41A
@@ -280,7 +284,18 @@
\def\cuberoot {\Uradical 1 "0221B }
\def\fourthroot {\Uradical 1 "0221C }
-\let\intop=\int \def\int{\intop \nolimits}
+\def\intwithnolimits#1{\ifx#1\relax \escapechar=`\\ \else \escapechar=-1
+ \expandafter\let\csname\string#1op\endcsname=#1%
+ \expandafter\def\expandafter#1\expandafter{\csname\string#1op\endcsname \nolimits}%
+ \expandafter \intwithnolimits \fi
+}
+\intwithnolimits \int \iint \iiint \oint \oiint \oiiint \intclockwise
+ \varointclockwise \ointctrclockwise \sumint \iiiint \intbar \intBar \fint
+ \pointint \sqint \intlarhk \intx \intcap \intcup \upint \lowint \relax
+
+\def\vert {\Udelimiter 0 1 "07C }
+\def\Vert {\Udelimiter 0 1 "02016 }
+\def\Vvert {\Udelimiter 0 1 "02980 }
\def\overbrace #1{\mathop {\Umathaccent 7 1 "023DE{#1}}\limits}
\def\underbrace #1{\mathop {\Umathaccent bottom 7 1 "023DF{#1}}\limits}
@@ -297,6 +312,8 @@
\def\overrightarrow {\Umathaccent 7 1 "020D7 }
\def\overleftrightarrow {\Umathaccent 7 1 "020E1 }
+\let\loadmathfonts=\relax % we need no more 8bit math fonts
+
\endinput
--------------------------------------------
@@ -310,3 +327,13 @@ font with 8bit Math font at family 4. See definition of \script macro where
accepts only codes less than 255.
See http://tex.stackexchange.com/questions/308749/ for more technical details.
+
+The poor bold is used for complete bold vaiant of the font. If the selected
+font has its bold vaiant (like xits-math), you can re-define \boldmath macro
+by:
+
+\def\boldmath{%
+ \loadumathfamily 1 {xits-mathbold}{} % Base font
+ \loadmathfamily 4 rsfs % script
+ \setmathdimens
+}