% \iffalse meta-comment
%
% Copyright 1994 the LaTeX3 project and the individual authors.
% All rights reserved. For further copyright information see the file
% legal.txt, and any other copyright indicated in this file.
% 
% This file is part of the LaTeX2e system.
% ----------------------------------------
% 
%  This system 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 bugs.txt.
% 
% 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 are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in manifest.txt.
% 
% 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.1g}
\def\filedate{1994/05/16}
\def\docdate {1994/05/16}
% \CheckSum{104}
%% \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-1994 Frank Mittelbach and Rainer Sch\"opf,
% all rights reserved.
%
%\fi
%
% \changes{v2.1a}{1993/12/01}{Update for LaTeX2e}
%
%
% \title{The \texttt{fontdef.dtx} file\thanks
%         {This file has version number \fileversion, dated \filedate.
%                The documentation was last revised on \docdate}\\
%       for use with \LaTeXe}
% \author{Frank Mittelbach \and Rainer Sch\"opf}
%
% \def\dst{{\normalfont\scshape docstrip}}
% \setcounter{StandardModuleDepth}{1}
%
%
% \maketitle
%
% \section{Introduction}
%
% This file is used to generate the file \texttt{fontdef.ltx}, 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.
% It also contains the basic math font setup as well as the font
% hooks.
%
% It is possible to change this setup (by using other fonts, or
% defaults) without losing the ability to
% process documents written at other sites. Portability in this sense
% means that a document will compile without errors. It does not mean
% however, that identical output will be produced. For this it is
% necessary that this file is identical at both installations.
%
% \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
% the name \texttt{fontdef.cfg} change this copy. If \LaTeXe{} finds a
% file of this name it will use it otherwise it uses the standard file
% which is \texttt{fontdef.ltx}.
%
% If you don't plan to use Computer Modern much or at all, it is
% probably a good idea make your own 
% |fontdef.cfg|. 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 \texttt{fontdef.cfg} to guarantee
% that all \LaTeX+NFSS2 installations behave in the same way. 
% \begin{center}
% \begin{tabular}{ll}
%   |T1|      &    Cork \TeX{} text encoding \\
%   |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  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}\textbf{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.
%
% For this reason we suggest that you define a short package file that
% sets up an additional encoding used at your site (rather than
% putting the encoding into this file) since this package can easily
% be shipped with your document.
% \end{quote}
%
%
% \StopEventually{}
%
% \section{The \texttt{docstrip} modules}
%
% The following modules are used to direct \texttt{docstrip} in
% generating external files:
% \begin{center}
% \begin{tabular}{ll}
%   driver & produce a documentation driver file \\
%   main   & produce the file \texttt{fontdef.ltx}\\
% \end{tabular}
% \end{center}
% A typical \texttt{docstrip} command file would then have entries like:
% \begin{verbatim}
%\generateFile{fontdef.ltx}{t}{\from{fontdef.dtx}{main}}
%\end{verbatim}
%
%
% \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>
\documentclass{ltxdoc}
\begin{document}
   \DocInput{fontdef.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
%
%
% \section{The \texttt{fontdef.ltx} 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.ltx'  \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. All others should be declared in packages or in the
%    documents directly.
%
%    For every text encoding there are normally a number of encoding
%    specific commands, eg accents, special characters, etc.  (The
%    definition for such a command might have to change when the
%    encoding is changed, because the character is in a different
%    position, or not available at all, or the accent is produced in a
%    different way.)  This is handled by a general mechanism which is
%    described in \texttt{ltoutenc.dtx}.
%
%    By convention, text  encoding specific declarations including the
%    |\DeclareFontEncoding| declaration are kept in separate file of
%    the form \meta{enc}\texttt{enc.def}, eg \texttt{OT1enc.def}. This
%    allows other applications to make use of the declarations as
%    well.
%    Similar to the default encoding, the loading of the encoding
%    files for the two major text encodings shouldn't be changed.
%    
% \changes{v2.1d}{1994/01/05}{Removed nf prefix from file names.}
% \changes{v2.1f}{1994/05/14}{Removed .def files.}
% \changes{v2.1g}{1994/05/1g}{Removed \cmd\DeclareFontEncoding for ot1
%                             and t1 and input .def files instead}
%    \begin{macrocode}
\input  T1enc.def
\input OT1enc.def       % <- should come last for speed
%    \end{macrocode}
%
%    We then set set the default text font encoding. This will
%    hopefully change some day to |T1|. This setting should \emph{not}
%    be changed to produce a portable format.
%    \begin{macrocode}
\fontencoding{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}
%    
%    Then we define the default substitution for every encoding.
%    This release of \LaTeXe{} assumes that the DC fonts are
%    available. It is possible to change this to point to some other
%    font family (e.g., Times with the appropriate encoding if it is
%    available) without making documents non portable. However, in
%    such a case documents will produce different page breaks at other
%    sites. The substitution defaults can all be changed without
%    losing portability as long as there are font shape definitions
%    for the selected substitutions.
%    \begin{macrocode}
\DeclareFontSubstitution{T1}{cmr}{m}{n}
\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}
%    \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 (i.e., at |\begin{document}| which would delay
%    processing unnecessarily.
%
%    \begin{quote}
%       \textbf{Warning:} Please note that this means that you have to
%       regenerate the format whenever you change any of these
%       \texttt{.fd} files since NFSS2 will not read \texttt{.fd}
%       files if it already knows about the encoding/family
%       combination.
%    \end{quote}
%
%    \begin{macrocode}
\input  T1cmr.fd
\input  OT1cmr.fd
\input  OMLcmm.fd
\input  OMScmsy.fd
\input  OMXcmex.fd
\input  Ucmr.fd
%    \end{macrocode}
%
%    We also load some other font definition files which are normally
%    needed in a document. This is only done for processing speed and
%    you can comment the next two lines out to save some memory. If
%    necessary these files are then loaded when your document is
%    processed. (Loading |.fd| files is a less drastic step compared
%    to preloading fonts because the number of fonts is limited 255 on
%    (nearly) every \TeX{} installation, while the amount of main memory
%    is not a limiting factor on most installations.)
%
%    \begin{macrocode}
\input OT1cmss.fd
\input OT1cmtt.fd
%    \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.
%    You can change the font used but the encoding should be the same
%    as the one specified with |\fontencoding| above.
%
%
%  \subsection{Math setup}  
%
%    We now define the basic symbol fonts used by \LaTeX{}.
%    These four symbol fonts must be defined by this file.
%
%    It is possible to make the symbol fonts point to other external
%    fonts without losing the ability to process  documents written
%    at other sites, as long as one defines the same symbol font names
%    with the same encodings, e.g., |operators| with |OT1| etc.
%    If other encodings are used documents become non-portable.
%    Such a change should therefore be done in a package file.
%
% \changes{v2.1e}{1994/12/15}{Added missing setting for symbols in
%                             bold version}
%    \begin{macrocode}
\DeclareSymbolFont{operators}   {OT1}{cmr} {m}{n}
\DeclareSymbolFont{letters}     {OML}{cmm} {m}{it}
\DeclareSymbolFont{symbols}     {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}

\SetSymbolFont{operators}{bold}{OT1}{cmr} {bx}{n}
\SetSymbolFont{letters}  {bold}{OML}{cmm} {b}{it}
\SetSymbolFont{symbols}  {bold}{OMS}{cmsy}{b}{n}
%    \end{macrocode}
%    
%    Below are the seven math alphabets which are defined by NFSS.
%    Again they must be defined by this file.
%    However, as before you can change the fonts used without losing
%    portability, but you should be careful when changing the encoding
%    since that may make documents come out wrong.
%    \begin{macrocode}
\DeclareSymbolFontAlphabet{\mathrm}    {operators}
\DeclareSymbolFontAlphabet{\mathnormal}{letters}
\DeclareSymbolFontAlphabet{\mathcal}   {symbols}
\DeclareMathAlphabet      {\mathbf}{OT1}{cmr}{bx}{n}
\DeclareMathAlphabet      {\mathsf}{OT1}{cmss}{m}{n}
\DeclareMathAlphabet      {\mathit}{OT1}{cmr}{m}{it}
\DeclareMathAlphabet      {\mathtt}{OT1}{cmtt}{m}{n}
%    \end{macrocode}
%    Given the currently available fonts we cannot bolden |\mathbf|
%    and |\mathtt| but in principle one could use `ultra bold' or
%    something. The alphabets defined via |\DeclareSymbolFontAlphabet|
%    will change automatically in a new math version if the
%    corresponding symbol font changes.
%    \begin{macrocode}
\SetMathAlphabet\mathsf{bold}{OT1}{cmss}{bx}{n}
\SetMathAlphabet\mathit{bold}{OT1}{cmr}{bx}{it}
%    \end{macrocode}
%
%  \begin{macro}{\lgroup}
%  \begin{macro}{\rgroup}
%  \begin{macro}{\bracevert}
%    There are three plain \TeX{} delimiters which are not fully
%    supported by NFSS, since they partly point into a bold cmr font.
%    Allocating a full symbol font, just to have three delimiters
%    seems a but too much given the limited space available.  For this
%    reason only the extensible sizes are supported.  If this is not
%    desired one can use, without losing portability, define |\mathbf|
%    and |\mathtt| as font symbol alphabet (setting up
%    \texttt{cmr/bx/n} and \texttt{cmtt/m/n} as a symbol fonts first)
%    and modify the delimiter declarations to point to with their
%    small variant to those symbol fonts. (This is done in
%    \texttt{oldlfont.dtx} so look there for examples.)
%    \begin{macrocode}
\DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips
     {\mathopen}{largesymbols}{"3A}{largesymbols}{"3A}
\DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips
     {\mathclose}{largesymbols}{"3B}{largesymbols}{"3B}
\DeclareMathDelimiter{\bracevert} % the vertical bar that extends braces
     {\mathord}{largesymbols}{"3E}{largesymbols}{"3E}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
%
% \subsection{Defaults}
%
%    To allow the use of |\rmfamily|, |\sffamily|, etc.\ in documents
%    even if nonstandard families are used we provide nine macros
%    which hold the name of the corresponding families, series, and so
%    on. This makes it easy to use other font families (like Times
%    roman, etc.). One simply has to redefine these defaults.
%
%    All these hooks have to be defined in this file but you can
%    change their meaning (except for |\encodingdefault|) without
%    making documents non-portable.
%
%
% \begin{macro}{\rmdefault}
% \begin{macro}{\sfdefault}
% \begin{macro}{\ttdefault}
%    The following three definitions set up the meaning for
%    |\rmfamily|, |\sffamily|, and |\ttfamily|.
%    \begin{macrocode}
\newcommand\rmdefault{cmr}
\newcommand\sfdefault{cmss}
\newcommand\ttdefault{cmtt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}

% \begin{macro}{\bfdefault}
% \begin{macro}{\mddefault}
%    Series changing commands are influenced by the following hooks.
%    \begin{macrocode}
\newcommand\bfdefault{bx}
\newcommand\mddefault{m}
%    \end{macrocode}
% \end{macro}
% \end{macro}

% \begin{macro}{\itdefault}
% \begin{macro}{\sldefault}
% \begin{macro}{\scdefault}
% \begin{macro}{\updefault}
%    Shape changing commands use the following hooks.
%    \begin{macrocode}
\newcommand\itdefault{it}
\newcommand\sldefault{sl}
\newcommand\scdefault{sc}
\newcommand\updefault{n}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}

% \begin{macro}{\encodingdefault}
% \begin{macro}{\familydefault}
% \begin{macro}{\seriesdefault}
% \begin{macro}{\shapedefault}
%    Finally we have the hooks that describe the behaviour of
%    the|\normalfont| command. To stay portable, the definition of
%    |\encodingdefault| should \emph{not} be changed and should match
%    the setting above for |\fontencoding|. All other values can be
%    set according to your taste.
%    \begin{macrocode}
\newcommand\encodingdefault{OT1}
\newcommand\familydefault{\rmdefault}
\newcommand\seriesdefault{\mddefault}
\newcommand\shapedefault{\updefault}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%    This finishes the low-level setup in \texttt{fontdef.ltx}.
%    \begin{macrocode}
%</main>
%    \end{macrocode}
%
%    
%
%
% \Finale
%
\endinput
