\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{baskervilleextended}
[2007/11/02 0.1 by Luci Ellis]
\RequirePackage[T1]{fontenc}
\RequirePackage{amsmath}
\RequirePackage{txfonts}

\newif\if@gtafont{}
\DeclareOption{gtamac}{\@gtafonttrue}
\ExecuteOptions{}
\ProcessOptions

% Which Baskerville
\newcommand{\@textfont}{pnb}
\if@gtafont\renewcommand{\@textfont}{gtamacbaskerville}
\fi
\renewcommand{\familydefault}{\@textfont}% defines text font as whichever baskerville

\renewcommand{\rmdefault}{\@textfont}

\newcommand{\math@sfGreek}{txr}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Math font - modified from textmath.sty by Olaf Dietrich
% Change font for digits and "operators" (\sin, \exp, ...)
% to default sans serif font
\SetSymbolFont{operators}{normal}{T1}{\@textfont}{m}{n}
\SetSymbolFont{operators}{bold}{T1}{\@textfont}{bx}{n}
% change letters
\DeclareSymbolFont{textmath}{T1}{\@textfont}{m}{it}
\SetSymbolFont{textmath}{normal}{T1}{\@textfont}{m}{it}
\SetSymbolFont{textmath}{bold}{T1}{\@textfont}{bx}{it}


\DeclareMathSymbol{A}{\mathalpha}{textmath}{`A}
\DeclareMathSymbol{B}{\mathalpha}{textmath}{`B}
\DeclareMathSymbol{C}{\mathalpha}{textmath}{`C}
\DeclareMathSymbol{D}{\mathalpha}{textmath}{`D}
\DeclareMathSymbol{E}{\mathalpha}{textmath}{`E}
\DeclareMathSymbol{F}{\mathalpha}{textmath}{`F}
\DeclareMathSymbol{G}{\mathalpha}{textmath}{`G}
\DeclareMathSymbol{H}{\mathalpha}{textmath}{`H}
\DeclareMathSymbol{I}{\mathalpha}{textmath}{`I}
\DeclareMathSymbol{J}{\mathalpha}{textmath}{`J}
\DeclareMathSymbol{K}{\mathalpha}{textmath}{`K}
\DeclareMathSymbol{L}{\mathalpha}{textmath}{`L}
\DeclareMathSymbol{M}{\mathalpha}{textmath}{`M}
\DeclareMathSymbol{N}{\mathalpha}{textmath}{`N}
\DeclareMathSymbol{O}{\mathalpha}{textmath}{`O}
\DeclareMathSymbol{P}{\mathalpha}{textmath}{`P}
\DeclareMathSymbol{Q}{\mathalpha}{textmath}{`Q}
\DeclareMathSymbol{R}{\mathalpha}{textmath}{`R}
\DeclareMathSymbol{S}{\mathalpha}{textmath}{`S}
\DeclareMathSymbol{T}{\mathalpha}{textmath}{`T}
\DeclareMathSymbol{U}{\mathalpha}{textmath}{`U}
\DeclareMathSymbol{V}{\mathalpha}{textmath}{`V}
\DeclareMathSymbol{W}{\mathalpha}{textmath}{`W}
\DeclareMathSymbol{X}{\mathalpha}{textmath}{`X}
\DeclareMathSymbol{Y}{\mathalpha}{textmath}{`Y}
\DeclareMathSymbol{Z}{\mathalpha}{textmath}{`Z}
\DeclareMathSymbol{a}{\mathalpha}{textmath}{`a}
\DeclareMathSymbol{b}{\mathalpha}{textmath}{`b}
\DeclareMathSymbol{c}{\mathalpha}{textmath}{`c}
\DeclareMathSymbol{d}{\mathalpha}{textmath}{`d}
\DeclareMathSymbol{e}{\mathalpha}{textmath}{`e}
\DeclareMathSymbol{f}{\mathalpha}{textmath}{`f}
\DeclareMathSymbol{g}{\mathalpha}{textmath}{`g}
\DeclareMathSymbol{h}{\mathalpha}{textmath}{`h}
\DeclareMathSymbol{i}{\mathalpha}{textmath}{`i}
\DeclareMathSymbol{j}{\mathalpha}{textmath}{`j}
\DeclareMathSymbol{k}{\mathalpha}{textmath}{`k}
\DeclareMathSymbol{l}{\mathalpha}{textmath}{`l}
\DeclareMathSymbol{m}{\mathalpha}{textmath}{`m}
\DeclareMathSymbol{n}{\mathalpha}{textmath}{`n}
\DeclareMathSymbol{o}{\mathalpha}{textmath}{`o}
\DeclareMathSymbol{p}{\mathalpha}{textmath}{`p}
\DeclareMathSymbol{q}{\mathalpha}{textmath}{`q}
\DeclareMathSymbol{r}{\mathalpha}{textmath}{`r}
\DeclareMathSymbol{s}{\mathalpha}{textmath}{`s}
\DeclareMathSymbol{t}{\mathalpha}{textmath}{`t}
\DeclareMathSymbol{u}{\mathalpha}{textmath}{`u}
\DeclareMathSymbol{v}{\mathalpha}{textmath}{`v}
\DeclareMathSymbol{w}{\mathalpha}{textmath}{`w}
\DeclareMathSymbol{x}{\mathalpha}{textmath}{`x}
\DeclareMathSymbol{y}{\mathalpha}{textmath}{`y}
\DeclareMathSymbol{z}{\mathalpha}{textmath}{`z}

