% \iffalse meta-comment
%
% Copyright (C) 1989--1993 by Frank Mittelbach, Rainer Schoepf.
% All rights reserved.
% 
% This file is part of the NFSS2 (New Font Selection Scheme) package.
% 
%  This package is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see readme files.
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.  You may however copy
% this file to a file with a different name and then change the copy
% if you obey the restrictions on file changes described in
% readme.mz.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in readme.mz8.
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
% \iffalse  -*- latex -*-
%
% Copyright (C) 1992, 1993 by Frank Jensen, all rights reserved.
% 
% Please send error reports and suggestions for improvements to:
%
%                          Frank Jensen
%                          Aalborg University
%                          DK-9220 Aalborg \O
%                          Denmark
%               Internet:  <fj@iesd.auc.dk>
% \fi

\def\filename{nfbeton}
\def\fileversion{v1.0b}
\def\filedate{93/03/09}

%\iffalse
%
%% File `nfbeton.dtx'.
%% Copyright (C) 1992, 1993 Frank Jensen, all rights reserved.
%
%\fi
%% \CheckSum{133}
%% \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         \~}
%%
%
% \changes{v1.0b}{93/05/15}{Switched to new naming conventions}
%
% \title{The {\tt nfbeton} style option}
% \author{Frank Jensen}
%
% \maketitle
%
% \section{Introduction}
%
% This style option sets things up for using the Concrete fonts
% designed by Don Knuth.
%
% This style option is based on Knuth's macros for the book ``Concrete
% Mathematics''~\cite{concrete}.  Knuth's macros can be found through
% anonymous ftp to {\tt labrea.stanford.edu}: look for the file {\tt
% gkpmac.tex} on directory {\tt pub/tex/local/lib}.  Also, the fonts
% can be found at that site: look on directory {\tt pub/tex/local/cm}.
%
% The Concrete fonts look best with a larger value of
% \verb+\baselineskip+ than the value used for the Computer Modern
% fonts.  This style option makes some decisions about line spacing
% that overrides the values specified in the standard \LaTeX\ styles.
% See Section~\ref{baselineskip-settings} for further details.
%
% This style option does not provide any commands to support graffiti.
%
% This style option deals with the {\em text font\/} issues
% of~\cite{concrete}; it does not set up things like text width/height,
% font size, numbering scheme (e.g., \cite{concrete} uses the page
% number to number figures and tables with; use a separate style
% option to get such a scheme), math fonts (use the {\tt nfeuler} style
% option to get the other part of the look of \cite{nfconcr}), and it
% doesn't change the space around displayed equations.  It
% does set up the following:
% \begin{itemize}
%    \item Concrete fonts for text and math group zero.
%    \item Increased value for \verb+\baselineskip+.
%    \item Oldstyle numerals for equation numbers.
% \end{itemize}
%
% PS.  ``Beton'' is the danish word for the `hard' interpretation of the
% english word ``concrete'' (there already exists a style option of the
% name {\tt nfconcr} by Frank Mittelbach and Rainer Sch\"opf).
%
% \StopEventually{
% \begin{thebibliography}{1}
%    \bibitem{concrete}  {\sc R. L. Graham, D. E. Knuth, and O.
%    Patashnik}. {\it Concrete Mathematics}, Addison-Wesley, 1989.
% \end{thebibliography}
% }
%
% \section{The Implementation}
%
% First, we announce the style option.
%    \begin{macrocode}
%<*style>
\typeout{Style Option: `\filename' \fileversion\space <\filedate> (FJ)}
%    \end{macrocode}
%
% This style option requires the NFSS, release~2.
%    \begin{macrocode}
\@ifundefined{DeclareFontShape}
     {\@ifundefined{selectfont}
        {\@latexerr{The `\filename' style option can only be used
                    with the new^^Jfont selection scheme}\@eha}
        {\@latexerr{The `\filename' style option can only be used
                    with the new^^Jfont selection scheme *release 2*}
                   {Your format contains NFSS release 1, but this style
                    option was^^Jdeveloped for release 2.}
        }
      \endinput}
     {}
%    \end{macrocode}
%
% \section{Font definitions}
%
% The Concrete family comes in medium normal, medium italic, medium
% slanted, and caps and small caps.  The {\tt.fd} file for them is
% defined in the {\tt cmrfonts.fdd} file.
%
% There are no bold variants of the Concrete fonts.  However,
% in~\cite{concrete}, Knuth chose the bold extended font from the
% Computer Modern (roman) family to go with the Concrete fonts.
% The {\tt.fd} file for the Concrete fonts performs this substitution.
%
% There is also a math italic version of the Concrete fonts; the
% {\tt.fd} file for this is also defined in {\tt cmrfonts.fdd}.
%
% \section{Equation numbers}
%
% \begin{macro}{\theequation}\begin{macro}{\oldsty}
% Knuth uses oldstyle numerals to typeset equation numbers.  They come
% from the math italic font:
%    \begin{macrocode}
\@ifundefined{chapter}
   {\def\theequation{{\protect\oldsty\arabic{equation}}}}
   {\def\theequation{{\protect\oldsty\thechapter}.%
                     {\protect\oldsty\arabic{equation}}}}
\def\oldsty{\fontencoding{OML}\fontfamily{ccm}%
            \fontseries{m}\fontshape{it}\selectfont}
%    \end{macrocode}
% Here we assume that \verb+\thechapter+ generates a number (in
% appendices, we get math italic letters as `chapter numbers'!).  We
% also assume the standard format for equation numbers.
% \end{macro}\end{macro}
%
% \begin{macro}{\ref}\begin{macro}{\pageref}
% This won't work with the version of \LaTeX\ dated March 25, 1992 (or
% any previous version).  Later versions of \LaTeX\ contains the
% following code:
%    \begin{macrocode}
%% RmS 92/08/14: made \ref and \pageref robust
\def\ref#1{\@ifundefined{r@#1}{{\reset@font\bf ??}\@warning
   {Reference `#1' on page \thepage \space
    undefined}}{\expandafter\expandafter\expandafter
                \@car\csname r@#1\endcsname
                \@nil\null}}
 
\def\pageref#1{\@ifundefined{r@#1}{{\reset@font\bf ??}\@warning
   {Reference `#1' on page \thepage \space
    undefined}}{\expandafter\expandafter\expandafter
                \@cdr\csname r@#1\endcsname
                \@nil\null}}
