New Font Selection Scheme

Diese Seite existiert momentan nur auf Englisch.

 

>>>>>>>>>>>>>>>>>>>>>>>> BEGIN  DOCUMENT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

[ Thanks to Barbara Beeton, Bobby Bodenheimer, Guoying Chen, Michael Downes, George Greenwade, and Rainer Sch\"opf for their contributions to the document. They enhanced it substantially and did a superb job to make it error-free. The responsibility for any remaining bugs or inaccuracies falls entirely on me.  The information provided was compiled in the end of June 1992 and updated in December 1992.
Rafa{\l} \.Zbikowski ]

The purpose of this document is to answer briefly the following questions in the context of LaTeX:

1. AMSFonts
   a) What are AMSFonts?
   b) Why to use AMSFonts?
   c) Where to get AMSFonts from?
      -- DOCUMENTATION
   d) How to install AMSFonts for LaTeX? ; see also 2. e)

2. New Font Selection Scheme (NFSS) for LaTeX
   a) What is the New Font Selection Scheme (NFSS)?
   b) Why to use NFSS?
   c) Where to get NFSS from?
      -- DOCUMENTATION
      -- AMS-LaTeX
   d) How to install NFSS?

3. How can NFSS and AMSFonts be used in practice?

An attempt is made to answer these questions from user's point of view as opposed to TeXpert's/designer's. Each paragraph is meant to be independent of the rest as far as it is possible. This results in repetitions noticeable for those who read everything.

1. AMSFonts

 

a) What are AMSFonts?


AMS stands for the American Mathematical Society which supported Donald E. Knuth in writing TeX. It adopted TeX as its standard for mathematical publications and has worked ever since on its extensions to meet the demand for variety of symbols and formats mathematicians use. This led to a development of additional set of fonts (absent in distributions of TeX and LaTeX) called AMSFonts.
The most recent version, released in August 1991, is known as AMSFonts 2.1). AMSFonts 2.1 contain over two hundred mathematical symbols (like \leq etc.) and also so-called Euler fonts, i.e. alphabets resembling gothic (e.g. to denote linear subspaces), script letters (like in topology) and so on.
It also has a special alphabet (Blackboard bold) which produces nice R for the real numbers, C for complex numbers etc. Finally, the Russian alphabet (including pre-1917 characters), or cyrillic, is available plus letters needed for Ukrainian, Serbian and Bulgarian.

b) Why use AMSFonts?


AMSFonts are designed to extend the available range of symbols and alphabets for *mathematics*. It offers over two hundred mathematical symbols including special letters for denoting the reals, ``normal'' less-than-equal sign, variety of binary operators, specials such as mathematical `therefore' and `because' etc. It supplies alphabets of gothic, script and Russian letters.
The letters can also be used in text mode provided you install the New Font Selection Scheme (see below).

If none of these is of interest go straight to 2).

c) Where to get AMSFonts from?


The original distributing site for AMSFonts Version 2.1 (released in August 1991) is
   e-math.ams.org            130.44.1.100      /ams

available via ftp.

Users having Unix-compatible compress/uncompress and tar/untar utilities (versions also exist for DOS and VMS) can get the following (binary) files

         637421 Oct 28  1991 amsfonts-sources.tar.Z
          78823 Jul  2  1991 tfm-files.tar.Z
        2447360 Sep 27  1991 amsfonts118.tar
        3235840 Sep 27  1991 amsfonts180.tar
        3788800 Sep 27  1991 amsfonts240.tar
        4915200 Sep 27  1991 amsfonts300.tar
        6512640 Sep 30  1991 amsfonts400.tar

from /ams directory, which covers the whole distribution together with documentation printable with plain TeX. The files amsfonts$$$.tar (where $$$ is 118 or 180 or 240 or 300 or 400) contain .pk files (packed generic font files for AMSFonts) the number $$$ indicating the required printer/previewer resolution in dots per inch (dpi).

Note that amsfonts$$$.tar are *not* compressed using Unix's compress facility.

Users not having the Unix-compatible utilities will have to pull the files from subdirectories

     /ams/amsfonts
     /ams/amsfonts/doc
     /ams/amsfonts/pk-files
     /ams/amsfonts/sources
     /ams/amsfonts/sources/cyrillic
     /ams/amsfonts/sources/euler
     /ams/amsfonts/sources/extracm
     /ams/amsfonts/sources/symbols
     /ams/tfm-files

Subdirectory /ams/amsfonts/pk-files contains .pk files (compressed generic font files for AMSFonts) organized in directories according to the required printer/previewer resolution, i.e.

     /ams/amsfonts/pk-files/118dpi
     /ams/amsfonts/pk-files/180dpi
     /ams/amsfonts/pk-files/240dpi
     /ams/amsfonts/pk-files/300dpi
     /ams/amsfonts/pk-files/400dpi

where dpi is dots per inch.

Files of AMS distribution are rather big, even in the compressed form (as seen from the above listings). It is recommended to pull only the relevant files (especially the .pk ones). For example, files necessary for a 300dpi installation (amsfonts-sources.tar.Z, amsfonts300.tar, tfm-files.tar.Z) occupy ca eight megabytes in uncompressed form.

