%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% aabetong.sty -- Using euler in math and concrete in the text.  CM sans
%% serif family for bold (The norwegian word for concrete is "betong").
%% 
%% Author          : Anders Andersen
%% Created On      : Tue Jun  6 19:01:03 1995
%% Last Modified By: Anders Andersen
%% Last Modified On: Thu Jun 21 13:23:27 2001
%% Status          : Unknown, Use with caution!
%% 
%% (C) Copyright 1995, Anders Andersen, all rights reserved.
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% --------------------------------------%--------------------------------------
% ---------------------------- Identification part ----------------------------
% --------------------------------------%--------------------------------------

\RequirePackage{rcs}
\RCS$Date: 2002/07/09 23:45:44 $
\RCS$RCSfile: aabetong.sty,v $
\RCS$Revision: 1.1 $
\RCS$State: Exp $
\RCS$Author: aa $
\typeout{Package: `aabetong' v\RCSRevision\space <\RCSRawDate> (AA)}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{aabetong}[\RCSRawDate]


% --------------------------------------%--------------------------------------
% -------------------------- Declaration of options ---------------------------
% --------------------------------------%--------------------------------------

\DeclareOption{standard-baselineskips}{%
  \PassOptionsToPackage{standard-baselineskips}{beton}}
\DeclareOption{courier}{%
  \def\selecttt{%
    \DeclareFontFamily{T1}{pcr}{\hyphenchar \font =-1}
    \DeclareFontFamily{OT1}{pcr}{\hyphenchar \font =-1}
    \DeclareFontShape{T1}{pcr}{m}{n}{<->s*[1.0759] pcrr8t}{}
    \DeclareFontShape{T1}{pcr}{b}{n}{<->s*[1.0759] pcrb8t}{}
    \DeclareFontShape{T1}{pcr}{m}{sl}{<->s*[1.0759] pcrro8t}{}
    \DeclareFontShape{T1}{pcr}{b}{sl}{<->s*[1.0759] pcrbo8t}{}
    \DeclareFontShape{OT1}{pcr}{m}{n}{<->s*[1.0759] pcrr7t}{}
    \DeclareFontShape{OT1}{pcr}{b}{n}{<->s*[1.0759] pcrb7t}{}
    \DeclareFontShape{OT1}{pcr}{m}{sl}{<->s*[1.0759] pcrro7t}{}
    \DeclareFontShape{OT1}{pcr}{b}{sl}{<->s*[1.0759] pcrbo7t}{}
    \DeclareFontShape{OT1}{pcr}{bx}{n}{<->ssub*pcr/b/n}{}
    \DeclareFontShape{OT1}{pcr}{bx}{sl}{<->ssub*pcr/b/sl}{}
    \DeclareFontShape{OT1}{pcr}{m}{it}{<->ssub*pcr/m/sl}{}
    \DeclareFontShape{OT1}{pcr}{b}{it}{<->ssub*pcr/b/sl}{}
    \DeclareFontShape{OT1}{pcr}{bx}{it}{<->ssub*pcr/b/it}{}
    \renewcommand{\ttdefault}{pcr}}}
\DeclareOption{nocourier}{%
  \def\selecttt{}}

% --------------------------------------%--------------------------------------
% --------------------------- Execution of options ----------------------------
% --------------------------------------%--------------------------------------

\ExecuteOptions{courier}
\ProcessOptions


% --------------------------------------%--------------------------------------
% ------------------------------ Package loading ------------------------------
% --------------------------------------%--------------------------------------

\RequirePackage{beton}
\RequirePackage[mathcal,mathbf]{euler}


% --------------------------------------%--------------------------------------
% --------------------------------- Main code ---------------------------------
% --------------------------------------%--------------------------------------

\AtBeginDocument{%
  % Select tt family (se courier option)
  \selecttt
  % Using CM sans serif family (cmss) for boldface
  \DeclareFontShape\encodingdefault{ccr}{bx}{n}{<->ssub*cmss/bx/n}{}%
  \DeclareFontShape\encodingdefault{ccr}{bx}{it}{<->ssub*cmss/bx/it}{}%
  \DeclareFontShape\encodingdefault{ccr}{bx}{sl}{<->ssub*cmss/bx/sl}{}%
  \DeclareFontShape\encodingdefault{ccr}{bx}{sc}{<->ssub*cmss/bx/sc}{}%
  % This is from OT1ccr.fd (be aware that this only works under OT1 encoding):
%  \DeclareFontShape{OT1}{ccr}{m}{it}{ <10> <10.95> <12> ccti10}{}%
%  \DeclareFontShape{OT1}{ccr}{m}{sc}{ <10> <10.95> <12> cccsc10}{}%
%  \DeclareFontShape{OT1}{ccr}{m}{sl}{ <9> ccsl9 <10> <10.95> <12> ccsl10}{}%
%  \DeclareFontShape{OT1}{ccr}{c}{sl}{ <9> ccslc9}{}%
  % This is from T1ccr.fd:
%  \DeclareFontShape{T1}{ccr}{m}{it}{ <10> <10.95> <12> dcti10}{}%
%  \DeclareFontShape{T1}{ccr}{m}{sc}{ <10> <10.95> <12> dccsc10}{}%
%  \DeclareFontShape{T1}{ccr}{bx}{sl}{ <->sub * cmr/bx/it}{}%
  % I guess we can say that concrete prefer OT1 fontencoding. Ok I prefer
  % to use this:
  \DeclareFontShape\encodingdefault{ccr}{m}{it}{ <-> ccti10 }{}%
  \DeclareFontShape\encodingdefault{ccr}{m}{sc}{ <-> cccsc10 }{}%
  \DeclareFontShape\encodingdefault{ccr}{m}{sl}{ <-10> ccsl9 <10-> ccsl10 }{}%
  }
