% \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
\def\fileversion{v2.0a}
\def\filedate{93/05/13}
\def\docdate {93/05/13}

%\iffalse   % this is a METACOMMENT !
%
%  File `nfconcr.dtx'.
%% Copyright (C) 1989-1993 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
%
%\fi
% \CheckSum{103}
%% \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         \~}
%%
%
% \setcounter{StandardModuleDepth}{1}
% \def\dst{{\csname mediumseries\endcsname\sc docstrip}}
%
% \MakeShortVerb{\|}
%
% \title{The \texttt{nfconcr} style option}
% \author{Frank Mittelbach \and Rainer Sch\"opf}
%
% \maketitle
%
% \section{Introduction}
%
% This style option sets up some font shape definition and one math
% version to allow setting documents similar to the book ``Concrete
% math''.
%
% The current version of this file should serve only as a model.
% It shows you how to define an additional math version but it doesn't
% go all the way at the moment.
%
% \StopEventually{}
%
% \section{The Implementation}
%
% We start by writing to the VDU and the transcript file.
%    \begin{macrocode}
%<*style>
\typeout{Style Option: `nfconcr'
  \fileversion\space <\filedate> (FMi and RmS)}
\typeout{English Documentation
  \@spaces\@spaces <\docdate> (FMi and RmS)}