DOCUMENTATION


Documentation (AMSFonts Version 2.1 User's Guide) can be found in amsfonts/doc under the name
     userdoc.tex
To compile it you need to have the following files
     amssym.def
     amssym.tex
     cyracc.def
     userdoc.cyr
     userdoc.def
     userdoc.ins
     userdoc.fnt
and also .tfm (from tfm-files.tar.Z) and .pk files (from amsfonts300.tar or whatever resolution appropriate).  The subdirectory amsfonts/doc contains by default all userdoc.* files but you can find the first three (i.e. amssym.def, amssym.tex, cyracc.def) in the directory amsfonts. Once all files are gathered type
     prompt> tex userdoc
This should compile smoothly and produce userdoc.dvi (41 pages). Provided you put AMSFonts .pk files in the place where your previewer/printer looks for it you should be able to see/print it.

Read userdoc or at least have a glance at the provided font tables to get an idea what you can expect from it.

d) How to install AMSFonts for LaTeX?


It is assumed here that you already have all the files of AMSFonts Version 2.1 (released in August 1991). If you are not sure read point c) Where to get AMSFonts from? above. Also, you should have a copy of AMSFonts v. 2.1 User's Guide printed out. If you don't, see section DOCUMENTATION of c) Where to get AMSFonts from? above.

The User's Guide says almost nothing about installation of AMSFonts for LaTeX (see the bottom of page 11), but you should have a copy of it for reference. It gives the command names of additional math symbols, among others.

To use AMSFonts Version 2.1 smoothly under LaTeX you need to get and install the New Font Selection Scheme (NFSS). This is described in point 2) New Font Selection Scheme (NFSS). The section relevant to the installation of AMSFonts for LaTeX is 2.e) How to use NFSS to install AMSFonts for LaTeX?

2. New Font Selection Scheme (NFSS) for LaTeX

 

a) What is the New Font Selection Scheme (NFSS)?


The New Font Selection Scheme (NFSS) is a new version of lfonts.tex file written by LaTeXperts Frank Mittelbach and Rainer Sch\"opf. When an old lfonts.tex is replaced by the new one and you recompile your LaTeX with the *new* lfonts.tex, you have at your disposal all the commands and properties of NFSS. These allow you loading any nonstandard (and standard, i.e. these coming with a distribution of TeX and LaTeX) LaTeX fonts on demand (i.e.  when you really want them without memory-consuming preloading) *both* in text *and* math mode. It is much better than the standard LaTeX solution (see p. 116 and p. 200 of Leslie Lamport's ``LaTeX User's Guide'', Addison-Wesley, Reading, Mass., 1985, ISBN 0-201-15790-X).

Thus, the name NFSS means a set of rules of loading fonts that are available to a user who replaced his/her old lfonts.tex LaTeX file with the new one coming with the distribution of NFSS.

Also, NFSS has a backward compatibility option. In actual fact lfonts.new consists of NFSS + LaTeX adaptions. NFSS is by no means restricted to LaTeX; it works equally well with plain TeX, but needs another set of interface macros. This will not be addressed here, since this document deals with LaTeX exclusively.

b) Why to use NFSS?


NFSS is a serious enhancement of LaTeX offering a swift, simple and uniform method for using nonstandard (and standard, i.e. these coming with a distribution of TeX and LaTeX) LaTeX fonts. It is the *only* practicable method of using AMSFonts and PostScript fonts with LaTeX. When installed it also allows you to use the old font selection scheme. This means that there is an option to make LaTeX behave as it had done before the installation of NFSS took place, ensuring backward compatibility.

If none of these is of interest for you stop reading this text.

c) Where to get NFSS from?


The original distributing site for the New Font Selection Scheme (NFSS) is (note that the node has two *equivalent* names)

        ftp.uni-stuttgart.de            129.69.1.12
        rusmv1.rus.uni-stuttgart.de     129.69.1.12

directory:

        /pub/soft/tex/macros/latex/styles/base/nfss

available via ftp. Communication with this machine may be not too fast, so be patient.

Directory /pub/soft/tex/macros/latex/styles/base/nfss contains the following (ASCII text) files

                12718  array.sty
                 4027  basefont.tex
                11888  concrete.doc
                10760  dclfont.sty
                 8951  euscript.doc
                 8172  exscale.doc
                22563  fontdef.dc
                27992  fontdef.max
                15338  fontdef.ori
                 6405  install.mz3
                36907  lfonts.new
                 2837  margid.sty
                 4831  newlfont.sty
                       nfss-addons     SUBDIRECTORY
                12881  nfss.bug
                40893  nfss.tex
                10224  nfssinst.tex
                 9442  nfssprob.tex
                 2869  nomargid.sty
                 4989  oldlfont.sty
                 4692  preload.dc
                 4570  preload.min
                 4646  preload.ori
                 4125  preload.xpt
                       psnfss          SUBDIRECTORY
                 5381  readme.mz
                 3993  readme.mz3
                 5550  scripts.doc
                 4399  syntonly.sty
                 6650  tracefnt.sty

