% mbmac.tex
% Generic macros for TeX typesetting in Metapost.
% Miroslav Broz (miroslav.broz@email.cz), May 5th 2004

% May 5th 2004: Change the default font size to 9.5 pt:

\baselineskip=11.4pt

% redefine already defined PlainTeX fonts
\newcount\scl\scl=950
\font\tenrm  =csr10  scaled \scl
\font\sevenrm=csr7   scaled \scl
\font\fiverm =csr5   scaled \scl
\font\teni   =cmmi10 scaled \scl
\font\seveni =cmmi7  scaled \scl
\font\fivei  =cmmi5  scaled \scl
\font\tensy  =cmsy10 scaled \scl
\font\sevensy=cmsy7  scaled \scl
\font\fivesy =cmsy5  scaled \scl

\textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont1=\fiverm%
\textfont1=\teni  \scriptfont1=\seveni  \scriptscriptfont1=\fivei%
\textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy%

\font\tenit=csti10 scaled \scl
\font\tenbf=csbx10 scaled \scl
\font\tentt=cstt10 scaled \scl
\font\tensl=cssl10 scaled \scl

% extra fonts could be eventually switched-off
\newcount\extrafonts
\extrafonts=1

\newfam\vefam
\ifnum\extrafonts=1

% URW grotesk for vectors
  \font\tenve=ugrot at 9.5pt
  \font\eightve=ugrot at 7.6pt
  \font\sixve=ugrot at 5.7pt
  \font\fiveve=ugrot at 4.75pt
  \textfont\vefam=\tenve \scriptfont\vefam=\eightve \scriptscriptfont\vefam=\sixve

% Euro symbol (by Adobe fonts)
  \font\eurofnt=zpeurs scaled \scl

% Silvio Levy's non-slanted greek letters (namely \mugr)
  \font\tengr    gr10 scaled 1000
  \font\ninegr   gr10 scaled 900
  \font\eightgr  gr10 scaled 800
  \font\sevengr  gr7  scaled 1000
  \font\sixgr    gr7  scaled 900
  \font\fivegr   gr5  scaled 1000

\else
  \let\tenve=\relax
  \let\eightve=\relax
  \let\sixve=\relax
  \let\fiveve=\relax

  \let\eurofont=\relax
  \let\tengr=\relax
  \let\ninegr=\relax
  \let\eightgr=\relax
  \let\sevengr=\relax
  \let\sixgr=\relax
  \let\fivegr=\relax
\fi

\font\smallfnt=csr8 scaled \scl

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\input fop

\rm

\let\fntaxes=\teni
\let\fntpoint=\teni
\let\fntsmall=\sevenrm
\let\fntsmallit=\sevenit
\def\fntvector{\fam\vefam\tenve}

\let\fv=\fntvector
\let\fp=\fntpoint

\def\vpic#1{{\fv #1}}		%% vectors
\def\opic#1{{\fntaxes #1}}	%% axes
\def\tpic#1{{\rm #1}}		%% ordinary text labels
\def\cpic#1{{\rm #1}}		%% chemical labels
\def\ppic#1{{\fp #1}}		%% points

\let\myepsilon=\varepsilon
\let\mypi=\pi
\let\myrho=\varrho
\let\myphi=\varphi
\let\mykappa=\varkappa

\def\subfig#1{#1}

\def\frc#1#2{%
  \mathchoice{%
    {\textstyle\mathstrut#1\over\textstyle\mathstrut#2}}%
    {{\textstyle\mathstrut#1\over\textstyle\mathstrut#2}}%
    {{\scriptstyle\mathstrut#1\over\scriptstyle\mathstrut#2}}%
    {{\mathstrut#1\over\mathstrut#2}%
  }%
}

\def\,{\ifmmode\mskip\thinmuskip\else\leavevmode\thinspace\fi}

\def\vec#1{{\fntvector #1}}