\DeclareMathSymbol{\imath}{\mathalpha}{textmath}{"10}
\DeclareMathSymbol{\jmath}{\mathalpha}{textmath}{"11}


\DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n} % Ralph Smith Formal Script
\DeclareSymbolFont{textmathGreek}{OT1}{\math@sfGreek}{m}{n}
\SetSymbolFont{textmathGreek}{normal}{OT1}{\math@sfGreek}{m}{n}
\SetSymbolFont{textmathGreek}{bold}{OT1}{\math@sfGreek}{b}{n}
% Redeclaring uppercase Greek and math accents back to txfonts
% Because New Baskerville doesn't have Greek letters in T1 encoding
% And the T1 accents just look bad
\DeclareMathSymbol{\Gamma}{\mathalpha}{textmathGreek}{"00}
\DeclareMathSymbol{\Delta}{\mathalpha}{textmathGreek}{"01}
\DeclareMathSymbol{\Theta}{\mathalpha}{textmathGreek}{"02}
\DeclareMathSymbol{\Lambda}{\mathalpha}{textmathGreek}{"03}
\DeclareMathSymbol{\Xi}{\mathalpha}{textmathGreek}{"04}
\DeclareMathSymbol{\Pi}{\mathalpha}{textmathGreek}{"05}
\DeclareMathSymbol{\Sigma}{\mathalpha}{textmathGreek}{"06}
\DeclareMathSymbol{\Upsilon}{\mathalpha}{textmathGreek}{"07}
\DeclareMathSymbol{\Phi}{\mathalpha}{textmathGreek}{"08}
\DeclareMathSymbol{\Psi}{\mathalpha}{textmathGreek}{"09}
\DeclareMathSymbol{\Omega}{\mathalpha}{textmathGreek}{"0A}
\DeclareMathSymbol{\upDelta}{\mathalpha}{textmathGreek}{"01}
\DeclareMathSymbol{\upOmega}{\mathalpha}{textmathGreek}{"0A}
% Accents
\DeclareMathAccent{\grave}{\mathord}{textmathGreek}{"12}
\DeclareMathAccent{\acute}{\mathord}{textmathGreek}{"13}
\DeclareMathAccent{\breve}{\mathord}{textmathGreek}{"1D}
\DeclareMathAccent{\hat}{\mathord}{textmathGreek}{"5E}
\DeclareMathAccent{\tilde}{\mathord}{textmathGreek}{"7E}
\DeclareMathAccent{\bar}{\mathord}{textmathGreek}{"16}
\DeclareMathAccent{\dot}{\mathalpha}{textmathGreek}{"5F}
\DeclareMathAccent{\ddot}{\mathalpha}{textmathGreek}{"7F}

\endinput