The file to replace lfonts.tex is lfonts.new which loads fontdef.tex and one of preload.*. (To install LaTeX, IniTeX should be run. When IniTeX is run with lplain.tex as the input file a point is reached when TeX wants to read in lfonts.tex. Here lfonts.new should be specified instead.  At some point in processing lfonts.new IniTeX will ask for xxxlfont.sty, which does not exist. The appearance of the name xxxlfont.sty in the source of lfonts.new is a convenient stop to allow to choose one of the three options: oldlfont.sty, newlfont.sty, basefont.tex. For details see nfssinst.tex below -- Documentation of NFSS).


DOCUMENTATION


Documentation of the New Font Selection Scheme (NFSS) is composed of three parts:

  • nfss.tex   a copy of the original article (published in TUGboat),with extensions, by Mittelbach and Sch\"opf;
  • nfssinst.tex   installation guide;
  • nfssprob.tex   possible problems (and fixes) that may occur during installation.


These are ordinary LaTeX files requiring, however, LaTeX version not older than Dec. 91 release. (The most recent LaTeX version, <25 March 1992>, is available from archive in Stuttgart, 129.69.1.12, from directory /pub/soft/tex/macro/latex; also archive Niord.SHSU.edu offers it via ftp -- read [.LATEX]0000README.FTP_USERS -- or by e-mail:  send a message to FILESERV@SHSU.edu with the body SENDME LaTeX).

