% This file is part of vntex. License: GPL.
%
% MIKmathf.tex, by Michal Konecny, 23.10.1996
%
% A macro package to supplement math font sizing
% to Han The Thanh's package plnfss.

\endlinechar=-1\catcode`@= 11

% macros provided:
\def\mathix{\mathsize{9}{6}{5}}
\def\mathx{\mathsize{10}{7}{5}}
\def\mathxii{\mathsize{12}{9}{6}}
\def\mathxiv{\mathsize{14}{10}{7}}
\def\mathxvii{\mathsize{17}{12}{9}}
\def\mathxx{\mathsize{20}{14}{10}}
\def\mathxxx{\mathsize{30}{20}{14}}
\def\mathlii{\mathsize{52}{30}{20}}
\def\nomathfonts{}
\expandafter\let\csname math9\endcsname\mathix
\expandafter\let\csname math10\endcsname\mathx
\expandafter\let\csname math12\endcsname\mathxii
\expandafter\let\csname math14\endcsname\mathxiv
\expandafter\let\csname math17\endcsname\mathxvii
\expandafter\let\csname math20\endcsname\mathxx

\def\Bbb{\fam9\relax}
\def\Cal{\fam2\relax}
\def\bfam{5}
\def\mathb{\fam5}
\def\bxfam{6}
\def\mathbx{\fam6}
\def\Eurm{\fam10\relax}
\def\Eurb{\fam11\relax}
\def\Eusm{\fam12\relax}
\def\Eusb{\fam13\relax}
\def\Eufm{\fam14\relax}
\def\Eufb{\fam15\relax}

% \mathfsize{textsize}{scriptsize}{scriptscriptsize}
\def\mathsize#1#2#3{
  \def\txtsz{#1}
  \def\scrsz{#2}
  \def\sscsz{#3}
  % family assignment probably not acc. to convention
  \setmathfam{0}{/cmr/m/n//}%
  \setmathfam{1}{OML/cmmi/m/it//}
  \setmathfam{2}{OMS/cmsy/m/n//}% incl CALIGRAPHIC
  \setmathfam{3}{OMX/cmex/m/n//}
  \setmathfam{5}{/cmr/b/n//}
  \setmathfam{6}{/cmr/bx/n//}
  \setmathfam{7}{/cmr/m/it//}
  \setmathfam{8}{MSA/msam/m/n//}% ams symbols
  \setmathfam{9}{MSB/msbm/m/n//}% further ams incl. BLACKBOARD
  \setmathfam{10}{/euler/m/n//}% euler regular
  \setmathfam{11}{/euler/b/n//}% euler regular bold
  \setmathfam{12}{/euler/m/cal//}% euler cal
  \setmathfam{13}{/euler/b/cal//}% euler cal bold
  \setmathfam{14}{/euler/m/fib//}% euler fib
  \setmathfam{15}{/euler/b/fib//}% euler fib bold
}

% sets plnfss selected font into the special name \@arbfont
\def\set@arbfont{%
 \global\expandafter\let\expandafter\@arbfont\csname\@selectedfont\endcsname}

% \setmathfam{fam}{<coding>/<name>/<weight>/<slant>//}
%   (sizes pre-set in macros \txtsz \scrsz \sscsz)
\def\setmathfam#1#2{
  {\setfont#2\fontsize\txtsz\selectfont\set@arbfont}
    \expandafter\textfont#1=\@arbfont
  {\setfont#2\fontsize\scrsz\selectfont\set@arbfont}
    \expandafter\scriptfont#1=\@arbfont
  {\setfont#2\fontsize\sscsz\selectfont\set@arbfont}
    \expandafter\scriptscriptfont#1=\@arbfont
}

\catcode`@= 12\endlinechar=13
