% \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.0d}
\def\filedate{93/04/03}
\def\docdate {93/05/15}
% \CheckSum{27}
%% \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         \~}
%
%\iffalse        This is a META comment
%
% File `fontdef.dtx'.
% Copyright (C) 1989-1993 Frank Mittelbach and Rainer Sch\"opf,
% all rights reserved.
%
%\fi
%
%
% \title{The {\tt fontdef.dtx} file\thanks
%         {This file has version number \fileversion, dated \filedate.
%                The documentation was last revised on \docdate}\\
%       for use with NFSS2}
% \author{Frank Mittelbach \and Rainer Sch\"opf}
%
% \MakeShortVerb{\|}
% \def\dst{{\csname mediumseries\endcsname\sc docstrip}}
% \setcounter{StandardModuleDepth}{1}
%
%
% \maketitle
%
% \section{Introduction}
%
% This file is used to generate the file {\tt fontdef.tex}, which is
% used during the format generation.  It contains the declaration of
% the standard encodings used at the site as well as a minimal subset
% of font shape groups that NFSS will look at to ensure that the
% specified encodings are valid.
%
% \section{Customization}
%
% You are not allowed to change this source file!  If you want
% to change the default encodings and/or the fonts shape groups
% preloaded you should should either create a copy of this file under
% a different name and change this copy, or change the generated file
% {\tt fontdef.tex}. 
%
% If you don't plan to use Computer Modern much or at all, it is
% probably a good idea make your own version of the file
% |fontdef.tex|. Look at the comments below (docstrip module `main')
% to see what should should go into such a file.
%
% Otherwise there is no need to produce your own version.
%
% Please note, that the following standard encodings  have to
% be defined in all local variants of {\tt fontdef.tex} to guarantee
% that all \LaTeX+NFSS2 installations behave in the same way. 
% \begin{center}
% \begin{tabular}{ll}
%   |OT1|      &   old \TeX{} text encoding \\
%   |OML|      &   old \TeX{} math letters encoding \\
%   |OMS|      &   old \TeX{} math symbols encoding \\
%   |OMX|      &   old \TeX{} math extension symbols encoding \\
%   |U|        &   unknown encoding
% \end{tabular}
% \end{center}
% Notice that all such encodings are `old' in the sense that we hope
% that they will be superseeded soon by encoding standards defined by
% the \TeX{} user's community. Therefore this set of default encodings
% may change in the future.
%
% The first candidate is |OT1| which will soon be replaced by |T1| the
% official \TeX{} text encoding.
%
% \begin{quote}{\bf Warning:}
% If you add additional encodings to this file there is no guarantee
% any longer that the files processable at your installation will be
% processable at other installations too. Thus, if you make use of
% such an encoding in your document, e.g., if you intend to typeset in
% Cyrillic (|OT2| encoding), you need to specify this encoding in the
% preamble of your document prior to sending it to another
% installation. Once the encoding is specified in that place in your
% document the document is processable at all NFSS2 installations.
% \end{quote}
%
%
% \section{The {\tt docstrip} modules}
%
% The following modules are used to direct {\tt docstrip} in
% generating external files:
% \begin{center}
% \begin{tabular}{ll}
%   driver & produce a documentation driver file \\
%   main   & produce the file {\tt fontdef.tex}\\
% \end{tabular}
% \end{center}
% A typical {\tt docstrip} command file would then have entries like:
% \begin{verbatim}
%\generateFile{fontdef.tex}{t}{\from{fontdef.dtx}{main}}
%\end{verbatim}
%
% \section{The {\tt fontdef.tex} file}
%
%    We identify the main file used during the installation both on
%    the terminal and in the transcript file.
%    \begin{macrocode}
%<*main>
\immediate\write\sixt@@n{File: `fontdef.tex'  \space
 \fileversion\space <\filedate> (FMi and RmS)}
\immediate\write\sixt@@n{}
\immediate\write\sixt@@n{*** If you modify this file please change
  the lines above ***}
