Initial revision. 1.2.0
authormdw <mdw>
Tue, 19 Feb 2002 22:54:14 +0000 (22:54 +0000)
committermdw <mdw>
Tue, 19 Feb 2002 22:54:14 +0000 (22:54 +0000)
.cvsignore [new file with mode: 0644]
.links [new file with mode: 0644]
.skelrc [new file with mode: 0644]
Makefile.m4 [new file with mode: 0644]
README [new file with mode: 0644]
configure.in [new file with mode: 0644]
mdwfonts.dtx [new file with mode: 0644]
mdwfonts.ins [new file with mode: 0644]
mdwfonts.tex [new file with mode: 0644]
setup [new file with mode: 0755]

diff --git a/.cvsignore b/.cvsignore
new file mode 100644 (file)
index 0000000..f5d6057
--- /dev/null
@@ -0,0 +1,29 @@
+*.ans
+*.aux
+*.def
+*.dvi
+*.fd
+*.idx
+*.ilg
+*.ind
+*.log
+*.lot
+*.sty
+*.thm
+*.tmp
+*.toc
+*.pl
+*.vpl
+*.tfm
+*.vf
+*.etx
+*.mtx
+Makefile
+Makefile.am
+Makefile.in
+aclocal.m4
+config.cache
+config.status
+configure
+mdwfonts.map
+*.tar.gz
diff --git a/.links b/.links
new file mode 100644 (file)
index 0000000..b091697
--- /dev/null
+++ b/.links
@@ -0,0 +1,5 @@
+missing
+mkinstalldirs
+install-sh
+COPYING
+gpl.tex
diff --git a/.skelrc b/.skelrc
new file mode 100644 (file)
index 0000000..43184f2
--- /dev/null
+++ b/.skelrc
@@ -0,0 +1,9 @@
+;;; -*-emacs-lisp-*-
+
+(setq skel-alist
+      (append
+       '((author . "Mark Wooding")
+        (full-title . "the mdwfonts font configuration system")
+        (Program . "mdwfonts")
+        (program . "mdwfonts"))
+       skel-alist))
diff --git a/Makefile.m4 b/Makefile.m4
new file mode 100644 (file)
index 0000000..0d7414a
--- /dev/null
@@ -0,0 +1,108 @@
+## -*-makefile-*-
+##
+## $Id: Makefile.m4,v 1.1 2002/02/19 22:54:13 mdw Exp $
+##
+## Build system for mdwfonts
+##
+## (c) 2002 Mark Wooding
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of the mdwfonts font configuration system.
+##
+## mdwfonts is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+## 
+## mdwfonts 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.  See the
+## GNU General Public License for more details.
+## 
+## You should have received a copy of the GNU General Public License
+## along with mdwfonts; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+##----- Revision history ----------------------------------------------------
+##
+## $Log: Makefile.m4,v $
+## Revision 1.1  2002/02/19 22:54:13  mdw
+## Initial revision.
+##
+## Revision 1.2  2002/02/03 20:57:21  mdw
+## Sort out distribution.
+##
+## Revision 1.1  2002/02/03 20:49:02  mdw
+## Checkin for new build system.
+##
+
+AUTOMAKE_OPTIONS = foreign
+
+texmfdir = @texmfdir@
+pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE}
+pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE}
+pkgtfmdir = ${texmfdir}/fonts/tfm/${PACKAGE}
+pkgvfdir = ${texmfdir}/fonts/vf/${PACKAGE}
+pkgetxdir = ${texmfdir}/tex/fontinst/${PACKAGE}
+
+FONTINST = @FONTINST@
+
+define(`addsuffix', `patsubst(`$1', `\>', `$2')')
+define(`BASE', `mdwfonts')
+define(`TFMBASE', `\
+       pcrb8a pcrb8rn pcrbo8a pcrbo8rn pcrr8a pcrr8rn \
+       pcrro8a pcrro8rn pplr8r pplri8r pzcmi8r')
+define(`VFBASE', `\
+       pcrb7tn pcrb8tn pcrbc7tn pcrbc8tn pcrbo7tn pcrbo8tn pcrr7tn pcrr8tn \
+       pcrrc7tn pcrrc8tn pcrro7tn pcrro8tn zpplcmr zpplcmrm')
+
+AUX = gpl.tex
+SRC = addsuffix(BASE, `.dtx')
+DVI = addsuffix(BASE, `.dvi')
+ETX = ot1tt.etx ot1ctt.etx
+INS = mdwfonts.sty mdwfonts.tex mdwfonts.map mttpcr.fd
+FD = omlpplcm.fd ot1pplcm.fd
+PL = addsuffix(TFMBASE, `.pl')
+VPL = addsuffix(VFBASE, `.vpl')
+TFM = addsuffix(TFMBASE, `.tfm') addsuffix(VFBASE, `.tfm')
+VF = addsuffix(VFBASE, `.vf')
+
+pkglatex_DATA = $(INS) $(FD)
+pkgdoc_DATA = $(DVI)
+pkgtfm_DATA = $(TFM)
+pkgvf_DATA = $(VF)
+pkgetx_DATA = $(ETX)
+
+SUFFIXES = .dtx .dvi .vf .tfm .pl .vpl
+define(`run_latex', `latex "\def\indexing{n} \nonstopmode \input $<"
+       latex "\def\indexing{y} \nonstopmode \input $<"
+       makeindex -s gind.ist $`'*.idx
+       latex "\def\indexing{n} \nonstopmode \input $<"')
+
+.dtx.dvi: $(AUX)
+       run_latex
+.vpl.tfm:; vptovf $<
+.pl.tfm:; pltotf $<
+.vpl.vf:; vptovf $<
+
+$(ETX) $(INS): $(SRC) mdwfonts.ins
+       tex "\nonstopmode \input mdwfonts.ins"
+$(FD) $(VF) $(PL) $(VPL): mdwfonts.tex $(ETX)
+       $(FONTINST) "\nonstopmode \input mdwfonts.tex"
+
+EXTRA_DIST = \
+       $(SRC) $(AUX) $(INS) $(ETX) $(FD) $(TFM) $(VF) $(DVI) \
+       mdwfonts.ins Makefile.m4
+
+MAINTAINERCLEANFILES = $(INS) $(ETX) $(TFM) $(VF) $(DVI) *.fd
+CLEANFILES = \
+       *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans \
+       *.pl *.vpl *.mtx
+Makefile.am: Makefile.m4
+       cd $(srcdir) && m4 Makefile.m4 >Makefile.am
+
+.PHONY: dvi
+
+##----- That's all, folks ---------------------------------------------------
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..6361c38
--- /dev/null
+++ b/README
@@ -0,0 +1,203 @@
+
+                            ===============
+
+                            M D W F O N T S
+
+                            ===============
+
+
+--- Licence note ---
+
+mdwfonts package release note
+Copyright (c) 1996 Mark Wooding
+
+These programs are free software; you can redistribute them and/or modify
+them under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+These programs are distributed in the hope that they will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with these programs; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+--- What it's all about ---
+
+This is a LaTeX package and some various font bits which allow configurable
+fonts in documents, provide a `squashed' Courier font (inlcuding the bits
+David Carlisle left out of pslatex) and some maths support for Palatino.
+
+
+--- Licencing ---
+
+The packages are made available under the GNU General Public Licence (not the
+usual LaTeX agreement).  A copy of this licence is supplied in the file
+COPYING.  You should read this document if you haven't read it already, even
+if it's just for educational value.  I'm not actually sure how good a thing
+the GNU GPL actually is, so I'm sort of testing the water.  The idea that
+this is how all software should be distributed still fills me with a certain
+amount of trepidation.
+
+
+--- What's in the box ---
+
+You should have received the following files in whatever sort of archive
+thing this suite came in:
+
+  README        -- You've got this file for sure, because it's this one
+  COPYING       -- A textual version of the GNU General Public Licence
+  mdwfonts.dtx -- Documentation and code for `mdwfonts.sty', the `.fd'
+                  files, and a whole lot of other stuff
+  mdwfonts.ins -- Installation script for the packages
+  gpl.tex      -- LaTeX version of the GNU General Public Licence
+
+If you're missing any of these files, complain at whoever gave the rest of
+them to you, and get them quickly.  You /should/ also have a large collection
+of `.tfm' and `.vf' files:
+
+  pcrb7tn.tfm   pcrbo7tn.tfm  pcrr8rn.tfm   pcrro8rn.tfm  pzcmi8r.tfm
+  pcrb8a.tfm    pcrbo8a.tfm   pcrr8tn.tfm   pcrro8tn.tfm  zpplcmr.tfm
+  pcrb8rn.tfm   pcrbo8rn.tfm  pcrrc7tn.tfm  pplr8r.tfm    zpplcmrm.tfm
+  pcrb8tn.tfm   pcrbo8tn.tfm  pcrrc8tn.tfm  pplri8r.tfm   zpsycmrv.tfm
+  pcrbc7tn.tfm  pcrr7tn.tfm   pcrro7tn.tfm  psyr.tfm      zpzccmry.tfm
+  pcrbc8tn.tfm  pcrr8a.tfm    pcrro8a.tfm
+
+  pcrb7tn.vf    pcrbo7tn.vf   pcrr8tn.vf    pcrro7tn.vf   zpplcmrm.vf
+  pcrb8tn.vf    pcrbo8tn.vf   pcrrc7tn.vf   pcrro8tn.vf   zpsycmrv.vf
+  pcrbc7tn.vf   pcrr7tn.vf    pcrrc8tn.vf   zpplcmr.vf    zpzccmry.vf
+  pcrbc8tn.vf
+
+If you don't have these, then strictly speaking you can generate them given
+the above sources, the sources for mathptm, and fontinst.sty, but I found
+this ever so fiddly, and I recommend strongly that nobody else try unless
+they're feeling really brave.
+
+Finally, you may be lucky and have some extra files:
+
+  mdwfonts.sty -- Unpacked `mdwfonts.sty' package
+  OMLpplcm.fd, OMSpzccm.fd, OMXpsycm.fd, OT1pplcm.fd and mTTpcr.fd
+               -- Font description files for LaTeX
+  mdwfonts.dvi -- Typeset documentation for the system
+
+If you've already got these, then great, because you don't have to generate
+them.  If you haven't, it's not a big deal.  You might also have a bunch of
+files with extensions like `.log', `.aux', `.tmp', `.ilg' and so on.  These
+files are really not at all interesting, and you might as well get rid of
+them now.
+
+
+--- Extracting the packages ---
+
+If you don't have the various .sty files already, you'll need to extract them
+from the .dtx files.  This requires docstrip.tex, which should be part of
+your base LaTeX 2e distribution.  If you have docstrip vsersion 2.3d, which
+is available with the December 1995 release of LaTeX, things will go rather
+faster.  If your LaTeX release is much older than this, you should upgrade,
+because the packages need a fairly new LaTeX anyway.  (I could do something
+about this, but I won't, because I want to encourage everyone to upgrade.)
+
+If everything's set up correctly, all you should need to do is say
+
+  tex mdwfonts.ins
+
+or
+
+  latex mdwfonts.ins
+
+or whatever incantation is necessary to run TeX or LaTeX on the supplied
+`mdwfonts.ins' file on your system.
+
+TeX will grind away at the files for a bit, and then say `Done' at you. (This
+could take a while, so be patient.)  You will then have a mdwfonts.log file,
+which you can throw away, and a collection of sparkly new files.  Now the
+installation can really begin.
+
+
+--- Installing all the files ---
+
+The package comes with a large number of miscellaneous font files.  They
+ought to be placed in appropriate directories where TeX and/or other programs
+can find them.  Exactly where this will be depends heavily on your
+installation: try looking for the other fonts and put these with them.  The
+various extensions for the font files are:
+
+`.tfm' is a TeX Font Metric file, needed by TeX.
+`.vf' is a virtual font description file, needed by DVI-drivers.
+`.fd' is a font description file, required by LaTeX.
+
+You'll also need to put mdwfonts.sty somewhere where LaTeX will find
+it.  What you do with the documentation file is up to you.
+
+The various `.fd' files and mdwfonts.sty may not have been included in your
+distribution.  If you don't have them, run LaTeX on `mdwfonts.ins' to build
+them (see above).  I'm explicitly not giving instructions for building all
+the other font files, because I'd much prefer it if they were distributed as
+they are, please -- building them is a fiddly business, and I'd rather that
+only I had to do it.
+
+Once you've done all that, you must tell dvips about your new fonts, so add
+the lines in `mdwfonts.map' to your `psfonts.map' file.
+
+
+--- Typesetting the documentation ---
+
+If you want to typeset the documentation for the package, you'll need some
+packages from the `mdwtools' distribution.  In particular, you need the
+`mdwtools.tex' file, and the `syntax.sty' and `sverb.sty' packages.  You'll
+also need the `mdwfonts.dtx' file for the package you want documentation on,
+and all the files it generated.
+
+Make sure you've got all the files, and then run LaTeX on mdwfonts.dtx.
+
+TeX will start hammering away for a very short while, and then stop and ask
+you whether you want to build the indexing files.  Generating index files
+takes a lot longer (I'd guess that it doubled the amount of time taken to
+typeset the `.dtx' file) so I don't recommend it unless:
+
+  * you've got a very fast processor, or
+  * you're very interested in how the package works internally, or
+  * you just like everything to be complete, or
+  * you're a masochist.
+
+Even so, there's no point writing indexing information the first time you
+run LaTeX on a file, because the table of contents hasn't been created yet,
+and when you LaTeX the file the second time, all the references will change.
+
+If you want the index files anyway, type `y' when you're asked.  Otherwise,
+type 'n'.  You know you want to type `n' really...
+
+If you want to do the job properly, you need to run LaTeX a second time
+to read in the contents table.  /This/ is the correct time to turn on
+indexing, if you really want it.
+
+If you did build the index files, you should now sort the index by saying
+
+  makeindex -s gind.ist mdwfonts.idx
+
+The `gind.ist' file should have come with LaTeX.  Having done this, you
+should run the `.dtx' file though LaTeX one final time, to insert the
+formatted index.
+
+You can now print or preview the generated `.dvi' file using whatever tools
+you usually use for such things.
+
+
+--- Contacting the author ---
+
+The author can be reached by email at mdw@excessus.demon.co.uk.  This is his
+personal dial-up account, paid for privately, so don't expect replies after
+five minutes or anything like that.
+
+If you do have any comments regarding the code, its documentation, or
+anything else to do with these packages, don't leave me guessing -- let me
+know.  While I won't guarantee to do anything about your comments, chances
+are that I'll right any wrongs and rescue any damsels in distress (oh, no,
+wrong spiel).
+
+
+-----------------------------------------------------------------------------
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..f4fa030
--- /dev/null
@@ -0,0 +1,44 @@
+dnl -*-fundamental-*-
+dnl
+dnl $Id: configure.in,v 1.1 2002/02/19 22:54:13 mdw Exp $
+dnl
+dnl Configuration script for mdwfonts
+dnl
+dnl (c) 2002 Mark Wooding
+dnl
+
+dnl ----- Licensing notice --------------------------------------------------
+dnl
+dnl This file is part of the mdwfonts font configuration system.
+dnl
+dnl mdwfonts is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl 
+dnl mdwfonts is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with mdwfonts; if not, write to the Free Software Foundation,
+dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+dnl ----- Revision history --------------------------------------------------
+dnl
+dnl $Log: configure.in,v $
+dnl Revision 1.1  2002/02/19 22:54:13  mdw
+dnl Initial revision.
+dnl
+dnl Revision 1.1  2002/02/03 20:49:03  mdw
+dnl Checkin for new build system.
+dnl
+
+AC_INIT(mdwfonts.ins)
+AM_INIT_AUTOMAKE(mdwfonts, 1.2.0)
+mdw_DIR_TEXMF
+AC_CHECK_PROGS(FONTINST, fontinst, tex)
+AC_OUTPUT(Makefile)
+
+dnl ----- That's all, folks -------------------------------------------------
diff --git a/mdwfonts.dtx b/mdwfonts.dtx
new file mode 100644 (file)
index 0000000..4fffbc8
--- /dev/null
@@ -0,0 +1,877 @@
+% \begin{meta-comment}
+%
+% $Id: mdwfonts.dtx,v 1.1 2002/02/19 22:54:13 mdw Exp $
+%
+% PostScript fonts for more excitement
+%
+% (c) 1996 Mark Wooding
+%
+%----- Revision history -----------------------------------------------------
+%
+% $Log: mdwfonts.dtx,v $
+% Revision 1.1  2002/02/19 22:54:13  mdw
+% Initial revision.
+%
+% Revision 1.1  1996/11/19 22:02:15  mdw
+% Initial revision
+%
+%
+% \end{meta-comment}
+%
+% \begin{meta-comment} <general public licence>
+%<*sty|mttpcr|fontinst>
+%%
+%% mdwtools common declarations
+%% Copyright (c) 1996 Mark Wooding
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program 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.  See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%%
+% \end{meta-comment}
+%
+% \begin{meta-comment} <file preamble>
+%<+sty>\NeedsTeXFormat{LaTeX2e}
+%<+sty>\ProvidesPackage{mdwfonts}
+%<+mttpcr>\ProvidesFile{mTTpcr.fd}
+%<*fontinst>
+\ifx\ProvidesFile\mdwundefined
+  \def\ProvidesFile#1[#2]{\wlog{File: #1 #2}}
+\fi
+\ProvidesFile{mdwfonts.tex}
+%</fontinst>
+                [1997/01/11 1.2 PostScript fonts for my documents]
+% \end{meta-comment}
+%
+% \CheckSum{593}
+%% \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         \~}
+%%
+%
+% \begin{meta-comment}
+%</sty|mttpcr|fontinst>
+%
+%<*driver>
+\input{mdwtools}
+\usepackage{mflogo}
+\describespackage{mdwfonts}
+\mdwdoc
+%</driver>
+%
+% \end{meta-comment}
+%
+% 
+%^^A-------------------------------------------------------------------------
+% \section{Overview}
+%
+% This suite of \LaTeX\ bits is intended to provide some configurability
+% for the fonts used by documents.  It lets users define their favourite
+% collection of fonts, and any documents using this package will
+% automatically honour those design decisions.
+%
+% It goes a little beyond this brief, however, by supplying some missing
+% PostScript fonts which may be useful.  (Well, the author uses them a lot.)
+% In particular:
+% \begin{itemize}
+% \item The `squashed' Courier from David Carlisle's \package{pslatex}
+%   package is included, and extended to cover the other known variants of
+%   Courier (e.g., bold and oblique).
+% \item A maths symbol font for Palatino has been added.  It works in a
+%   similar way to the \package{mathptm} package's support for Times (i.e.,
+%   it grabs glyphs from the normal Palatino font, and from the Computer
+%   Modern symbols).
+% \end{itemize}
+%
+%
+% \section{Installing \package{mdwfonts}}
+%
+% The package comes with a large number of miscellaneous font files.  They
+% ought to be placed in appropriate directories where \TeX and/or other
+% programs can find them.  Exactly where this will be depends heavily on your
+% installation: try looking for the other fonts and put these with them.
+% The various extensions for the font files are:
+% \begin{description}
+% \item [.tfm] is a \TeX\ Font Metric file, needed by \TeX.
+% \item [.vf] is a virtual font description file, needed by DVI-drivers.
+% \item [.fd] is a font description file, required by \LaTeX.
+% \end{description}
+%
+% You'll also need to put |mdwfonts.sty| somewhere where \LaTeX\ will find
+% it.  What you do with the documentation file is up to you.
+%
+% The files |mTTpcr.fd| and |mdwfonts.sty| may not have been included in
+% your distribution.  If you don't have them, run \LaTeX\ on |mdwfonts.ins|
+% to build them.  I'm explicitly not giving instructions for building all
+% the other font files, because I'd much prefer it if they were distributed
+% as they are, please -- building them is a fiddly business, and I'd rather
+% that only I had to do it.
+%
+% Once you've done all that, you must tell \textit{dvips} about your new
+% fonts, so add the following lines to the |psfonts.map| file, unless they're
+% already there:
+% \begin{listing}
+%pcrb8rn Courier-Bold ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+%pcrbo8rn Courier-BoldOblique ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+%pcrr8rn Courier ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+%pcrro8rn Courier-Oblique ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+% \end{listing}
+% The |pcrr8rn| line will already be in the file if you've installed the
+% \package{pslatex} package, so don't bother putting it in again.
+%
+%
+% \section{Using \package{mdwfonts}}
+%
+% \subsection{Defining fonts to use}
+%
+% The font faces you can use, with their names as used by this package,
+% currently are:
+% \begin{itemize}
+% \item Computer Modern Roman (|cmr|)
+% \item Computer Modern Sans (|cmss|)
+% \item Times Roman (|times|)
+% \item Helvetica (|helvetica|)
+% \item Palatino (|palatino|)
+% \item Computer Modern Typewriter (|cmtt|)
+% \item Courier (condensed version) (|courier|)
+% \end{itemize}
+% Only Computer Modern Roman, Times Roman and Palatino may be used as a maths
+% family.
+%
+% The \package{mdwfonts} package knows about five font families which
+% documents probably want to use.  The available families you can set, with
+% their names as used by this package, are:
+% \begin{description}
+% \item [The body text family] (|body|) is the main font your document uses.
+%   The default body family is Computer Modern Roman.
+% \item [The maths family] (|maths|) is the font used for mathematics.
+%   The default maths family is the same as the body family.
+% \item [The sans serif family] (|sans|) is used for sans serif text.
+%   The default sans serif family is Computer Modern Sans.
+% \item [The headings family] (|head|) is used for headings, if your
+%   document class supports this.\footnote{
+%     The \texttt{\char`\\headfam} command is configured to change to the
+%     chosen headings family.  Co-operating document classes should use this
+%     hook when typesetting chapter and section headings, etc.}
+%   Most document classes don't support this, but \package{mdwfonts} patches
+%   the standard \LaTeX\ classes so that they work.  The default headings
+%   family is Computer Modern Roman.
+% \item [The typewriter family] (|tt|) is used for monospaced text.  The
+%    default typewriter family is Computer Modern Typewriter.
+% \end{description}
+% American users not used to spelling \lit{maths} correctly may use the
+% alternative spelling \lit{math} instead.  If only the rest of \LaTeX\ were
+% this considerate.
+%
+%
+% \subsection{Assigning faces to families}
+%
+% \DescribeMacro\mdwfont
+% This is fairly simple, really.  The |\mdwfont| will attach a typeface to a
+% given family.  The syntax is as follows:
+% \begin{syntdiag}
+% "\\mdwfont" "{" \< <family-name> "=" <face-name> \\ "," \> "}"
+% \end{syntdiag}
+% For example, saying
+% \begin{listing}
+%\mdwfont{body=palatino, maths=palatino,
+%         sans=helvetica, head=helvetica
+%         tt=courier}
+% \end{listing}
+% uses Palatino for the main body text, and for maths, Helvetica for sans
+% serif text, and for headings (again, only if your document class supports
+% this).
+%
+% The \package{mdwfonts} package also supports a collection of options which
+% may be passed to the package.  The syntax of the package invocation is:
+% \begin{syntdiag}
+% "\\usepackage"
+% \[ "["
+%   \< \( <face-name> \\ <family-name> "=" <face-name> \) \\ "," \>
+% "]" \]
+% \\
+% "{" "mdwfonts" "}"
+% \end{syntdiag}
+%
+% A face name on its own configures families sensibly to use that face.
+% The actual behaviour is as follows:
+% \begin{description}
+% \item [times] Set body and maths families to Times Roman.
+% \item [palatino] Set body and maths families to Palatino.
+% \item [cmr] Set body, headings and maths families to Computer Modern Roman.
+% \item [helvetica] Set sans serif and headings families to Helvetica.
+% \item [cmss] Set sans serif family to Computer Modern Sans.
+% \item [courier] Set typewriter family to Courier.
+% \item [cmtt] Set typewriter family to Computer Modern Typewriter.
+% \end{description}
+% Astute readers will be able to deduce the author's personal preferences
+% for assigning typefaces to families from the above rules.  However, they
+% should suffice for most simple configurations.  Moreover, the direct
+% assignment of faces to families is supported in case the above aren't
+% expressive enough.
+%
+% When \package{mdwfonts} starts up, it reads a file called |mdwfonts.cfg|,
+% if it exists.  This file should set up defaults for the various families
+% according to the user's preferences.  The decisions made by the
+% configuration file may be overridden by the document, however, since
+% package options are processed after running |mdwfonts.cfg|.
+%
+%
+% \implementation
+%
+% \section{The package}
+%
+%    \begin{macrocode}
+%<*sty>
+%    \end{macrocode}
+%
+%
+% \subsection{Options handing}
+%
+% There are several font choices to be made.  These can be made from the
+% package options or the configuration file; the former takes precedence over
+% the latter.
+%
+% I'll use David Carlisle's rather good \package{keyval} package to handle
+% this lot because it saves a lot of hassle in the long run.
+%
+%    \begin{macrocode}
+\RequirePackage{keyval}
+%    \end{macrocode}
+%
+% Now to define how all this actually works.  Maintain a variable for each
+% family that I understand, and a list of which fonts people have expressed
+% an interest in.
+%
+%    \begin{macrocode}
+\def\mdwf@bodyfont{\mdwf@cmr}
+\def\mdwf@mathsfont{\mdwf@bodyfont}
+\def\mdwf@sansfont{\mdwf@cmss}
+\def\mdwf@headfont{\mdwf@cmr}
+\def\mdwf@ttfont{\mdwf@cmtt}
+%    \end{macrocode}
+%
+% Now to define the keys and values which I'll accept.
+%
+%    \begin{macrocode}
+\def\mdwf@set#1#2{\edef#1{\expandafter\noexpand\csname mdwf@#2\endcsname}}
+\define@key{mdwf}{body}{\mdwf@set\mdwf@bodyfont{#1}}
+\define@key{mdwf}{maths}{\mdwf@set\mdwf@mathsfont{#1}}
+\define@key{mdwf}{math}{\mdwf@set\mdwf@mathsfont{#1}}
+\define@key{mdwf}{sans}{\mdwf@set\mdwf@sansfont{#1}}
+\define@key{mdwf}{head}{\mdwf@set\mdwf@headfont{#1}}
+\define@key{mdwf}{tt}{\mdwf@set\mdwf@ttfont{#1}}
+%    \end{macrocode}
+%
+% Now input the configuration file.
+%
+%    \begin{macrocode}
+\def\mdwfont{\setkeys{mdwf}}
+\@input{mdwfonts.cfg}
+%    \end{macrocode}
+%
+% Set up some package options which handle the common cases.  Then add
+% a catch-all option which just gets bundled to \package{keyval}.
+%
+%    \begin{macrocode}
+\DeclareOption{times}{\mdwfont{body=times, maths=times}}
+\DeclareOption{palatino}{\mdwfont{body=palatino, maths=palatino}}
+\DeclareOption{cmr}{\mdwfont{body=cmr, maths=cmr, head=cmr}}
+\DeclareOption{helvetica}{\mdwfont{sans=helvetica, head=helvetica}}
+\DeclareOption{cmss}{\mdwfont{sans=cmss}}
+\DeclareOption{courier}{\mdwfont{tt=courier}}
+\DeclareOption{cmtt}{\mdwfont{tt=cmtt}}
+\DeclareOption*{\expandafter\mdwfont\expandafter{\CurrentOption}}
+\ProcessOptions*
+%    \end{macrocode}
+%
+% Now, if a client wants a really odd setup not provided by the above
+% interface, it can define |\mdwfonts| to declare its decision.
+%
+%    \begin{macrocode}
+\ifx\mdwfonts\@@undefined\else
+  \def\@tempa#1\@@{\mdwfont{#1}}
+  \expandafter\@tempa\mdwfonts\@@
+\fi
+%    \end{macrocode}
+%
+%
+% \subsection{Setting up the actual fonts}
+%
+% \begin{macro}{\mdwf@iffont}
+%
+% I need to check whether a font's been used.  This macro will help.
+%
+% First, I'll define some numeric values for various fonts.
+%
+%    \begin{macrocode}
+\count@\z@
+\def\@tempa#1{%
+  \expandafter\chardef\csname mdwf@#1\endcsname\count@%
+  \advance\count@\@ne%
+}
+\@tempa{cmr}\@tempa{cmss}\@tempa{cmtt}
+\@tempa{times}\@tempa{palatino}\@tempa{helvetica}\@tempa{courier}
+%    \end{macrocode}
+%
+% And now to check whether a font is being used.  This is rather horrible.
+%
+%    \begin{macrocode}
+\def\mdwf@iffont#1{\if1%
+  \ifnum\mdwf@bodyfont=#11\else%
+  \ifnum\mdwf@headfont=#11\else%
+  \ifnum\mdwf@sansfont=#11\else%
+  \ifnum\mdwf@ttfont=#11\else0%
+  \fi\fi\fi\fi%
+}
+%    \end{macrocode}
+%
+% \end{macro}
+%
+% \subsubsection{Text fonts}
+%
+% \paragraph{Courier}
+% The courier family is redefined in its entirety here.  I use the condensed
+% courier provided by David Carlisle's \package{pslatex} package, although
+% I've extended it to cover all the shapes and not just medium roman.
+%    \begin{macrocode}
+\mdwf@iffont\mdwf@courier
+\DeclareFontFamily{OT1}{pcr}{\hyphenchar\font=-1}
+\DeclareFontShape{OT1}{pcr}{b}{n}{<-> pcrb7tn}{}
+\DeclareFontShape{OT1}{pcr}{b}{sc}{<-> pcrbc7tn}{}
+\DeclareFontShape{OT1}{pcr}{b}{sl}{<-> pcrbo7tn}{}
+\DeclareFontShape{OT1}{pcr}{m}{n}{<-> pcrr7tn}{}
+\DeclareFontShape{OT1}{pcr}{m}{sc}{<-> pcrrc7tn}{}
+\DeclareFontShape{OT1}{pcr}{m}{sl}{<-> pcrro7tn}{}
+\DeclareFontShape{OT1}{pcr}{bx}{n}{<->ssub * pcr/b/n}{}
+\DeclareFontShape{OT1}{pcr}{bx}{sc}{<->ssub * pcr/b/sc}{}
+\DeclareFontShape{OT1}{pcr}{bx}{sl}{<->ssub * pcr/b/sl}{}
+\DeclareFontShape{OT1}{pcr}{b}{it}{<->ssub * pcr/b/sl}{}
+\DeclareFontShape{OT1}{pcr}{bx}{it}{<->ssub * pcr/b/it}{}
+\DeclareFontShape{OT1}{pcr}{m}{it}{<->ssub * pcr/m/sl}{}
+\DeclareFontFamily{T1}{pcr}{\hyphenchar\font=-1}
+\DeclareFontShape{T1}{pcr}{b}{n}{<-> pcrb8tn}{}
+\DeclareFontShape{T1}{pcr}{b}{sc}{<-> pcrbc8tn}{}
+\DeclareFontShape{T1}{pcr}{b}{sl}{<-> pcrbo8tn}{}
+\DeclareFontShape{T1}{pcr}{m}{n}{<-> pcrr8tn}{}
+\DeclareFontShape{T1}{pcr}{m}{sc}{<-> pcrrc8tn}{}
+\DeclareFontShape{T1}{pcr}{m}{sl}{<-> pcrro8tn}{}
+\DeclareFontShape{T1}{pcr}{bx}{n}{<->ssub * pcr/b/n}{}
+\DeclareFontShape{T1}{pcr}{bx}{sc}{<->ssub * pcr/b/sc}{}
+\DeclareFontShape{T1}{pcr}{bx}{sl}{<->ssub * pcr/b/sl}{}
+\DeclareFontShape{T1}{pcr}{b}{it}{<->ssub * pcr/b/sl}{}
+\DeclareFontShape{T1}{pcr}{bx}{it}{<->ssub * pcr/b/it}{}
+\DeclareFontShape{T1}{pcr}{m}{it}{<->ssub * pcr/m/sl}{}
+\fi
+%    \end{macrocode}
+%
+% \paragraph{Helvetica}
+% Again the whole of helvetica is defined here, this time so that the font
+% can be scaled a little.
+%    \begin{macrocode}
+\mdwf@iffont\mdwf@helvetica
+\DeclareFontFamily{OT1}{phv}{}
+\DeclareFontShape{OT1}{phv}{b}{n}{<-> s * [.9] phvb7t}{}
+\DeclareFontShape{OT1}{phv}{b}{sc}{<-> s * [.9] phvbc7t}{}
+\DeclareFontShape{OT1}{phv}{b}{sl}{<-> s * [.9] phvbo7t}{}
+\DeclareFontShape{OT1}{phv}{bc}{n}{<-> s * [.9] phvbrn7t}{}
+\DeclareFontShape{OT1}{phv}{bc}{sc}{<-> s * [.9] phvbcn7t}{}
+\DeclareFontShape{OT1}{phv}{bc}{sl}{<-> s * [.9] phvbon7t}{}
+\DeclareFontShape{OT1}{phv}{m}{n}{<-> s * [.9] phvr7t}{}
+\DeclareFontShape{OT1}{phv}{m}{sc}{<-> s * [.9] phvrc7t}{}
+\DeclareFontShape{OT1}{phv}{m}{sl}{<-> s * [.9] phvro7t}{}
+\DeclareFontShape{OT1}{phv}{mc}{n}{<-> s * [.9] phvrrn7t}{}
+\DeclareFontShape{OT1}{phv}{mc}{sc}{<-> s * [.9] phvrcn7t}{}
+\DeclareFontShape{OT1}{phv}{mc}{sl}{<-> s * [.9] phvron7t}{}
+\DeclareFontShape{OT1}{phv}{bx}{n}{<->ssub * phv/b/n}{}
+\DeclareFontShape{OT1}{phv}{bx}{sc}{<->ssub * phv/b/sc}{}
+\DeclareFontShape{OT1}{phv}{bx}{sl}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{OT1}{phv}{b}{it}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{OT1}{phv}{bx}{it}{<->ssub * phv/b/it}{}
+\DeclareFontShape{OT1}{phv}{bc}{it}{<->ssub * phv/bc/sl}{}
+\DeclareFontShape{OT1}{phv}{m}{it}{<->ssub * phv/m/sl}{}
+\DeclareFontShape{OT1}{phv}{mc}{it}{<->ssub * phv/mc/sl}{}
+\DeclareFontFamily{T1}{phv}{}
+\DeclareFontShape{T1}{phv}{b}{n}{<-> s * [.9] phvb8t}{}
+\DeclareFontShape{T1}{phv}{b}{sc}{<-> s * [.9] phvbc8t}{}
+\DeclareFontShape{T1}{phv}{b}{sl}{<-> s * [.9] phvbo8t}{}
+\DeclareFontShape{T1}{phv}{bc}{n}{<-> s * [.9] phvbrn8t}{}
+\DeclareFontShape{T1}{phv}{bc}{sc}{<-> s * [.9] phvbcn8t}{}
+\DeclareFontShape{T1}{phv}{bc}{sl}{<-> s * [.9] phvbon8t}{}
+\DeclareFontShape{T1}{phv}{m}{n}{<-> s * [.9] phvr8t}{}
+\DeclareFontShape{T1}{phv}{m}{sc}{<-> s * [.9] phvrc8t}{}
+\DeclareFontShape{T1}{phv}{m}{sl}{<-> s * [.9] phvro8t}{}
+\DeclareFontShape{T1}{phv}{mc}{n}{<-> s * [.9] phvrrn8t}{}
+\DeclareFontShape{T1}{phv}{mc}{sc}{<-> s * [.9] phvrcn8t}{}
+\DeclareFontShape{T1}{phv}{mc}{sl}{<-> s * [.9] phvron8t}{}
+\DeclareFontShape{T1}{phv}{bx}{n}{<->ssub * phv/b/n}{}
+\DeclareFontShape{T1}{phv}{bx}{sc}{<->ssub * phv/b/sc}{}
+\DeclareFontShape{T1}{phv}{bx}{sl}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{T1}{phv}{b}{it}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{T1}{phv}{bx}{it}{<->ssub * phv/b/it}{}
+\DeclareFontShape{T1}{phv}{bc}{it}{<->ssub * phv/bc/sl}{}
+\DeclareFontShape{T1}{phv}{m}{it}{<->ssub * phv/m/sl}{}
+\DeclareFontShape{T1}{phv}{mc}{it}{<->ssub * phv/mc/sl}{}
+\fi
+%    \end{macrocode}
+%
+% \paragraph{Palatino}
+% Might as well define palatino too, for completeness' sake.
+%    \begin{macrocode}
+\mdwf@iffont\mdwf@palatino
+\DeclareFontFamily{OT1}{ppl}{}
+\DeclareFontShape{OT1}{ppl}{b}{n}{<-> pplb7t}{}
+\DeclareFontShape{OT1}{ppl}{b}{sc}{<-> pplbc7t}{}
+\DeclareFontShape{OT1}{ppl}{b}{sl}{<-> pplbo7t}{}
+\DeclareFontShape{OT1}{ppl}{b}{it}{<-> pplbi7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{n}{<-> pplr7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{sc}{<-> pplrc7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{sl}{<-> pplro7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{it}{<-> pplri7t}{}
+\DeclareFontShape{OT1}{ppl}{bx}{n}{<->ssub * ppl/b/n}{}
+\DeclareFontShape{OT1}{ppl}{bx}{sc}{<->ssub * ppl/b/sc}{}
+\DeclareFontShape{OT1}{ppl}{bx}{sl}{<->ssub * ppl/b/sl}{}
+\DeclareFontShape{OT1}{ppl}{bx}{it}{<->ssub * ppl/b/it}{}
+\DeclareFontShape{OT1}{ppl}{l}{n}{<->ssub * ppl/m/n}{}
+\DeclareFontShape{OT1}{ppl}{l}{sc}{<->ssub * ppl/m/sc}{}
+\DeclareFontShape{OT1}{ppl}{l}{sl}{<->ssub * ppl/m/sl}{}
+\DeclareFontShape{OT1}{ppl}{l}{it}{<->ssub * ppl/m/it}{}
+\DeclareFontFamily{T1}{ppl}{}
+\DeclareFontShape{T1}{ppl}{b}{n}{<-> pplb8t}{}
+\DeclareFontShape{T1}{ppl}{b}{sc}{<-> pplbc8t}{}
+\DeclareFontShape{T1}{ppl}{b}{sl}{<-> pplbo8t}{}
+\DeclareFontShape{T1}{ppl}{b}{it}{<-> pplbi8t}{}
+\DeclareFontShape{T1}{ppl}{m}{n}{<-> pplr8t}{}
+\DeclareFontShape{T1}{ppl}{m}{sc}{<-> pplrc8t}{}
+\DeclareFontShape{T1}{ppl}{m}{sl}{<-> pplro8t}{}
+\DeclareFontShape{T1}{ppl}{m}{it}{<-> pplri8t}{}
+\DeclareFontShape{T1}{ppl}{bx}{n}{<->ssub * ppl/b/n}{}
+\DeclareFontShape{T1}{ppl}{bx}{sc}{<->ssub * ppl/b/sc}{}
+\DeclareFontShape{T1}{ppl}{bx}{sl}{<->ssub * ppl/b/sl}{}
+\DeclareFontShape{T1}{ppl}{bx}{it}{<->ssub * ppl/b/it}{}
+\DeclareFontShape{T1}{ppl}{l}{n}{<->ssub * ppl/m/n}{}
+\DeclareFontShape{T1}{ppl}{l}{sc}{<->ssub * ppl/m/sc}{}
+\DeclareFontShape{T1}{ppl}{l}{sl}{<->ssub * ppl/m/sl}{}
+\DeclareFontShape{T1}{ppl}{l}{it}{<->ssub * ppl/m/it}{}
+\fi
+%    \end{macrocode}
+%
+% \paragraph{Times}
+% Finally, times, for those who like it\dots
+%    \begin{macrocode}
+\mdwf@iffont\mdwf@times
+\DeclareFontFamily{OT1}{ptm}{}
+\DeclareFontShape{OT1}{ptm}{b}{n}{<-> ptmb7t}{}
+\DeclareFontShape{OT1}{ptm}{b}{sc}{<-> ptmbc7t}{}
+\DeclareFontShape{OT1}{ptm}{b}{sl}{<-> ptmbo7t}{}
+\DeclareFontShape{OT1}{ptm}{b}{it}{<-> ptmbi7t}{}
+\DeclareFontShape{OT1}{ptm}{m}{n}{<-> ptmr7t}{}
+\DeclareFontShape{OT1}{ptm}{m}{sc}{<-> ptmrc7t}{}
+\DeclareFontShape{OT1}{ptm}{m}{sl}{<-> ptmro7t}{}
+\DeclareFontShape{OT1}{ptm}{m}{it}{<-> ptmri7t}{}
+\DeclareFontShape{OT1}{ptm}{bx}{n}{<->ssub * ptm/b/n}{}
+\DeclareFontShape{OT1}{ptm}{bx}{sc}{<->ssub * ptm/b/sc}{}
+\DeclareFontShape{OT1}{ptm}{bx}{sl}{<->ssub * ptm/b/sl}{}
+\DeclareFontShape{OT1}{ptm}{bx}{it}{<->ssub * ptm/b/it}{}
+\DeclareFontShape{OT1}{ptm}{l}{n}{<->ssub * ptm/m/n}{}
+\DeclareFontShape{OT1}{ptm}{l}{sc}{<->ssub * ptm/m/sc}{}
+\DeclareFontShape{OT1}{ptm}{l}{sl}{<->ssub * ptm/m/sl}{}
+\DeclareFontShape{OT1}{ptm}{l}{it}{<->ssub * ptm/m/it}{}
+\DeclareFontFamily{T1}{ptm}{}
+\DeclareFontShape{T1}{ptm}{b}{n}{<-> ptmb8t}{}
+\DeclareFontShape{T1}{ptm}{b}{sc}{<-> ptmbc8t}{}
+\DeclareFontShape{T1}{ptm}{b}{sl}{<-> ptmbo8t}{}
+\DeclareFontShape{T1}{ptm}{b}{it}{<-> ptmbi8t}{}
+\DeclareFontShape{T1}{ptm}{m}{n}{<-> ptmr8t}{}
+\DeclareFontShape{T1}{ptm}{m}{sc}{<-> ptmrc8t}{}
+\DeclareFontShape{T1}{ptm}{m}{sl}{<-> ptmro8t}{}
+\DeclareFontShape{T1}{ptm}{m}{it}{<-> ptmri8t}{}
+\DeclareFontShape{T1}{ptm}{bx}{n}{<->ssub * ptm/b/n}{}
+\DeclareFontShape{T1}{ptm}{bx}{sc}{<->ssub * ptm/b/sc}{}
+\DeclareFontShape{T1}{ptm}{bx}{sl}{<->ssub * ptm/b/sl}{}
+\DeclareFontShape{T1}{ptm}{bx}{it}{<->ssub * ptm/b/it}{}
+\DeclareFontShape{T1}{ptm}{l}{n}{<->ssub * ptm/m/n}{}
+\DeclareFontShape{T1}{ptm}{l}{sc}{<->ssub * ptm/m/sc}{}
+\DeclareFontShape{T1}{ptm}{l}{sl}{<->ssub * ptm/m/sl}{}
+\DeclareFontShape{T1}{ptm}{l}{it}{<->ssub * ppl/m/it}{}
+\fi
+%    \end{macrocode}
+%
+% \subsubsection{Maths fonts}
+%
+% \paragraph{Palatino}
+% Easy stuff.
+%    \begin{macrocode}
+\ifnum\mdwf@mathsfont=\mdwf@palatino
+\DeclareSymbolFont{operators}   {OT1}{pplcm}{m}{n}
+\DeclareSymbolFont{letters}     {OML}{pplcm}{m}{it}
+\DeclareSymbolFont{bold}        {OT1}{ppl}{bx}{n}
+\DeclareSymbolFont{italic}      {OT1}{ppl}{m}{it}
+\DeclareSymbolFontAlphabet{\mathit}{italic}
+\fi
+%    \end{macrocode}
+%
+% \paragraph{Times}
+% Also easy.
+%    \begin{macrocode}
+\ifnum\mdwf@mathsfont=\mdwf@times
+\DeclareSymbolFont{operators}   {OT1}{ptmcm}{m}{n}
+\DeclareSymbolFont{letters}     {OML}{ptmcm}{m}{it}
+\DeclareSymbolFont{bold}        {OT1}{ptm}{bx}{n}
+\DeclareSymbolFont{italic}      {OT1}{ptm}{m}{it}
+\DeclareSymbolFontAlphabet{\mathit}{italic}
+\fi
+%    \end{macrocode}
+%
+% \paragraph{Computer Modern}
+% Silliness required.
+%    \begin{macrocode}
+\ifnum\mdwf@mathsfont=\mdwf@cmr
+\DeclareSymbolFont{operators}   {OT1}{cmr}{m}{n}
+\DeclareSymbolFont{letters}     {OML}{cmr}{m}{it}
+\DeclareSymbolFont{bold}        {OT1}{cmr}{bx}{n}
+\DeclareSymbolFont{italic}      {OT1}{cmr}{m}{it}
+\DeclareSymbolFontAlphabet{\mathit}{italic}
+\fi
+%    \end{macrocode}
+%
+% \paragraph{General PostScript things}
+% Set up the symbols and large symbols fonts.  This lot is all from
+% \package{mathptm}.
+%    \begin{macrocode}
+\if1\ifnum\mdwf@mathsfont=\mdwf@times1\else
+    \ifnum\mdwf@mathsfont=\mdwf@palatino1\else0\fi\fi
+\DeclareSymbolFont{symbols}     {OMS}{pzccm}{m}{n}
+\DeclareSymbolFont{largesymbols}{OMX}{psycm}{m}{n}
+%    \end{macrocode}
+% Adjust the spacing around operators and things to fit PostScript fonts
+% better.
+%    \begin{macrocode}
+\thinmuskip=2mu
+\medmuskip=2.5mu plus 1mu minus 1mu
+\thickmuskip=4mu plus 1.5mu minus 1mu
+%    \end{macrocode}
+% There isn't a bold symbol font.
+%    \begin{macrocode}
+\def\boldmath{%
+   \@warning{there is no bold Symbol font}%
+   \global\let\boldmath=\relax
+}
+%    \end{macrocode}
+% Provide an |\omicron| character.  No idea why\dots
+%    \begin{macrocode}
+\DeclareMathSymbol{\omicron}{0}{operators}{`\o}
+%    \end{macrocode}
+% Make scripts a bit bigger.
+%    \begin{macrocode}
+\DeclareMathSizes{5}{5}{5}{5}
+\DeclareMathSizes{6}{6}{5}{5}
+\DeclareMathSizes{7}{7}{5}{5}
+\DeclareMathSizes{8}{8}{6}{5}
+\DeclareMathSizes{9}{9}{7}{5}
+\DeclareMathSizes{10}{10}{7.4}{6}
+\DeclareMathSizes{10.95}{10.95}{8}{6}
+\DeclareMathSizes{12}{12}{9}{7}
+\DeclareMathSizes{14.4}{14.4}{10.95}{8}
+\DeclareMathSizes{17.28}{17.28}{12}{10}
+\DeclareMathSizes{20.74}{20.74}{14.4}{12}
+\DeclareMathSizes{24.88}{24.88}{17.28}{14.4}
+%    \end{macrocode}
+% Redefine the standard font for the symbols encoding.
+%    \begin{macrocode}
+\DeclareFontSubstitution{OMS}{pzccm}{m}{n}
+\fi
+%    \end{macrocode}
+%
+%
+% \subsection{Setting the font families}
+%
+% First, define the family names for everything.
+%
+%    \begin{macrocode}
+\def\mdwf@cmr{cmr}
+\def\mdwf@cmss{cmss}
+\def\mdwf@cmtt{cmtt}
+\def\mdwf@times{ptm}
+\def\mdwf@palatino{ppl}
+\def\mdwf@helvetica{phv}
+\def\mdwf@courier{pcr}
+%    \end{macrocode}
+%
+% Now assign families to the various variables.
+%
+%    \begin{macrocode}
+\edef\rmdefault{\mdwf@bodyfont}
+\edef\sfdefault{\mdwf@sansfont}
+\edef\ttdefault{\mdwf@ttfont}
+\edef\headdefault{\mdwf@headfont}
+%    \end{macrocode}
+%
+% Set various maths families.
+%
+%    \begin{macrocode}
+\def\mdwf@mathsfam#1#2#3{%
+  \edef\@tempa{\noexpand\DeclareMathAlphabet{\noexpand#1}{#2}{#3}}%
+  \@tempa%
+}
+\DeclareSymbolFontAlphabet{\mathit}{italic}
+\DeclareSymbolFontAlphabet{\mathrm}{operators}
+\DeclareSymbolFontAlphabet{\mathbf}{bold}
+\mdwf@mathsfam{\mathsf}{OT1}{\sfdefault}{m}{n}
+\mdwf@mathsfam{\mathtt}{OT1}{\ttdefault}{m}{n}
+%    \end{macrocode}
+%
+% Finally, set |\headfam| nicely.
+%
+%    \begin{macrocode}
+\def\headfam{\fontfamily\headdefault\selectfont}
+%    \end{macrocode}
+%
+% \subsection{Clobber standard packages}
+%
+% Now, if I recognise this document class, patch it until it accepts
+% |\headfam| correctly.  This stuff isn't terribly pleasant, but I don't
+% care about that.
+%
+% First see if I'm in familiar territory.
+%
+%    \begin{macrocode}
+\begingroup
+\catcode`\.11
+\if1\ifx\ver@article.cls\@@undefined
+    \ifx\ver@report.cls\@@undefined
+    \ifx\ver@book.cls\@@undefined
+    \ifx\ver@amsart.cls\@@undefined
+    \ifx\ver@amsproc.cls\@@undefined
+    \ifx\ver@amsbook.cls\@@undefined0%
+    \else1\fi
+    \else1\fi
+    \else1\fi
+    \else1\fi
+    \else1\fi
+    \else1\fi
+%    \end{macrocode}
+%
+% Looks like it.  Now to patch the |\@startsection|-based commands.  I'll
+% redefine |\@startsection| to do the atching for me, and then just run
+% all the commands which want patching.
+%
+%    \begin{macrocode}
+  \def\@startsection#1#2#3#4#5#6#7{%
+    \gdef#7{\@startsection{#1}{#2}{#3}{#4}{#5}{#6\headfam}}%
+  }
+  \section\section
+  \subsection\subsection
+  \subsubsection\subsubsection
+  \paragraph\paragraph
+  \subparagraph\subparagraph
+  \if1\ifx\ver@amsart.cls\@@undefined\ifx\ver@amsproc.cls\@@undefined0%
+      \else1\fi\else1\fi
+    \part\part
+  \fi
+%    \end{macrocode}
+%
+% Now for the difficult bits.  Firstly, deal with part headings for normal
+% \LaTeX\ classes.
+%
+%    \begin{macrocode}
+  \long\def\mdwf@grab#1{\expandafter\mdwf@grab@i#1\@@delim}
+  \long\def\mdwf@grab@i#1\@@delim#2{#2{#1}}
+  \def\mdwf@patch@opt#1{\mdwf@grab{#1[##1]{##2}}\mdwf@patch@opt@i#1}
+  \long\def\mdwf@patch@opt@i#1#2{\gdef#2[##1]##2{%
+    \let\mdwf@@bfseries\bfseries\def\bfseries{\headfam\mdwf@@bfseries}%
+    #1%
+    \let\bfseries\mdwf@@bfseries%
+  }}%
+  \def\mdwf@patch#1{\mdwf@grab{#1{##1}}\mdwf@patch@i#1}
+  \long\def\mdwf@patch@i#1#2{\gdef#2##1{%
+    \let\mdwf@@bfseries\bfseries\def\bfseries{\headfam\mdwf@@bfseries}%
+    #1%
+    \let\bfseries\mdwf@@bfseries%
+  }}%
+  \if0\ifx\ver@amsart.cls\@@undefined\ifx\ver@amsproc.cls\@@undefined0%
+      \else1\fi\else1\fi
+    \mdwf@patch@opt\@part
+    \mdwf@patch\@spart
+  \fi
+  \ifx\@makechapterhead\@@undefined\else
+    \mdwf@patch\@makechapterhead
+    \mdwf@patch\@makeschapterhead
+  \fi
+\fi
+\endgroup
+%    \end{macrocode}
+%
+% Wasn't that fun?
+%
+%
+% That's it for the package.
+%
+%    \begin{macrocode}
+%</sty>
+%    \end{macrocode}
+%
+%
+% \section{Font installation script}
+%
+% If you're lucky you'll never need to use this.
+%
+%    \begin{macrocode}
+%<*fontinst>
+\input fontinst.sty
+%    \end{macrocode}
+%
+% Firstly, some code for building squashed courier fonts.
+%
+%    \begin{macrocode}
+\def\squashcourier#1{%
+  \transformfont{pcr#18rn}{%
+  \xscalefont{850}{%
+    \reencodefont{8r}{\fromafm{pcr#18a}}}}}
+\squashcourier{b}
+\squashcourier{bo}
+\squashcourier{r}
+\squashcourier{ro}
+%    \end{macrocode}
+%
+% Now start installing fonts.
+%
+%    \begin{macrocode}
+\installfonts
+%    \end{macrocode}
+%
+% Start with the courier ones.
+%
+%    \begin{macrocode}
+\installfont{pcrb7tn}{pcrb8rn,psyr,latin}{OT1tt}{OT1}{pcr}{b}{n}{}
+\installfont{pcrb8tn}{pcrb8rn,psyr,latin}{T1}{T1}{pcr}{b}{n}{}
+\installfont{pcrbc7tn}{pcrb8rn,psyr,latin}{OT1ctt}{OT1}{pcr}{b}{sc}{}
+\installfont{pcrbc8tn}{pcrb8rn,psyr,latin}{T1c}{T1}{pcr}{b}{sc}{}
+\installfont{pcrbo7tn}{pcrbo8rn,psyr,latin}{OT1tt}{OT1}{pcr}{b}{sl}{}
+\installfont{pcrbo8tn}{pcrbo8rn,psyr,latin}{T1}{T1}{pcr}{b}{sl}{}
+\installfont{pcrr7tn}{pcrr8rn,psyr,latin}{OT1tt}{OT1}{pcr}{m}{n}{}
+\installfont{pcrr8tn}{pcrr8rn,psyr,latin}{T1}{T1}{pcr}{m}{n}{}
+\installfont{pcrrc7tn}{pcrr8rn,psyr,latin}{OT1ctt}{OT1}{pcr}{m}{sc}{}
+\installfont{pcrrc8tn}{pcrr8rn,psyr,latin}{T1c}{T1}{pcr}{m}{sc}{}
+\installfont{pcrro7tn}{pcrro8rn,psyr,latin}{OT1tt}{OT1}{pcr}{m}{sl}{}
+\installfont{pcrro8tn}{pcrro8rn,psyr,latin}{T1}{T1}{pcr}{m}{sl}{}
+%    \end{macrocode}
+%
+% Now build palatino-based maths fonts.  This lot seems to work.  It's based
+% on \package{mathptm}, and hacked a bit.
+%
+%    \begin{macrocode}
+\installfamily{OT1}{pplcm}{}
+\installfamily{OML}{pplcm}{\skewchar\font=127}
+\transformfont{pplr8r}{\reencodefont{8r}{\fromafm{pplr8a}}}
+\transformfont{pplri8r}{\reencodefont{8r}{\fromafm{pplri8a}}}
+\transformfont{pzcmi8r}{\reencodefont{8r}{\fromafm{pzcmi8a}}}
+\installfont{zpplcmr}
+   {pplr8r,psyr,latin,zrhax,kernoff,cmr10}
+   {OT1}{OT1}{pplcm}{m}{n}{}
+\installfont{zpplcmrm}
+   {kernoff,cmmi10,kernon,unsetalf,unsetnum,pplri8r,psyr,mathit,zrmhax,kernoff,cmmi10}
+   {OML}{OML}{pplcm}{m}{it}{}
+%    \end{macrocode}
+%
+% Done.
+%
+%    \begin{macrocode}
+\endinstallfonts
+\end
+%</fontinst>
+%    \end{macrocode}
+%
+% But it's not over yet.  For some reason, I don't have `|ot1tt.etx|' in my
+% distribution.  Here's one which ought to do.
+%
+%    \begin{macrocode}
+%<*ttetx>
+\relax
+% OT1tt.etx -- install an OT1-encoded typewriter font
+\encoding
+\def\tty{y}
+\inputetx{OT1}
+\endencoding
+%</ttetx>
+%    \end{macrocode}
+%
+% And again, for `|ot1ctt.etx|'.
+%
+%    \begin{macrocode}
+%<*cttetx>
+\relax
+% OT1tt.etx -- install an OT1-encoded typewriter font
+\encoding
+\def\tty{y}
+\inputetx{OT1c}
+\endencoding
+%</cttetx>
+%    \end{macrocode}
+%
+% Before I leave this section, I'll just write out the appropriate magical
+% definitions for the DVIPS |psfonts.map| file.
+%
+%    \begin{macrocode}
+%<*fontmap>
+pcrb8rn Courier-Bold ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+pcrbo8rn Courier-BoldOblique ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+pcrr8rn Courier ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+pcrro8rn Courier-Oblique ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+%</fontmap>
+%    \end{macrocode}
+%
+%
+% \section{Description file for courier}
+%
+% Here's a short |.fd| file for the squashed courier font which makes it
+% work in my `|mTT|' encoding.
+%
+%    \begin{macrocode}
+%<*mttpcr>
+\DeclareFontFamily{mTT}{pcr}{\hyphenchar\font=-1}
+\DeclareFontShape{mTT}{pcr}{b}{n}{<-> pcrb7tn}{}
+\DeclareFontShape{mTT}{pcr}{b}{sc}{<-> pcrbc7tn}{}
+\DeclareFontShape{mTT}{pcr}{b}{sl}{<-> pcrbo7tn}{}
+\DeclareFontShape{mTT}{pcr}{m}{n}{<-> pcrr7tn}{}
+\DeclareFontShape{mTT}{pcr}{m}{sc}{<-> pcrrc7tn}{}
+\DeclareFontShape{mTT}{pcr}{m}{sl}{<-> pcrro7tn}{}
+\DeclareFontShape{mTT}{pcr}{bx}{n}{<->ssub * pcr/b/n}{}%
+\DeclareFontShape{mTT}{pcr}{bx}{sc}{<->ssub * pcr/b/sc}{}%
+\DeclareFontShape{mTT}{pcr}{bx}{sl}{<->ssub * pcr/b/sl}{}%
+\DeclareFontShape{mTT}{pcr}{b}{it}{<->ssub * pcr/b/sl}{}%
+\DeclareFontShape{mTT}{pcr}{bx}{it}{<->ssub * pcr/b/it}{}%
+\DeclareFontShape{mTT}{pcr}{m}{it}{<->ssub * pcr/m/sl}{}%
+%</mttpcr>
+%    \end{macrocode}
+%
+% 
+% Done.
+%
+% \hfill Mark Wooding, \today
+%
+% \Finale
+%
+\endinput
diff --git a/mdwfonts.ins b/mdwfonts.ins
new file mode 100644 (file)
index 0000000..37d3efe
--- /dev/null
@@ -0,0 +1,49 @@
+%
+% $Id: mdwfonts.ins,v 1.1 2002/02/19 22:54:13 mdw Exp $
+%
+% Install mdwfonts package
+%
+% (c) 1996 Mark Wooding
+%
+
+%----- Revision history -----------------------------------------------------
+%
+% $Log: mdwfonts.ins,v $
+% Revision 1.1  2002/02/19 22:54:13  mdw
+% Initial revision.
+%
+% Revision 1.1  1996/11/19 22:01:30  mdw
+% Initial revision
+%
+
+\def\batchfile{mdwfonts.ins}
+\input docstrip
+\keepsilent
+
+\preamble
+
+IMPORTANT NOTICE
+\endpreamble
+
+{ % --- This is a group so that docstrip \reads it all in one go ---
+
+  \ifx\generate\mdwxxnotdef
+    \gdef\mdwgen#1{#1}
+    \gdef\mdwf#1#2{\generateFile{#1}{n}{#2}}
+    \gdef\needed#1{}
+  \else
+    \global\let\mdwgen\generate
+    \global\def\mdwf{\file}
+    \global\askforoverwritefalse
+  \fi
+
+}
+
+\mdwgen{\mdwf {mdwfonts.sty}   {\from{mdwfonts.dtx}{sty}}
+        \mdwf {mdwfonts.tex}   {\from{mdwfonts.dtx}{fontinst}}
+       \mdwf {mdwfonts.map}    {\from{mdwfonts.dtx}{fontmap}}
+       \mdwf {ot1tt.etx}       {\from{mdwfonts.dtx}{ttetx}}
+       \mdwf {ot1ctt.etx}      {\from{mdwfonts.dtx}{cttetx}}
+       \mdwf {mttpcr.fd}       {\from{mdwfonts.dtx}{mttpcr}}}
+
+\Msg{Done!}
diff --git a/mdwfonts.tex b/mdwfonts.tex
new file mode 100644 (file)
index 0000000..24b1220
--- /dev/null
@@ -0,0 +1,86 @@
+%%
+%% This is file `mdwfonts.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mdwfonts.dtx  (with options: `fontinst')
+%% 
+%% IMPORTANT NOTICE
+%%
+%% mdwtools common declarations
+%% Copyright (c) 1996 Mark Wooding
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program 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.  See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%%
+\ifx\ProvidesFile\mdwundefined
+  \def\ProvidesFile#1[#2]{\wlog{File: #1 #2}}
+\fi
+\ProvidesFile{mdwfonts.tex}
+                [1997/01/11 1.2 PostScript fonts for my documents]
+%% \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         \~}
+%%
+\input fontinst.sty
+\def\squashcourier#1{%
+  \transformfont{pcr#18rn}{%
+  \xscalefont{850}{%
+    \reencodefont{8r}{\fromafm{pcr#18a}}}}}
+\squashcourier{b}
+\squashcourier{bo}
+\squashcourier{r}
+\squashcourier{ro}
+\installfonts
+\installfont{pcrb7tn}{pcrb8rn,psyr,latin}{OT1tt}{OT1}{pcr}{b}{n}{}
+\installfont{pcrb8tn}{pcrb8rn,psyr,latin}{T1}{T1}{pcr}{b}{n}{}
+\installfont{pcrbc7tn}{pcrb8rn,psyr,latin}{OT1ctt}{OT1}{pcr}{b}{sc}{}
+\installfont{pcrbc8tn}{pcrb8rn,psyr,latin}{T1c}{T1}{pcr}{b}{sc}{}
+\installfont{pcrbo7tn}{pcrbo8rn,psyr,latin}{OT1tt}{OT1}{pcr}{b}{sl}{}
+\installfont{pcrbo8tn}{pcrbo8rn,psyr,latin}{T1}{T1}{pcr}{b}{sl}{}
+\installfont{pcrr7tn}{pcrr8rn,psyr,latin}{OT1tt}{OT1}{pcr}{m}{n}{}
+\installfont{pcrr8tn}{pcrr8rn,psyr,latin}{T1}{T1}{pcr}{m}{n}{}
+\installfont{pcrrc7tn}{pcrr8rn,psyr,latin}{OT1ctt}{OT1}{pcr}{m}{sc}{}
+\installfont{pcrrc8tn}{pcrr8rn,psyr,latin}{T1c}{T1}{pcr}{m}{sc}{}
+\installfont{pcrro7tn}{pcrro8rn,psyr,latin}{OT1tt}{OT1}{pcr}{m}{sl}{}
+\installfont{pcrro8tn}{pcrro8rn,psyr,latin}{T1}{T1}{pcr}{m}{sl}{}
+\installfamily{OT1}{pplcm}{}
+\installfamily{OML}{pplcm}{\skewchar\font=127}
+\transformfont{pplr8r}{\reencodefont{8r}{\fromafm{pplr8a}}}
+\transformfont{pplri8r}{\reencodefont{8r}{\fromafm{pplri8a}}}
+\transformfont{pzcmi8r}{\reencodefont{8r}{\fromafm{pzcmi8a}}}
+\installfont{zpplcmr}
+   {pplr8r,psyr,latin,zrhax,kernoff,cmr10}
+   {OT1}{OT1}{pplcm}{m}{n}{}
+\installfont{zpplcmrm}
+   {kernoff,cmmi10,kernon,unsetalf,unsetnum,pplri8r,psyr,mathit,zrmhax,kernoff,cmmi10}
+   {OML}{OML}{pplcm}{m}{it}{}
+\endinstallfonts
+\end
+\endinput
+%%
+%% End of file `mdwfonts.tex'.
diff --git a/setup b/setup
new file mode 100755 (executable)
index 0000000..04ca935
--- /dev/null
+++ b/setup
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+set -e
+mklinks
+mkaclocal
+m4 Makefile.m4 >Makefile.am
+autoconf
+automake