%
% eco.sty
%
% 1996/03/17 sebastian_kirsch@kl.maus.de
%
% Loads fontenc-package with T1-encoding and redefines the
% default font families so eco-fonts (ec-fonts with oldstylenums instead of
% regular digits) are used.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{eco}[1998/07/19 Fontencoding with eco-fonts]

\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{fontenc}}
\ProcessOptions\relax

\RequirePackage[T1]{fontenc}
\RequirePackage{ifthen}

\renewcommand{\rmdefault}{cmor}
\renewcommand{\sfdefault}{cmoss}
\renewcommand{\ttdefault}{cmott}

% \newstylenums{} switches back to new-style figures (analogous to 
% \oldstylenums{}.)

\newcommand{\newstylenums}[1]{%
  \begingroup%
  \ifthenelse{\equal{\f@family}{cmor}}{\fontfamily{cmr}}{%
    \ifthenelse{\equal{\f@family}{cmoss}}{\fontfamily{cmss}}{%
      \ifthenelse{\equal{\f@family}{cmott}}{\fontfamily{cmtt}}}}%
  \selectfont%
  #1%
  \endgroup%
  }

\endinput