%    \end{macrocode}
%
%  \subsection{Encodings}  
%
%    This file declares the standard encodings for text and math
%    fonts.
%    \begin{macrocode}
\DeclareFontEncoding{OT1}{}{}
%    \end{macrocode}
%
%    The encodings for math are next:
%    \begin{macrocode}
\DeclareFontEncoding{OML}{}{}
\DeclareFontEncoding{OMS}{}{}
\DeclareFontEncoding{OMX}{}{}
%    \end{macrocode}
%    Finally a declaration for |U| encoding which serves for all fonts
%    that do not fit standard encodings. For math this sets up
%    |\noaccents@| providing for AMS-\LaTeX{}. This macro is used
%    therein to handle accented characters if they are not supported
%    by the font. In other words, if fonts with |U| encoding are used
%    in math, all accents (like from |\breve|) are fetched from some
%    other font that has them.
%    \begin{macrocode}
\DeclareFontEncoding{U}{}{\noaccents@}
%    \end{macrocode}
%    
%    If different encodings for text fonts are in use one could place
%    the common setups into |\DeclareFontEncodingDefaults|. But
%    normally we don't have to change declarations.
%    \begin{macrocode}
\DeclareFontEncodingDefaults{}{}
%    \end{macrocode}
%    
%    \begin{macrocode}
\DeclareFontSubstitution{OT1}{cmr}{m}{n}
%    \end{macrocode}
%
%    The encodings for math are next:
%    \begin{macrocode}
\DeclareFontSubstitution{OML}{cmm}{m}{it}
\DeclareFontSubstitution{OMS}{cmsy}{m}{n}
\DeclareFontSubstitution{OMX}{cmex}{m}{n}
\DeclareFontSubstitution{U}{cmr}{m}{n}
%<+main>%\DeclareFontSubstitution{OT2}{cmr}{m}{n}
%    \end{macrocode}
%
%    For every encoding declaration, NFSS2 will try to verify that the
%    given substitution information makes sense, i.e., that it is
%    impossible to go into an endless loop if font substitution
%    happens. This is done at the moment the |\begin{document}| is
%    encountered. NFSS2 will then check that for every encoding the
%    substitution defaults form a valid font shape group, which means
%    that it will look if there is a |\DeclareFontShape| declaration
%    for this combination. We will therefore load the corresponding
%    |.fd| files now. If we don't do this they would be loaded at
%    verification time which would delay processing unnecessarily.
%
%    If you add additional encodings in your variant, then you should
%    also load the corresponding |.fd| files into the format. This is
%    however only speeding up the processing later on, it has no
%    influence otherwise.
%
%    But before we inputing the |.fd| files we check on |\fd@prefix|. If
%    this macro is non-empty we are running under a special \TeX{}
%    system and it may be possible that the user hasn't move the files
%    to the right directory so far.
% \changes{v20b}{93/03/09}{Added `fd@prefix check}
% \changes{v20b}{93/03/09}{Added `fd@prefix for `input}
%    \begin{macrocode}
\ifx\fd@prefix\@empty
\else
  \font@warning{If TeX can't find some font definition 
     files (.fd)\f@warn@break
     you have to move them to the directory specified in 
     the file `fdprefix.tex'}
\fi
\input \fd@prefix OT1cmr.fd
\input \fd@prefix OMLcmm.fd
\input \fd@prefix OMScmsy.fd
\input \fd@prefix OMXcmex.fd
\input \fd@prefix Ucmr.fd
%    \end{macrocode}
%    
%    Then we set the default text font encoding. This will hopefully
%    change some day to |T1|.
%    \begin{macrocode}
\fontencoding{OT1}
%    \end{macrocode}
%    
%    Even with all the precautions it is still possible that NFSS will
%    run into problems, for example, when a |.fd| file contains
%    corrupted data. To guard for such cases NFSS has a very low-level
%    fallback font that is installed with the following line.
%    \begin{macrocode}
\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
%    \end{macrocode}
%    This means, ``if everything else fails use Computer Modern Roman
%    normal shape at 10pt in the old encoding.
%
%    This finishes the low-level setup in {\tt fontdef.tex}.
%    \begin{macrocode}
%</main>
%    \end{macrocode}
%
%    
% \StopEventually{}
%
% \section{A driver for this document}
%
% 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]{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}

\DisableCrossrefs

\CodelineIndex     % Index code by line number

\OnlyDescription  % comment out for implementation details

\begin{document}
   \DocInput{fontdef.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
%
% \DeleteShortVerb{\|}
%
% \Finale
%
\endinput
