%\CheckSum{70}
%
% \iffalse meta comment
%
% Copyright (c) Walter Schmidt 1997
% See the file `readme' for the terms of
% copying and modification!
%
% \fi
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<*driver>
\ProvidesFile{ccfonts.drv}
%</driver>
%<package>\ProvidesPackage{ccfonts}
           [1997/04/01 v0.95 (WaS)]     
%
%<*driver> 
\documentclass[11pt]{ltxdoc}
\CodelineNumbered
\begin{document}
 \DocInput{ccfonts.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{ccfonts.drv}
% \MakeShortVerb{\+}
% 
% \title{The \LaTeXe{} package \texttt{ccfonts}}
% \author{Walter Schmidt}
% \date{(\fileversion{} -- \filedate)}
% \maketitle
% \section{Description}
% The \LaTeX{} macro package +ccfonts+ 
% supports typesetting with the font family `Concrete'.
% Loading this package 
% \begin{verse}
% +\usepackage{ccfonts}+
% \end{verse}
% will effect the following:
% \begin{itemize}
% \item The default roman font family will be \texttt{ccr},
% i.\,e Concrete.
% \item 
% The roman font family will be the default for the whole document,
% \emph{both in text and math mode}.
% \item The packages +amsfonts+ or +amssymb+, if loaded  additionally,
% will use the Concrete versions of the AMS symbol fonts. Note that these
% packages should be loaded \emph{after} +ccfonts+!
% \item The default leading (+\baselineskip+) for the font sizes 8--12\,pt
% will be increased slightly.
% \end{itemize}
%
% In case you do not want the enlarged leading, e.\,g.
% with a twocolumn layout, you must load the package with the option
% \texttt{standard-baselineskips}:
% \begin{verse}
% +\usepackage[standard-baselineskips]{cmbright}+
% \end{verse}
%
% In order to use T1 encoded textfonts as the default, request
% \begin{verse}
% +\usepackage[T1]{fontenc}+
% \end{verse}
% after loading the +ccfonts+ package.
%
% \StopEventually{}
%
% \section{Implementation}
% \subsection{Additional font definitions}
% In case the package +amsfonts+ is loaded additionally,
% we must ensure that the Concrete versions of the 
% AMS symbol fonts are used:
%    \begin{macrocode}
%<*package>
\DeclareFontFamily{U}{msa}{}
\DeclareFontShape{U}{msa}{m}{n}{  
  <5> <6> <7> <8> <9> 
  <10> <10.95> 
  <12> <14.4> <17.28> <20.74> <24.88> xccam10}{}
\DeclareFontFamily{U}{msb}{}
\DeclareFontShape{U}{msb}{m}{n}{  
  <5> <6> <7> <8> <9> 
  <10> <10.95> 
  <12> <14.4> <17.28> <20.74> <24.88> xccbm10}{}
%    \end{macrocode}
%
% \subsection{Font setup for math mode}
%    \begin{macrocode}
\DeclareSymbolFont  {operators}   {OT1}{ccr} {m}{n}
\DeclareSymbolFont  {letters}     {OML}{xcm} {m}{it}
\DeclareSymbolFont  {symbols}     {OMS}{xcsy}{m}{n}
\DeclareSymbolFont  {largesymbols}{OMX}{xcex}{m}{n}
\DeclareMathAlphabet{\mathit}     {OT1}{ccr} {m}{it}
%    \end{macrocode}
%
% \subsection{Font setup for text mode}
% We make \texttt{ccr} the default font family:
%    \begin{macrocode}
\renewcommand{\rmdefault}{ccr}
%    \end{macrocode}
%
% The +\baselineskip+ should be larger than with CM Roman.
% In order to overwrite the +\baselineskip+ defined in the commands
% like +\normalsize+, +\small+, etc., we use a trick from Frank Jensen's
% package +beton+.
% First we set up a table containing our +\baselineskip+ values:
%    \begin{macrocode}
\def\cc@baselineskip@table
   {<\@viiipt>10<\@ixpt>11.5<\@xpt>13<\@xipt>14.5<\@xiipt>16}
%    \end{macrocode}
% All the standard \LaTeX\ size-changing commands (+\small+, +\large+,
% etc.)\ are defined in terms of the +\@setfontsize+ macro.  This
% macro is called with the following three arguments: +#1+~is the
% size-changing command; +#2+~is the font size; +#3+~is the
% +\baselineskip+ value.  We modify this macro to check
% the above +\cc@baselineskip@table+ for an alternative +\baselineskip+
% value:
%    \begin{macrocode}
\def\cc@setfontsize#1#2#3%
   {\edef\@tempa{\def\noexpand\@tempb####1<#2}%
    \@tempa>##2<##3\@nil{\def\cc@baselineskip@value{##2}}%
    \edef\@tempa{\noexpand\@tempb\cc@baselineskip@table<#2}%
    \@tempa><\@nil
    \ifx\cc@baselineskip@value\@empty
       \def\cc@baselineskip@value{#3}%
    \fi
    \old@setfontsize{#1}{#2}\cc@baselineskip@value}
%    \end{macrocode}
% Now we redefine +\@setfontsize+:
%    \begin{macrocode}
\let\old@setfontsize=\@setfontsize
\let\@setfontsize=\cc@setfontsize
%    \end{macrocode}
% The +\baselineskip+ values specified in the above table should be
% appropriate for most purposes, i.\,e., for one-column material in the
% normal article/report/book formats.  However, it is sometimes
% desirable to use a smaller vaue for +\baselineskip+, e.\,g. in two-column
% material.  We therefore provide an option
% to turn off the above automatic mechanism for +\baselineskip+ settings:
%    \begin{macrocode}
\DeclareOption{standard-baselineskips}{%
 \let\@setfontsize=\old@setfontsize}
%    \end{macrocode}
% Note that the +\let+-assignment has to be executed after
% +\old@setfontsize+ has been defined; this is ensured by
% the fact that options are processed at the end of the package.
%
% \subsection{Old-style numerals}
% Old-style numerals are taken from the Concrete fonts, too:
%    \begin{macrocode}
\def\oldstylenums#1{%
   \begingroup
    \spaceskip\fontdimen\tw@\font
    \usefont{OML}{xcm}{\f@series}{it}%
    \mathgroup\symletters #1%
   \endgroup
}
%    \end{macrocode}
% In the future this may change; old-style numerals could be
% taken from the `text companion font' by default.
%
% \subsection{Processing options}
%    \begin{macrocode}
\ProcessOptions
%    \end{macrocode}
%
% \subsection{Initialization}
% We ensure that any package loaded after \texttt{ccfonts}
% will find the new value of +\baselineskip+.
%    \begin{macrocode}
\normalsize
%</package>
%    \end{macrocode}
%
% The next line of code prevents DocStrip from adding the
% character table to all modules:
%    \begin{macrocode}
\endinput
%    \end{macrocode}
% \Finale
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%