%    \end{macrocode}
% \end{macro}\end{macro}
%
% \section{Baselineskip settings}\label{baselineskip-settings}
%
% Knuth chose to use a higher value for \verb+\baselineskip+ because
% of the relatively heavy (compared to Computer Modern) weight of the
% Concrete fonts.
%
% \begin{macro}{\baselineskip@table}
% We specify the values for \verb+\baselineskip+ at various point
% sizes in a style similar to font definitions.  Here is a tentative
% specification for the most important sizes of the Concrete fonts:
%    \begin{macrocode}
\def\baselineskip@table
   {<8>10pt%
    <9>11.5pt%
   <10>13pt%
   <10.95>14.5pt%
   <10.95445>14.5pt%
   <12>16pt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@setsize}
% Most standard \LaTeX\ styles use the \verb+\@setsize+ macro to
% specify point size and baselineskip.  We modify this macro to check
% for such specifications.
%    \begin{macrocode}
\let\old@setsize=\@setsize
\def\@setsize#1#2#3#4%   #4 is point size; #2 is baselineskip value
   {\ifx\baselineskip@table\undefined
       \def\baselineskip@value{#2}%
    \else
       \edef\@tempa{\def\noexpand\@tempb####1<#4}%
       \@tempa>##2<##3\@nil{\def\baselineskip@value{##2}}%
       \edef\@tempa{\noexpand\@tempb\baselineskip@table<#4}%
       \@tempa><\@nil
       \ifx\baselineskip@value\@empty
          \def\baselineskip@value{#2}%
       \fi
    \fi
    \old@setsize{#1}\baselineskip@value{#3}{#4}}
%    \end{macrocode}
% (Maybe it should use the \verb+\every@size+ token register?)
% \end{macro}
%
% \section{Font setup}
%
% We set the default family for \verb+\rm+ to Concrete Roman:
%    \begin{macrocode}
\def\rmdefault{ccr}
%    \end{macrocode}
% Math symbol font `operators' should be Concrete Roman in the normal
% version:
%    \begin{macrocode}
\DeclareSymbolFont{operators}{\encodingdefault}{ccr}{m}{n}
\SetSymbolFont{operators}{bold}{\encodingdefault}{ccr}{bx}{n}
%    \end{macrocode}
%
% \section{Miscellany}
%
% \begin{macro}{\dash}\begin{macro}{\qback}\begin{macro}{\t}
% Knuth used an em-dash surrounded by a little extra space in
% \cite{concrete}; this is obtained by typing \verb=\dash---=.  Also,
% the ending double-quote is pulled a little closer to commas and
% periods (\verb=,\qback''= and \verb=.\qback''=).
%
% The `tie-after' (\verb=\t=) accent needs a Math Italic font: Knuth's
% macros use Computer Modern (I suspect this to be for historical
% reasons: Knuth may have decided to use oldstyle numerals for
% equation numbers {\em after\/} he wrote the \verb+\t+ macro). I
% believe Concrete should be used.
%    \begin{macrocode}
\def\dash---{\thinspace---\hskip.16667em\relax}
\def\qback{\kern-.15em} % between , or . and ''
\def\t#1{{\edef\next{\the\font}%
         \fontencoding{OML}\fontfamily{ccm}%\fontseries{m}%
         \fontshape{it}\selectfont
         \accent"7F\next#1}}
%</style>
%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}
%
% \Finale
% \endinput
%
% The driver file:
%    \begin{macrocode}
%<+driver>\documentstyle[doc]{article}
%<+driver>
%<+driver>% dimensions from ltugboat.sty:
%<+driver>
%<+driver>\setlength{\textwidth}{31pc} 
%<+driver>\setlength{\textheight}{54pc}
%<+driver>\setlength{\parindent}{0pt}
%<+driver>\setlength{\parskip}{2pt plus 1pt minus 1pt}
%<+driver>\setlength{\oddsidemargin}{8pc} 
%<+driver>\setlength{\marginparwidth}{8pc}
%<+driver>\setlength{\topmargin}{-2.5pc} 
%<+driver>\setlength{\headsep}{20pt}
%<+driver>\setlength{\columnsep}{1.5pc} 
%<+driver>\setlength{\columnwidth}{18.75pc}
%<+driver>
%<+driver>\EnableCrossrefs         
%<+driver>%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
%<+driver>
%<+driver>\RecordChanges     % Gather update information
%<+driver>
%<+driver>\CodelineIndex     % Index code by line number
%<+driver>
%<+driver>%\OnlyDescription  % comment out for implementation details
%<+driver>%\OldMakeindex     % use if your MakeIndex is pre-v2.9
%<+driver>\begin{document}
%<+driver> \DocInput{nfbeton.dtx}
%<+driver>\end{document}
%    \end{macrocode}

\endinput