%    \end{macrocode}
%  For the style file we have to make sure that it runs under NFSS
% release 2, so we check for appropriate command names.
%    \begin{macrocode}
\@ifundefined{DeclareFontShape}
     {\@ifundefined{selectfont}
        {\@latexerr{The `nfconcr' style option can only be used
                    with the new^^Jfont selection scheme}\@eha}
        {\@latexerr{The `nfconcr' 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}
%
% The font shape group definitions for the Concrete Roman fonts are
% part of the standard NFSS setup, so we don't define them again.
%
% \begin{macro}{\graffiti}
% \begin{macro}{\pgraffiti}
%    I don't think that it is really necessary to make a robust
%    version but \ldots
%    \begin{macrocode}
\def\graffiti{\protect\pgraffiti}
%    \end{macrocode}
%    Note that this command has no arguments, it simply calls or
%    protects (depending on the current meaning of |\protect|) the
%    |\pgraffiti| macro.  \marginpar{\graffiti This macro now sets
%    everything necessary to switch to the \texttt{ccslc} font. It
%    therefore serves as a good example how to access special fonts
%    for special applications with the new font selection scheme.}
%    \begin{macrocode}
\def\pgraffiti{\fontfamily{ccr}\fontseries{c}%
               \fontshape{sl}\fontsize{9}{10pt}\selectfont}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{euler}
%    Now we define the basic  math symbol fonts for the new version.
%    All others will be inherited.
%    \begin{macrocode}
\DeclareMathVersion{euler}
\SetSymbolFont{operators}{euler}{OT1}{ccr}{m}{n}
\SetSymbolFont{letters}{euler}{OML}{eur}{m}{n}
\SetSymbolFont{symbols}{euler}{OMS}{cmsy}{m}{n}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\symeulerextra}
%    We also add a special symbol font basically for the euler version
%    which contains the redesigned math symbols.
%    \begin{macrocode}
\DeclareSymbolFont{eulerextra}{U}{euex}{m}{n}
%    \end{macrocode}
% \end{macro}
%
%
% To set up the math version properly we have to change some
% declarations for math symbols. We have to take, for example, digits
% in math from the math group number one, i.e.\ from the euler cursive
% font.  The current implementation of NFSS2 doesn't support switching
% such settings back and forth between math versions because it would
% mean an enormous amount of overhead. But this leaves us with an
% undesired effect if we try mixing such an incompatible math version
% with, say, \LaTeX's normal version: we will then get oldstyle
% numerals in math.
%
% We will leave this problem open at the moment until there is more
% experience with this new font selection scheme.  After all, it does
% not seem a very good idea to use such incompatible math versions
% together in one document.
%
% So here we are, re-arranging some of the internal tables:
%    \begin{macrocode}
\DeclareMathSymbol{0}{\mathalpha}{letters}{"30}
\DeclareMathSymbol{1}{\mathalpha}{letters}{"31}
\DeclareMathSymbol{2}{\mathalpha}{letters}{"32}
\DeclareMathSymbol{3}{\mathalpha}{letters}{"33}
\DeclareMathSymbol{4}{\mathalpha}{letters}{"34}
\DeclareMathSymbol{5}{\mathalpha}{letters}{"35}
\DeclareMathSymbol{6}{\mathalpha}{letters}{"36}
\DeclareMathSymbol{7}{\mathalpha}{letters}{"37}
\DeclareMathSymbol{8}{\mathalpha}{letters}{"38}
\DeclareMathSymbol{9}{\mathalpha}{letters}{"39}
%    \end{macrocode}
%
% And here are some examples resetting math symbol declarations to
% fetch them from the  the special
% extension font. 
%    \begin{macrocode}
\DeclareMathSymbol{\intop}{\mathop}{eulerextra}{"52}
\DeclareMathSymbol{\ointop}{\mathop}{eulerextra}{"48}
\DeclareMathSymbol{\sum}{\mathop}{eulerextra}{"50}
\DeclareMathSymbol{\prod}{\mathop}{eulerextra}{"51}
%    \end{macrocode}
%
% \begin{macro}{\@makefnmark}
%    Since numbers for footnotes are text numbers and not math
%    formulas we prefer shapes coming from Concrete roman (like
%    12345) instead of $12345$. So we have to change the footnote mark
%    generation to avoid using math mode.
%    \begin{macrocode}
\def\@makefnmark{\raise 1ex\hbox{\scriptsize\@thefnmark}}
%    \end{macrocode}
% \end{macro}
%
%
%    \begin{macrocode}
\mathversion{euler}
%</style>
%    \end{macrocode}
%
%
% \section{The documentation driver file}
%
% The next bit of code contains the documentation driver file for
% \TeX{}, i.e., the file that will produce the documentation you are
% currently reading. It will be extracted from this file by the \dst{}
% program.
%    \begin{macrocode}
%<*driver>
\documentstyle[doc,nfconcr]{article}

% dimensions from ltugboat.sty:

\setlength\textwidth{31pc} 
\setlength\textheight{54pc}
\setlength{\parindent}{0pt}
\setlength{\parskip}{2pt plus 1pt minus 1pt}
\setlength{\oddsidemargin}{8pc} 
\setlength{\marginparwidth}{8pc}
\setlength{\topmargin}{-2.5pc} 
\setlength{\headsep}{20pt}
\setlength{\columnsep}{1.5pc} 
\setlength{\columnwidth}{18.75pc}

\EnableCrossrefs         
%\DisableCrossrefs % Say \DisableCrossrefs if index is ready

\RecordChanges     % Gather update information

\CodelineIndex     % Index code by line number

%\OnlyDescription  % comment out for implementation details
%\OldMakeindex     % use if your MakeIndex is pre-v2.9

%    \end{macrocode}
%    Below you can see a preamble declaration for NFSS2 to substitute
%    some font shapes. The the marginpar above typewriter is requested
%    which means NFSS will search for a condensed slanted typewriter
%    which isn't available. The substitution mechanism would switch to
%    a medium width normal shape typewriter. To avoid this, we declare
%    a special substitution with the next line. We use the
%    \texttt{ssub} function to avoid a warning.
%    \begin{macrocode}
\DeclareFontShape{OT1}{cmtt}{c}{sl}
  { <-> ssub * cmtt/m/sl }{}

\begin{document}
   \DocInput{nfconcr.dtx}
   \PrintIndex\PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
%
% \Finale

\endinput