File nfss.tex uses array.sty (provided with the NFSS distribution) and twocolum.sty (provided with recent LaTeX distributions; note the spelling of the name of the file: without `n'). You should be able to print the documentation out (see below), but read readme.mz3 first.

To compile nfss.tex many varieties of Computer Modern Sans Serif font are required, so it is advisable to have the appropriate .tfm and .pk files ready before typing
      prompt> latex nfss
It will report errors unless a recent version of LaTeX is used or when Sans Serif fonts are missing. The first type of error is fatal; the second can be overcome by pressing <return> enough number of times. However, the output will be poor and may lead to misinformation (slanted etc. shapes are used in important examples). If the compilation was error-free, the file can be previewed/printed. Then type  prompt> latex nfssinst
           .
           .
      prompt> latex nfssprob

These should compile smoothly, since the files use Computer Modern Roman only.

Installation is described in detail in nfssinst.tex and in case of problems consult nfssprob.tex.

AMS-LaTeX


It is not essential, but helpful (especially in future use) to get a copy of AMSLaTeX manual, whose Part II (pages 4--17) describes in detail the usage and principles of NFSS. It also gives valuable clues about using AMSFonts via NFSS. To get this ftp to

     e-math.ams.org               130.44.1.100

Users having Unix-compatible compress/uncompress and tar/untar utilities (versions also exist for DOS and VMS) can get the (binary) file

     588389 amslatex.tar.Z

from directory /ams. Users not having the Unix-compatible utilities can pull files from directory

     /ams/amslatex

and its subdirectories

     /ams/amslatex/doc
     /ams/amslatex/fontsel
     /ams/amslatex/inputs
     /ams/amslatex/latex

These will give the *whole* distribution of AMS-LaTeX, which is not needed to print out the AMSLaTeX manual. To get it go to subdirectory /ams/amslatex/doc to find file

     amslatex.tex

This document can be processed using *ordinary* LaTeX. To generate it type
     prompt> latex amslatex
in directory /ams/amslatex/doc. Everything should go smoothly resulting in amslatex.dvi files (69 page long).

AMSLaTeX has by *default* NFSS (see files in /ams/amslatex/fontsel), so you may want to install AMSLaTeX altogether and use it for the purposes of NFSS. If you don't, retain the following .sty files (for use under ordinary LaTeX)

     amsbsy.sty
     amsfonts.sty
     amssymb.sty

which can be found in /ams/amslatex/inputs and are very handy for swift use of AMSFonts for LaTeX.

d) How to install NFSS?


The best answer to this question is contained in file nfssinst.tex which comes with the distribution of NFSS (see above: point c) Where to get NFSS from? section: DOCUMENTATION).

3. How can NFSS and AMSFonts be used in practice?


Here two examples are provided in the form of two separate LaTeX documents. To compile them NFSS *must* be installed together with AMSFonts. And the fontdef option chosen when installing NFSS should be fontdef.max.

>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN  Example 1

% FILE: example_1.tex
%
% SYNOPSIS:
% This is Example 1 of the usage of the New Font Selection Scheme
% (NFSS) together with the American Mathematical Society Fonts
% (AMSFonts). It is a LaTeX file and no alterations/additions are
% needed to compile it.  However, both NFSS (with the fontdef.max
% option) and AMSFonts must be installed. Also the following files
% (coming with AMSFonts and/or AMS-LaTeX) should be available
%       amssymb.sty
%       amsfonts.sty
%       amsbsy.sty
%       amstext.sty
%       cyracc.def
%
%%% This example shows how to define fonts for use in *math mode*.
%
% The fonts used are the ones provided by AMSFonts, namely
%   Euler fraktur
%     (AMSFonts files: eufm5,eufm6,eufm7,eufm8,eufm9,eufm10)
%   Euler fraktur bold
%     (AMSFonts files: eufb5,eufb6,eufb7,eufb8,eufb9,eufb10)
%   Euler roman
%     (AMSFonts files: eurm5,eurm6,eurm7,eurm8,eurm9,eurm10)
%   Euler roman bold
%     (AMSFonts files: eurb5,eurb6,eurb7,eurb8,eurbr,eurb10)
%   Euler script
%     (AMSFonts files: eusm5,eusm6,eusm7,eusm8,eusm9,eusm10)
%   Euler script bold
%     (AMSFonts files: eusb5,eusb6,eusb7,eusb8,eusb9,eusb10)
%   University of Washington Cyrillic
%     (AMSFonts files: wncyr5,wncyr6,wncyr7,wncyr8,wncyr9,wncyr10)
%   University of Washington Cyrillic bold
%     (AMSFonts files: wncyb5,wncyb6,wncyb7,wncyb8,wncyb9,wncyb10)
%   Blackboard Bold
%     (AMSFonts files: msbm5,msbm6,msbm7,msbm8,msbm9,msbm10)
% Compare also Table 5, p. 14 of ``AMS-LaTeX Version 1.1 User's
% Guide'', American Mathematical Society, August 1991.

\documentstyle[11pt,newlfont,amssymb,amsbsy]{article}
                % amssymb.sty loads amsfonts.sty
                % amsbsy.sty loads amstext.sty

                % Also [newlfont,amssymb,amsbsy]
                % and  [12pt,newlfont,amssymb,amsbsy]
                % will work smoothly with the definitions below

   \input{cyracc.def} % This file is needed for cyrillic fonts

   % The following commands should produce proper results.
   % To understand how to type Russian when using cyracc.def see
   % the AMSFonts user's guide (section `Cyrillic input', pp. 15--16).

   \newmathalphabet{\eufm}                      % Euler
   \addtoversion{normal}{\eufm}{euf}{m}{n}      %       fraktur
   \addtoversion{bold}{\eufm}{euf}{b}{n}        %       fraktur bold
                % Define command \eufm as Euler fraktur font
                % to be used in math mode. It is already defined
                % in amsfonts.sty as \frak.

   \newmathalphabet{\eurm}                      % Euler
   \addtoversion{normal}{\eurm}{eur}{m}{n}      %       roman
   \addtoversion{bold}{\eurm}{eur}{b}{n}        %       roman bold
                % Define command \eurm as Euler roman font
                % to be used in math mode.

   \newmathalphabet{\eusm}                      % Euler
   \addtoversion{normal}{\eusm}{eus}{m}{n}      %       script
   \addtoversion{bold}{\eusm}{eus}{b}{n}        %       script bold
                % Define command \eusm as Euler script font
                % to be used in math mode.

   \newmathalphabet{\cyr}                       % Univ. of Washington
   \addtoversion{normal}{\cyr}{UWCyr}{m}{n}     %       cyrillic
   \addtoversion{bold}{\cyr}{UWCyr}{b}{n}       %       cyrillic bold
                % Define command \cyr as University of Washington
                % Cyrillic to be used in math mode.

   % ====================================================================

   % To get bold in math use command \boldsymbol{} provided
   % by amsbsy.sty file. See examples in text.

\title{Examples of Application of NFSS to Define and Use AMSFonts
in Math Mode}
\author{\bf Rafa\l\ \.Zbikowski}
\date{June, 1992}
\begin{document}

\maketitle

\section{Introduction}

This brief document shows four examples of defining fonts for use in math mode using the New Font Selection Scheme (NFSS).
The fonts employed are those provided with the American Mathematical Society (AMS) package AMSFonts Version 2.1. These are
\begin{itemize}
  \item Euler fraktur,
  \item Euler roman,
  \item Euler script,
  \item University of Washington cyrillic,
\end{itemize}
and also Blackboard bold. It is shown here how to use all the fonts both in normal and bold versions (except for Blackboard bold, which doesn't have a bold version).

The following commands are defined
\begin{itemize}
   \item \verb+\eufm+ for Euler fraktur medium (as opposed to bold),
   \item \verb+\eurm+ for Euler roman medium,
   \item \verb+\eusm+ for Euler script medium,
   \item \verb+\cyr + for University of Washington cyrillic medium.
\end{itemize}
There is also a predefined one \verb+\Bbb+ (see {\bf Example 4}). Their effective definitions are shown at the end of this document.  To make use of the above-mentioned fonts the following style files should be loaded {\tt amsbsy.sty, amstext.sty, cyracc.def}. This document also makes use of {\tt amssymb.sty} and {\tt amsfonts.sty} to take a full advantage of extended math symbols set provided by AMSFonts 2.1.  The use of an extra symbol is marked by \checkmark , itself a (nonmathematical) symbol from AMSFonts 2.1.

\section{Examples}

This section shows four simple examples of usage of the commands in math mode.

{\bf Example 1}\newline
[ Here Euler script is used for the capital O, through a \verb+\eusm+
command and the symbol of the empty set \verb+\varnothing+ is used
from the extra math symbols B font. ]

{\sc Definition} Let $ X $ be a non-empty set. Then the pair
$ (X,\eusm{O}) $ is called a {\em topological space\/} iff
\begin{enumerate}
   \item $ X $ is open,
   \item $ \varnothing $ \checkmark is open,
   \item $ \eusm{O} $ is an open family of subsets
          of $ X $, i.e.
         \begin{enumerate}
            \item $ \forall \eusm{O}_i \in \eusm{O} $ the intersection
                  of a finite number of members of $ \eusm{O} $, i.e.
                  $ \bigcap_{i=1}^n \eusm{O}_i $, is open,
            \item $ \forall \eusm{O}_i \in \eusm{O} $ the union (finite or
                  infinite) of members of $ \eusm{O} $, i.e.
                  $ \bigcup_{i=1}^{\infty} \eusm{O}_i $, is open.
         \end{enumerate}
\end{enumerate}
The family $ \eusm{O} $ is called a {\em topology on\/} $ X $. $ \Box $

{\bf Example 2}\newline
[ Here Euler fraktur \verb+\eufm+ is used for the capital A, Euler
roman \verb+\eurm+ for the capital J; the symbol of (non-strict)
precedence \verb+\preccurlyeq+ comes from the extra math symbols A
font. ]

{\sc Proposition} Let $ (A,\preccurlyeq) $ \checkmark be
a well-ordered set. Then the family $ \eufm{A} $ of all
initial segments of $ A $, i.e. $ \eufm{A} = \{ \eurm{J}\subset A | \;
\forall x,y \in A \; ((y \in \eurm{J}) \wedge (x \preccurlyeq y))
\Rightarrow (x \in \eurm{J}) \}$, together with the relation
$ \subseteq $ is also a well-ordered set. $ \Box $

{\bf Example 3}\newline
[ Here University of Washington cyrillic \verb+\cyr+ is used (for the
Russian `Sh' letter) and the solid Halmos' symbol \verb+\blacksquare+
comes from the extra math symbols A font. ]

{\sc Notation} We shall denote by $ \cyr{Sh} $ the Shafarevich group
and we shall use $ \cyr{sh}_1,\ldots,\cyr{sh}_n $ for its subgroups.
$ \blacksquare $ \checkmark

{\bf Example 4}\newline
[ Here the use of bold mode of Euler roman \verb+\eurm+ is shown
via \verb+\boldsymbol+ command. Also Blackboard bold font \verb+\Bbb+,
defined in {\tt amsfonts.sty}, is used to denote the set of
real numbers. Finally, two extra symbols are displayed
\verb+\blacktriangleright+ and \verb+\bigstar+, both from
the extra math symbols A font. ]

$ \blacktriangleright $ \checkmark {\sc Exercise} Let
$ \boldsymbol{\eurm{f(x,y) = 0}} $ be given with
$ \boldsymbol{\eurm{x}} \in \Bbb{R}^n $ and $ \boldsymbol{\eurm{y}} \in
\Bbb{R}^m $.  State a sufficient condition for the existence of $
\boldsymbol{\eurm{g}}\colon \Bbb{R}^n \rightarrow \Bbb{R}^m $, such
that $ \boldsymbol{\eurm{y = g(x)}}$ (The Implicit Function Theorem).
$ \bigstar $ \checkmark

\section{Commands' Definitions}

The command \verb+\Bbb+ is defined in the file {\tt amsfonts.sty.sty}.
Also a counterpart of \verb+\eufm+ is predefined in {\tt amsfonts.sty} as \verb+\frak+.

The verbatim definitions used in this document look as follows
\begin{verbatim}
\newmathalphabet{\eufm}                  % Euler
\addtoversion{normal}{\eufm}{euf}{m}{n}  %       fraktur
\addtoversion{bold}{\eufm}{euf}{b}{n}    %       fraktur bold
             % Define command \eufm as Euler fraktur font
             % to be used in math mode. It is already defined
             % in amsfonts.sty as \frak.

\newmathalphabet{\eurm}                  % Euler
\addtoversion{normal}{\eurm}{eur}{m}{n}  %       roman
\addtoversion{bold}{\eurm}{eur}{b}{n}    %       roman bold
             % Define command \eurm as Euler roman font
             % to be used in math mode.

\newmathalphabet{\eusm}                  % Euler
\addtoversion{normal}{\eusm}{eus}{m}{n}  %       script
\addtoversion{bold}{\eusm}{eus}{b}{n}    %       script bold
             % Define command \eusm as Euler script font
             % to be used in math mode.

\newmathalphabet{\cyr}                   % Univ. of Washington
\addtoversion{normal}{\cyr}{UWCyr}{m}{n} %       cyrillic
\addtoversion{bold}{\cyr}{UWCyr}{b}{n}   %       cyrillic bold
             % Define command \cyr as University of Washington
             % Cyrillic to be used in math mode.
\end{verbatim}

\end{document}

>>>>>>>>>>>>>>>>>>>>>>>>> END Example 1


>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN Example 2


% FILE: example_2.tex
%
% SYNOPSIS:
% This is Example 2 of the usage of the New Font Selection Scheme
% (NFSS) together with the American Mathematical Society Fonts
% (AMSFonts). It is a LaTeX file and no alterations/additions are
% needed to compile it.  However, both NFSS (with the fontdef.max
% option) and AMSFonts must be installed. Also the following file
% (coming with AMSFonts or AMS-LaTeX) should be available
%        cyracc.def
%
%%% This example shows how to define fonts for use in *text mode*.
%
% The fonts used are the ones provided by AMSFonts, namely
%   Euler fraktur
%     (AMSFonts files: eufm5,eufm6,eufm7,eufm8,eufm9,eufm10)
%   Euler fraktur bold
%     (AMSFonts files: eufb5,eufb6,eufb7,eufb8,eufb9,eufb10)
%   Euler roman
%     (AMSFonts files: eurm5,eurm6,eurm7,eurm8,eurm9,eurm10)
%   Euler roman bold
%     (AMSFonts files: eurb5,eurb6,eurb7,eurb8,eurbr,eurb10)
%   Euler script
%     (AMSFonts files: eusm5,eusm6,eusm7,eusm8,eusm9,eusm10)
%   Euler script bold
%     (AMSFonts files: eusb5,eusb6,eusb7,eusb8,eusb9,eusb10)
%   Blackboard Bold
%     (AMSFonts files: msbm5,msbm6,msbm7,msbm8,msbm9,msbm10)
%   University of Washington Cyrillic
%     (AMSFonts files: wncyr5,wncyr6,wncyr7,wncyr8,wncyr9,wncyr10)
%   University of Washington Cyrillic bold
%     (AMSFonts files: wncyb5,wncyb6,wncyb7,wncyb8,wncyb9,wncyb10)
% Compare also Table 5, p. 14 of ``AMS-LaTeX Version 1.1 User's
% Guide'', American Mathematical Society, August 1991.
%
% NOTE:
% AMSFonts (except for University of Washington Cyrillic) are *not*
% intended for use in text mode, do not have punctuation, numbers,
% ligatures etc. and will not, in general, produce nice output. The
% reason why this file attempts to use them is a desire to demonstrate
% how NFSS handles loading fonts for text mode. It also shows
% (together with example_1.tex) that fonts can be loaded
% independently for both modes. Also any other font with files
% conforming to TeX standard (.tfm, .pk etc.) can be loaded
% using the same techniques.

\documentstyle[11pt,newlfont]{article}

                % Also [newlfont]
                % and  [12pt,newlfont]
                % will work smoothly with the definitions below

   \input{cyracc.def} % This file is needed for cyrillic fonts

   % The following commands (with the exception of Cyrillic fonts)
   % can produce imperfect output due to the lack of punctuation,
   % numbers, ligatures etc. in the source files defining them.


   \newcommand{\teufm}{\fontfamily{euf}%
        \fontseries{m}\fontshape{n}\selectfont}
                % Define command \teufm as Euler fraktur font
                % to be used in text mode.

   \newcommand{\teufb}{\fontfamily{euf}%
        \fontseries{b}\fontshape{n}\selectfont}
                % Define command \teufb as bold Euler fraktur font
                % to be used in text mode. This can also be achieved
                % by typing in text \bf\teufm.

   \newcommand{\teurm}{\fontfamily{eur}%
        \fontseries{m}\fontshape{n}\selectfont}
                % Define command \teurm as Euler roman font
                % to be used in text mode.

   \newcommand{\teurb}{\fontfamily{eur}%
        \fontseries{b}\fontshape{n}\selectfont}
                % Define command \teurb as bold Euler roman font
                % to be used in text mode. This can also be achieved
                % by typing in text \bf\teurm.

   \newcommand{\teusm}{\fontfamily{eus}%
        \fontseries{m}\fontshape{n}\selectfont}
                % Define command \teusm as Euler script font
                % to be used in text mode.

   \newcommand{\teusb}{\fontfamily{eus}%
        \fontseries{b}\fontshape{n}\selectfont}
                % Define command \teusb as bold Euler script font
                % to be used in text mode. This can also be achieved
                % by typing in text \bf\teusm.

   \newcommand{\tBbb}{\fontfamily{msb}%
        \fontseries{m}\fontshape{n}\selectfont}
                % Define command \tBbb as Blackboard bold
                % to be used in text mode. Math mode is defined
                % by file amssymb.sty.

   % The following commands should produce proper results.
   % To understand how to type Russian when using cyracc.def see
   % the AMSFonts user's guide (section `Cyrillic input', pp. 15--16).

   % For explanation of \cyracc option see text.

   \newcommand{\cyr}{\fontfamily{UWCyr}\selectfont\cyracc}
                % Define font family only. Fontshape must
                % be switched using \it or \sc commands.

   \newcommand{\tcyrm}{\fontfamily{UWCyr}%
        \fontseries{m}\fontshape{n}\selectfont\cyracc}
                % Define command \tcyrm as University of Washington
                % cyrillic to be used in text mode.
                % This can also be achieved by typing \cyr.

   \newcommand{\tcyrb}{\fontfamily{UWCyr}%
        \fontseries{b}\fontshape{n}\selectfont\cyracc}
                % Define command \tcyrb as bold University of
                % Washington cyrillic to be used in text mode.
                % This can also be achieved by typing \bf\cyr,
                % provided \bfdefault is changed (see ``AMS-LaTeX
                % Version 1.1 User's Guide'', Section 5.6,
                % pp. 7--8 and Table 5, p. 14. AMSFonts give
                % only wncyb (`b' for `bold') and *not* wncybx
                % (`bx' for bold extended').

   \newcommand{\tcyrit}{\fontfamily{UWCyr}%
        \fontseries{m}\fontshape{it}\selectfont\cyracc}
                % Define command \tcyrit as italic University of
                % Washington Cyrillic to be used in text mode.
                % This can also be achieved by typing \it\cyr.

   \newcommand{\tcyrsc}{\fontfamily{UWCyr}%
        \fontseries{m}\fontshape{sc}\selectfont\cyracc}
                % Define command \tcyrsc as small caps University of
                % Washington Cyrillic to be used in text mode.
                % This can also be achieved by typing \sc\cyr.


\title{Examples of Application of NFSS to Text Mode}
\author{\bf Rafa\l\ \.Zbikowski}
\date{June, 1992}
\begin{document}

\maketitle

\section{Introduction}
\label{sec:Introduction}

This document shows examples of defining fonts for use in text mode using the New Font Selection Scheme (NFSS).
The fonts employed are those provided with the American Mathematical Society (AMS) package AMSFonts Version 2.1. These are
\begin{itemize}
  \item Euler fraktur,
  \item Euler roman,
  \item Euler script,
  \item Blackboard bold,
  \item University of Washington cyrillic,
\end{itemize}
It is shown here how to use all (but Blackboard bold) the fonts both in normal and bold versions.

The following commands are defined for Euler fonts
\begin{itemize}
   \item \verb+\teufm+ for Euler fraktur normal,
   \item \verb+\teufb+ for Euler fraktur bold,
   \item \verb+\teurm+ for Euler roman normal,
   \item \verb+\teurb+ for Euler roman bold,
   \item \verb+\teusm+ for Euler script normal,
   \item \verb+\teusb+ for Euler script bold,
\end{itemize}
and also \verb+\tBbb + for Blackboard bold. Also a set of commands
is introduced for University of Washington cyrillic
\begin{itemize}
   \item \verb+\tcyrm + for Univ.~of Washington cyrillic normal,
   \item \verb+\tcyrb + for Univ.~of Washington cyrillic bold,
   \item \verb+\tcyrit+ for Univ.~of Washington cyrillic italic,
   \item \verb+\tcyrsc+ for Univ.~of Washington cyrillic small caps.
\end{itemize}
Their effective definitions are shown at the end of this document.
To make use of the cyrillic fonts the file {\tt cyracc.def} is
needed.

\section{Examples of Euler Fonts and Blackboard Bold}

This section shows simple examples of usage of Euler fonts and Blackboard bold in text mode.

The string `JOHN SMITH is my name.' (with a dot at the end) will be generated using the relevant commands from Section
\ref{sec:Introduction}.
\begin{enumerate}
   \item Euler fraktur normal; command \verb+\teufm+\\
        {\teufm JOHN SMITH is my name.}
   \item Euler fraktur bold; command \verb+\teufb+\\
        {\teufb JOHN SMITH is my name.}
   \item Euler roman normal; command \verb+\teurm+\\
        {\teurm JOHN SMITH is my name.}
   \item Euler roman bold; command \verb+\teurb+\\
        {\teurb JOHN SMITH is my name.}
   \item Euler script normal; command \verb+\teusm+\\
        {\teusm JOHN SMITH is my name.}
   \item Euler script bold; command \verb+\teusb+\\
        {\teusb JOHN SMITH is my name.}
   \item Blackboard bold; command \verb+\tBbb+\\
        {\tBbb JOHN SMITH is my name.}
\end{enumerate}
The reason for this strange output will become clear after looking at the font tables provided by {\em User's Guide to AMSFonts Version 2.1\/} on pp.~35--37.

\section{Examples of University of Washington (UW) Cyrillic}

This section shows simple examples of usage of University of Washington cyrillic fonts in text mode.

The string `Mikhail Gorbach\"ev.' (with a dot at the end) will be generated using the relevant commands from Section
\ref{sec:Introduction}.
\begin{enumerate}
   \item UW cyrillic normal; command \verb+\tcyrm+\\
        {\tcyrm Mikhail Gorbach\"ev.}
        % Alternatively
        % {\cyr Mikhail Gorbach\"ev.}
   \item UW cyrillic bold; command \verb+\tcyrb+\\
        {\tcyrb Mikhail Gorbach\"ev.}
        % Alternatively
        % \renewcommand{\bfdefault}{b}
        % {\bf\cyr Mikhail Gorbach\"ev.}
   \item UW cyrillic italic; command \verb+\tcyrit+\\
        {\tcyrit Mikhail Gorbach\"ev.}
        % Alternatively
        % {\it\cyr Mikhail Gorbach\"ev.}
   \item UW cyrillic small caps; command \verb+\tcyrsc+\\
        {\tcyrsc Mikhail Gorbach\cyracc\"ev.}
        % Alternatively
        % {\sc\cyr Mikhail Gorbach\"ev.}
\end{enumerate}

To obtain the special cyrillic characters {\tcyrm \cyracc\"e, \=e, \=\i, \"\i, \u i, \'c, \'k, \u u, \dzh, \cdprime, \cprime, \dz} the command \verb+\cyracc+, defined in {\tt cyracc.def} is needed (see {\em User's Guide to AMSFonts Version 2.1\/} pp.~14--16). The best strategy is to include \verb+\cyracc+ in the definitions of the cyrillic font commands, as shown below in the definitions of \verb+ \cyr+, \verb+ \tcyrm+, \verb+ \tcyrb+, \verb+ \tcyrit+, and \verb+ \tcyrsb+.

\section{Commands' Definitions}

The commands involving University of Washington cyrillic rely heavily on the file {\tt cyracc.def}. Note that \verb+\cyracc+ command was added at the end of each definition to allow smooth use of the accented characters of the cyrillic font. The addition is relevant to this AMS font {\em only\/} and is not necessary for any others.  This means that in any other case a definition should terminate with \verb+\selectfont+.

\begin{verbatim}
% The following commands
% (with the exception of Cyrillic fonts)
% can produce imperfect output due to
% the lack of punctuation, numbers,
% ligatures etc. in the source files
% defining them.


             %%% Euler fonts in text mode. %%%

\newcommand{\teufm}{\fontfamily{euf}%
   \fontseries{m}\fontshape{n}\selectfont}
             % Define command \teufm as Euler fraktur
             % font to be used in text mode.

\newcommand{\teufb}{\fontfamily{euf}%
   \fontseries{b}\fontshape{n}\selectfont}
             % Define command \teufb as bold Euler
             % fraktur font to be used in text mode.
             % This can also be achieved by
             % typing \bf\teufm.

\newcommand{\teurm}{\fontfamily{eur}%
   \fontseries{m}\fontshape{n}\selectfont}
             % Define command \teurm as Euler roman
             % font to be used in text mode.

\newcommand{\teurb}{\fontfamily{eur}%
   \fontseries{b}\fontshape{n}\selectfont}
             % Define command \teurb as bold Euler
             % roman font to be used in text mode.
             % This can also be achieved by
             % typing \bf\teurm.

\newcommand{\teusm}{\fontfamily{eus}%
   \fontseries{m}\fontshape{n}\selectfont}
             % Define command \teusm as Euler script
             % font to be used in text mode.

\newcommand{\teusb}{\fontfamily{eus}%
   \fontseries{b}\fontshape{n}\selectfont}
             % Define command \teusb as bold Euler
             % script font to be used in text mode.
             % This can also be achieved by
             % typing \bf\teusm.

\newcommand{\tBbb}{\fontfamily{msb}%
   \fontseries{m}\fontshape{n}\selectfont}
             % Define command \tBbb as Blackboard bold
             % to be used in text mode. Math mode is
             % defined in file amssymb.sty.


             %%% Cyrillic in text mode. %%%

\input{cyracc.def} % This file is needed
                   % for cyrillic fonts.

\newcommand{\cyr}{\fontfamily{UWCyr}\selectfont\cyracc}
             % Define font family only. Fontshape must
             % be switched using \it or \sc commands.

\newcommand{\tcyrm}{\fontfamily{UWCyr}%
     \fontseries{m}\fontshape{n}\selectfont\cyracc}
             % Define command \tcyr as Univ. of Washington
             % cyrillic to be used in text mode.
             % This can also be achieved by typing \cyr.

\newcommand{\tcyrb}{\fontfamily{UWCyr}%
     \fontseries{b}\fontshape{n}\selectfont\cyracc}
             % Define command \tcyrb as bold University of
             % Washington cyrillic to be used in text mode.
             % This can also be achieved by typing \bf\cyr,
             % provided \bfdefault is changed (see ``AMS-LaTeX
             % Version 1.1 User's Guide'', Section 5.6,
             % pp. 7--8 and Table 5, p. 14. AMSFonts give
             % only wncyb (`b' for `bold') and *not* wncybx
             % (`bx' for `bold extended').

\newcommand{\tcyrit}{\fontfamily{UWCyr}%
     \fontseries{m}\fontshape{it}\selectfont\cyracc}
             % Define command \tcyrit as italic Univ. of
             % Washington Cyrillic to be used in text mode.
             % This can also be achieved by typing \it\cyr.

\newcommand{\tcyrsc}{\fontfamily{UWCyr}%
     \fontseries{m}\fontshape{sc}\selectfont\cyracc}
             % Define command \tcyrsc as small caps Univ. of
             % Washington Cyrillic to be used in text mode.
             % This can also be achieved by typing \sc\cyr.

\end{verbatim}

Older versions of some documentation (e.g.~{\em AMS-\LaTeX{} User's Guide} describe \verb+\family+ instead of \verb+\fontfamily+, \verb+\series+ for \verb+\fontseries+ etc., but a recent recommendation from Rainer Sch\"opf is to add `font' everywhere.  The motivation is that \verb+\series+ is handy for mathematical series (sequences of partial sums).

\end{document}

>>>>>>>>>>>>>>>>>>>>>>>>> END Example 2

>>>>>>>>>>>>>>>>>>>>>>>>> END  OF  DOCUMENT<<<<<<<<<<<<<<<<<<<<<<<<<<

Haben Sie noch weiterführende Fragen, so senden Sie bitte eine Email an latex-service.


Loading...