UKTeX Digest    Friday,  9 Oct 1992    Volume 92 : Issue 37

   ``The UKTeX Digest is brought to you as a free, unfunded and voluntary
        service of the UK TeX Users Group and the UK TeX Archive.''

Today's Topics:
 {Q&A}:
                      NFSS hack for zed, fuzz, and oz .sty
                         oz.sty incompatible with NFSS
                     dvitps generating invalid PostScript?
                            RE: macros and catcodes
               Use of thebibliography in book.sty in each chapter
 {Archive News}:
                   !!! NEWS !!!! the UK TeX Daughter archive!
                               update of musictex
 {Announcements}:
                   commcheck.tex, filechop.tex, plainind.tex


Administrivia:
    Moderators:     Peter Abbott (Aston University) and
                    David Osborne (University of Nottingham)
    Contributions:  UKTeX@uk.ac.tex
    Administration, subscription and unsubscription requests:
                    UKTeX-request@uk.ac.tex

------------------------------------------------------------

Date:    Fri, 02 Oct 92 14:12:13 +0000
From:    Peter J Knaggs <cmr02@uk.ac.tees-poly.scm>
Subject: NFSS hack for zed, fuzz, and oz .sty

The following is a message that appeared on the Z-Forum mail group that I
thought some of you may be interested in.  You should note that zed.sty
suffers from the same problems.


Peter J. Knaggs.       School of Computing and Maths, University of Teesside,
pjk @ scm.tees.ac.uk   Middlesbrough, Cleveland, England.    +44 (642) 342673
- -----------------------------------------------------------------------------

Date: Wed, 16 Sep 92 11:37:34 +0100
From: benz@de.uni-koblenz.infko (Hartmut Benz)
Subject: oz.sty incompatible with NFSS

Hi folks!

I have been a little bit frustrated by the fact that neither oz.sty nor
fuzz.sty is able to cope with the new font selection schema (NFSS) by
Mittelbach and Sch"opf.  The two major problems that arise are

        1. the mathcode-hack both of them use to get text-italic letters
           together with math-normal numbers inside the math environments
and
        2. the size changing commands \zBIG, \zBig, ... \zSmall in oz.sty.

I have ``developed'' (using a lot of time, nerves and imagination since I
have no internal documentation about how things work inside NFSS) a hack
that should do the thing.

1. THE MATHCODE HACK:
- ---------------------

Replace the old hack

        \@setmcodes{`A}{`Z}{"7441}
        \@setmcodes{`a}{`z}{"7461}

with

        \ifx\undefined\selectfont   % NFSS NOT available: use the old hack

        \@setmcodes{`A}{`Z}{"7441}
        \@setmcodes{`a}{`z}{"7461}
        \else                       % NFSS: new group
        \new@mathgroup\zedmathfont@group
        \define@mathgroup\mv@normal\zedmathfont@group{cmr}{m}{it}
        \define@mathgroup\mv@bold\zedmathfont@group{cmr}{b}{it}
        \@setmcodes{`A}{`Z}{"7\hexnumber@\zedmathfont@group41}
        \@setmcodes{`a}{`z}{"7\hexnumber@\zedmathfont@group61}
        \fi

2. SIZE CHANGING COMMANDS
- -------------------------

You seem to need a somewhat large definition in front of the commands
\zBIG etc.:

        \ifx\selectfont\undefined
        \def\NFSSgobbel#1{#1}
        \else\def\NFSSgobbel#1{}
        \def\vpt{\fontsize{5}{6pt}\selectfont}
        \def\vipt{\fontsize{6}{7pt}\selectfont}
        \def\viipt{\fontsize{7}{8pt}\selectfont}
        \def\viiipt{\fontsize{8}{9.5pt}\selectfont}
        \def\ixpt{\fontsize{9}{11pt}\selectfont}
        \def\xpt{\fontsize{10}{12pt}\selectfont}
        \def\xipt{\fontsize{11}{13pt}\selectfont}
        \def\xiipt{\fontsize{12}{14pt}\selectfont}
        \def\xivpt{\fontsize{14}{18pt}\selectfont}
        \def\xviipt{\fontsize{17}{22pt}\selectfont}
        \def\xxpt{\fontsize{20}{25pt}\selectfont}
        \def\xxvpt{\fontsize{25}{30pt}\selectfont}
        \fi

Then you have to replace every occurance of \@<num>pt with
\NFSSgobbel\@<num>pt in every size changing command. As an example the new
definition of \zBIG follows:

        \def\zBIG#1{\hbox{\ifx\z@ptsize \vpt \viiipt\NFSSgobbel\@viiipt
            \else \ifx\z@ptsize \vipt \ixpt\NFSSgobbel\@ixpt
            \else \ifx\z@ptsize \viipt \xpt\NFSSgobbel\@xpt
            \else \ifx\z@ptsize \viiipt \xipt\NFSSgobbel\@xipt
            \else \ifx\z@ptsize \ixpt \xiipt\NFSSgobbel\@xiipt
            \else \ifx\z@ptsize \xpt \xivpt\NFSSgobbel\@xivpt
            \else \ifx\z@ptsize \xipt \xviipt\NFSSgobbel\@xviipt
            \else \ifx\z@ptsize \xiipt \xxpt\NFSSgobbel\@xxpt
            \else \ifx\z@ptsize \xivpt \xxvpt\NFSSgobbel\@xxvpt
            \else \ifx\z@ptsize \xviipt \xxvpt\NFSSgobbel\@xxvpt
            \else \ifx\z@ptsize \xxpt \xxvpt\NFSSgobbel\@xxvpt
            \else \@warning{Can't increase this font size}
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi $\mathord{#1}$}}

Accessing the right fonts
- -------------------------
fuzz.sty:

Since I use the AMS-fonts instead of Spivey's own fonts I don't have the
code to define these but it should be pretty obvious how to do it from the
examples in the NFSS-package :-).  [This is realy the zed.sty file]

oz.sty:

If you have amssym.sty and amsfonts.sty that use NFSS this is quite easy
(if you don't have them: get the AMS package from any ftp- or mail-server):

Then replace SECTION 1 of oz. sty with

        \input{amssymb.sty}         % automaticly inputs amsfonts.sty
        \let\bbold=\bold

and remove the paragraph "------ AMSTEX SYMBOL DEFINITIONS ------" in
SECTION 3 entirely.

(FYI: \ms[xy]fam now is called \ms[ab]@group and old \@famletter is
equivalent to AMS's \hexnumber@)

If I missed something or if you have any problems or suggestions I'd be
happy to hear from you ...

                        Tschoe'wa
_______________________________________
Hartmut Benz                          | benz@infko.uni-koblenz.de
D-5400 Koblenz, Germany               |       (NeXTmail ok)

------------------------------

Date:    Tue, 06 Oct 92 09:02:27 +0000
From:    apm@tigress.co.uk (Andrew Marlow)
Subject: dvitps generating invalid PostScript?


Hello,

I have been having some problems with TeX.  I wonder if you can help. 

I have the Washington TeX 3.0 distribution tape which I have installed
on our SUN Sparcstation network and I can't get the DVI to postscript
driver working properly.  It seems to generate invalid postscript. 

Have I got the right person? If not, would you put me in touch with
somebody that knows about dvitps?

Yours hopefully,

Andrew Marlow.

------------------------------

Date:    Wed, 07 Oct 92 13:01:00 +0000
From:    Jonathan Fine <J.Fine@uk.ac.cambridge.dpmms>
Subject: RE: macros and catcodes

Last week Mark Templeton wrote describing a problem he came across
while writing a macro that required an \active end-of-line character.

The problem is exhibited by the following code
>       \def\typesettitle{
>         \catcode`\^^M=\active%
>         \def^^M{\par}
>       }
which attempts to define a macro that sets ^^M to \active, and then
defines it.

If fact, the result of this code is the same as
>       \def\typesettitle{ \catcode`\^^M=\active \def }
which is very strange.  

What happens is this.  The line
>         \catcode`\^^M=\active%
is not acted upon, for these tokens are being absorbed into the
definition of \typesettitle.  The next line
>         \def^^M{\par}
contains ^^M, which is an end-of-line character.  According to the
TeXbook, p47, middle of page, 
>       If \TeX sees an end-of-line character ... it throws away any
>       other information that might remain on the current line.
and so the characters (not yet turned into tokens)
>                {\par}
are thrown away.  The next line closes the definition.

In this context, the behaviour of \endinput should be considered. 
Again according to the TeXbook (p214, top of page)
>    *  \endinput.  The expansion is null.  The next time \TeX gets
>       to the end of an \input line, it will stop reading from the
>       file containing that line.

Thus, a line such as
>       \ifx\mymacro\undefined \else \endinput \fi
in an \input file will cause input to cease should \mymacro be other
that \undefined.  In this case, the \fi that balances the \ifx *will*
be read.  The \endinput takes effect *the next time \TeX gets to the
end of an \input line*.  

Here is a tricky example.  In a file the line
>       \endinput \input abc
will cause the file "abc" to be \input'ed, while the apparently
equivalent
>       \endinput
>       \input abc
does not!

Back to Mark's problem.  The usual method of getting an active
character into a macro is to set the \catcode of that character to
active *before* the definition of the macro is read from a file. 

Here is one way of coding what he wants.
>       \begingroup      % confine special effects
>         \endlinechar -1  % this avoids trouble later
>         \catcode`\^^M\active
>         %  Must use a \gdef to transcend the \begingroup
>         \gdef\typesettitle{
>           \catcode`\^^M\active
>           \def^^M{\par}
>         }
>       \endgroup

It is a piece of good fortune that this coding will also prevent
space tokens creeping into \typesettitle after either of the lines
>         \gdef\typesettitle{
>           \def^^M{\par}
for according to the TeXbook, p46 (foot) and p48 (2/3 down) TeX will
delete any <space> (number 32) characters that occur at the right end
of an input line.  It then inserts an \endlinechar (if \endlinechar
is within bounds).

It is possible to get an active ^^M without changing \catcode's. 
Start with some fixed active character - say ^^@ - and use \uccode
and \uppercase to turn it into a ^^M.  According to the TeXbook, p41,
the catcode will not change.  Now the problem is, to get this
*active* ^^M into your macro.  To do this, build the macro up
carefully, token by token, using \aftergroup.  The basic technique
is shown on page 374 of the TeXbook.

This \uppercase conversion and \aftergroup building up is essential
mechanical, and so could be done automatically, from an input file
written in a suitable syntax.  For example, if 
>       !\x
is to mean
>       produce an `x' with \catcode \active
then Mark's first attempt to express his meaning is very nearly
correct.  All that is required is to specify that the ^^M is to be
active. 

With this new syntax, the code
>       \def\typesettitle{
>         \catcode`\^^M=\active%
>         \def !\^^M{\par}
>       }
expresses precisely what is wanted in the macro!

For this scheme to work, a device which translates the above into a
cunning sequence of \aftergroup and \uppercase commands is required. 
And this program had better be written in TeX, otherwise it won't be
available to all TeX users.

Oddly enough, I have just finished writing such an object.  It forms
the \noname macro package, which will, I promise you, be worth every
penny of whatever it is I decide to charge you for it.

If you would like a demonstration copy, please email a message to me,
agreeing to the conditions below.

1.  I understand that the \noname package, if supplied, will be for
my own personal use and evaluation only.  I will not make any of its
files available to a third party, by copying, by placing them in an
area accessible to other users, or otherwise.  (This does not
prohibit `fair use' quotation of textual material.)

2.  While effort has been taken to ensure that the package is fit and
proper for its stated purpose, no warranty express or implied is made
as to its suitability for any purpose.  No liability is accepted for
consequential damage.

with best regards

Jonathan

>                       Jonathan Fine
>                       203 Coldhams Lane
>                       Cambridge
>                       CB1 3HY              Tel 0223 215389

>                       J.Fine@pmms.cam.ac.uk

------------------------------

Date:    08 Oct 92 13:41:14 +0000
From:    Alan Zinober <A.Zinober@uk.ac.sheffield>
Subject: Use of thebibliography in book.sty in each chapter

 When using book.sty in Latex, how can one use thebibliography at the
 end of each chapter, and use \cite in each chapter and also ideally
 between chapters ?

 Alan Zinober      ap1asiz@uk.ac.shef.pa

------------------------------

Date:    Thu, 08 Oct 92 17:28:08
From:    spqr@uk.ac.york.minster
Subject: !!! NEWS !!!! the UK TeX Daughter archive!

As readers of UK TeX may have gathered, quite a lot of work has been
undertaken over the summer to bring the UK TeX Archive back up to its
pre-eminent position as *the* reliable TeX archive. This was partly
prompted by the possible loss of the support contract for the
Archive's Vax machine (still under debate), so one move was to spawn a
new archive on a Unix machine; we  also took the chance to update and
revise the collection in line with recommendations for archive
structures being worked on a TeX Users Group committee. The result is

   *!* UK TeX Daughter Archive *!*

which is now open for business alongside its venerable parent. At
present, we recommend only two ways of getting stuff from it:
  
 * the recommended way is to acquire a copy of Gopher and use that.
   This requires that you be linked to the Internet (using JIPS in the
   UK), and offers an easy and fast system for getting what you
   want. You can run Gopher on VMS, Unix, PC or Mac systems, and the
   software is freely available - ask your local guru to get it for
   you. When you get it, configure it to look at ftp.tex.ac.uk on port
   70 (get that same guru to sort it out for you).

   the Gopher service will be introduced and explained at the meeting
   of the UK TeX Users Group next month. among other things, its
   supports fast searching of the whole filestore, and keyword
   searching of David Jones' macro index, and TeXhax & UK TeX back issues.

 * until we work out the loading, we'd rather people did not do file
   transfer direct. however, the UK's largest repository, Imperial
   College (src.doc.ic.ac.uk) is mirroring us, and you can find the
   material in packages/tex on their machine

we will soon add two more services:

 - access via the Vax for JANET users without access to Internet
   facilities
 - a mail server

IMPORTANT NOTE 1. The Daughter archive is *not* at present a clone of
the `real' UK TeX Archive, but contains a great deal of material not
yet on the Vax. We will bring the two together as quickly as we can,
God (and VMS) willing.

IMPORTANT NOTE 2. The directory structure on this machine is not what
you may be used to from the Vax. look around carefully.


------------------------------

Date:    Thu, 08 Oct 92 17:28:40
From:    spqr@uk.ac.york.minster
Subject: update of musictex


Daniel Taupin's musictex  is now at version 4.77 in the UK TeX Archive.

[tex-archive.src.unix-archives]musictex477.boo

is a boo-encoded ZIP file

Sebastian

------------------------------

Date:    Wed, 07 Oct 92 13:01:00 +0000
From:    Jonathan Fine <J.Fine@uk.ac.cambridge.dpmms>
Subject: commcheck.tex, filechop.tex, plainind.tex

% Dear Reader
%
% There are three files in this package.
%
%         commcheck.tex  :  use this as a header to files transmitted
%         by email, to guard against systematic garbling of a character
%
%         filechop.tex   :  use this to unbundle a group of files sent
%         as a single email message
%
%         plainind.tex   :  solve many of the problems caused by macros
%         expanding within a \write command, such as occur when coding
%         a table of contents, or an index
%
% To unpack this package, save it as a file.  If you saved it as
% "bundle1.tex", then you should now run TeX, with the plain format,
% against the file "bundle1".
%
% At the end of the unbundling, the "plainind" macros are demonstrated.
%
% best wishes
%
% Jonathan Fine
%
% P.S.  When you TeX this message with plain, your log file should
% look like the following.
%
% This is emTeX, Version 3.0 [2i] (preloaded format=texput 90.7.20)  2 OCT 1992
 08:20
% **&plain bundle1
% (bundle1.tex \FILE commtest.tex \EOF \FILE filechop.tex \EOF
% \FILE plainind.tex \EOF \FILE plainind.demo \EOF (plainind.demo (plainind.tex
)
% [1
% \TeX \ is easy
% Math looks like $\int \!\!\!\int _D dx\,dy$
% Scholarly works have footnotes in titles
% ] ) )
% Output written on bundle1.dvi (1 page, 976 bytes).
%
% \FILE commtest.tex
% Version: 0.0
% Date: 2 October 1992
% Author: Jonathan Fine
% Address: 203 Coldhams Lane, Cambridge, CB1 3HY, England
% Email: J.Fine@pmss.cam.ac.uk
% Copyright (c) 1992.  Subject to the terms of the
% Free Software Foundation general public license.

% PLEASE REPORT ANY ERRORS

% The command \commtest expects to be followed by the visible
% characters, or rather character constants, in ASCII order.
%
% The idea is, to place this file at the head of text transmitted by
% email, to test for a systematic garbling of characters.

% If such an error occurs, a message such as
%       ! Communication Error. Expecting "a", getting "b".
% will appear.


% Implement \commtest and the reporting macro \commerror

        % initialise the scratch counter 255
        \count255 `\ \relax

        \def\commtest #1%
        {%
          % check that #1 is the correct chracter constant
          \ifnum\count255 =`#1
          \else
            \commerror #1%
          \fi
          %
          % move on to the next character, if in range
          \ifnum\count255 <126
            \advance\count255  1
            \let\next\commtest
          \else
            \let\next\relax
          \fi
          \next
        }

        %
        \def\commerror #1%
        {%
          \begingroup
            %  get the desired character into \next, using \uppercase
            \uccode`\*\count255
            \uppercase{\def\next{*}}%
            %
            % send out the error message
            \escapechar -1
            \immediate\write16
            {%
              ! Communication Error.
                Expecting "\next", getting \string "#1".%
            }%
          \endgroup
        }

% Perform the test
        \commtest
        \ !"#$\%&'()*+,-./0123456789:;<=>?@
        ABCDEFGHIJKLMNOPQRSTUVWXYZ
        [\\]^_`
        abcdefghijklmnopqrstuvwxyz
        \{|\}~
% \FILE filechop.tex
% Version: 0.0
% Date: 2 October 1992
% Author: Jonathan Fine
% Address: 203 Coldhams Lane, Cambridge, CB1 3HY, England
% Email: J.Fine@pmss.cam.ac.uk
% Copyright (c) 1992.  Subject to the terms of the
% Free Software Foundation general public license.

% PLEASE REPORT ANY ERRORS

% Here is the \FILE command, which is used for unwrapping a large
% file into the small constituent files from which it is made.  For
% practical and performance reasons, the component files should not be
% so large, that they do not easily sit in the main memory of \TeX

% Here is an example of its use.
%       \FILE abc
%       text
%       and more text
%       \EOF
%       \FILE abc.doc
%       ho hum, and more
%       \EOF
% will result in a files |abc.tex| and |abc.doc| being created, whose
% contents are the lines
%       text
%       and more text
% and
%       ho hum, and more
% respectively.

% Thanks to Johannes Braams, for suggesting the use of \do.

\begingroup
\catcode`\@ 11
\gdef\FILE #1 {%
  \immediate\openout 0 #1\relax
  \begingroup
    % announce unbundling
    \def\ { }%
    \message{\string\FILE\  #1}%

    \def\do##1{\catcode`##1 12 }%
    \dospecials
    \catcode`\^^I 12  \catcode`\^^L 12  \catcode`\^^M 12
    \endlinechar`\^^M
    \def\empty{}%  this is the "plain" meaning
    \@FILE
    \empty  % \@FILE is given \empty else \FILE^^M\EOF will fail
}
\endlinechar -1
\catcode`\^^M 12  \catcode `\| 0  \catcode `\\ 12 |relax
|gdef|@FILE #1^^M\EOF{%
  |newlinechar`|^^M
  |immediate|write 0{#1}%
  |immediate|closeout 0|relax
  |endgroup
  |message{\EOF}
}
|endgroup
\FILE commtest.tex 
% \FILE commtest.tex
% Version: 0.0
% Date: 2 October 1992
% Author: Jonathan Fine
% Address: 203 Coldhams Lane, Cambridge, CB1 3HY, England
% Email: J.Fine@pmss.cam.ac.uk
% Copyright (c) 1992.  Subject to the terms of the
% Free Software Foundation general public license.

% PLEASE REPORT ANY ERRORS

% The command \commtest expects to be followed by the visible
% characters, or rather character constants, in ASCII order.
%
% The idea is, to place this file at the head of text transmitted by
% email, to test for a systematic garbling of characters.

% If such an error occurs, a message such as
%       ! Communication Error. Expecting "a", getting "b".
% will appear.


% Implement \commtest and the reporting macro \commerror

        % initialise the scratch counter 255
        \count255 `\ \relax

        \def\commtest #1%
        {%
          % check that #1 is the correct chracter constant
          \ifnum\count255 =`#1
          \else
            \commerror #1%
          \fi
          %
          % move on to the next character, if in range
          \ifnum\count255 <126
            \advance\count255  1
            \let\next\commtest
          \else
            \let\next\relax
          \fi
          \next
        }

        %
        \def\commerror #1%
        {%
          \begingroup
            %  get the desired character into \next, using \uppercase
            \uccode`\*\count255
            \uppercase{\def\next{*}}%
            %
            % send out the error message
            \escapechar -1
            \immediate\write16
            {%
              ! Communication Error.
                Expecting "\next", getting \string "#1".%
            }%
          \endgroup
        }

% Perform the test
        \commtest
        \ !"#$\%&'()*+,-./0123456789:;<=>?@
        ABCDEFGHIJKLMNOPQRSTUVWXYZ
        [\\]^_`
        abcdefghijklmnopqrstuvwxyz
        \{|\}~
\EOF               
\FILE filechop.tex 
% \FILE filechop.tex
% Version: 0.0
% Date: 2 October 1992
% Author: Jonathan Fine
% Address: 203 Coldhams Lane, Cambridge, CB1 3HY, England
% Email: J.Fine@pmss.cam.ac.uk
% Copyright (c) 1992.  Subject to the terms of the
% Free Software Foundation general public license.

% PLEASE REPORT ANY ERRORS

% Here is the \FILE command, which is used for unwrapping a large
% file into the small constituent files from which it is made.  For
% practical and performance reasons, the component files should not be
% so large, that they do not easily sit in the main memory of \TeX

% Here is an example of its use.
%       \FILE abc
%       text
%       and more text
%       \EOF
%       \FILE abc.doc
%       ho hum, and more
%       \EOF
% will result in a files |abc.tex| and |abc.doc| being created, whose
% contents are the lines
%       text
%       and more text
% and
%       ho hum, and more
% respectively.

% Thanks to Johannes Braams, for suggesting the use of \do.

\begingroup
\catcode`\@ 11
\gdef\FILE #1 {%
  \immediate\openout 0 #1\relax
  \begingroup
    % announce unbundling
    \def\ { }%
    \message{\string\FILE\  #1}%

    \def\do##1{\catcode`##1 12 }%
    \dospecials
    \catcode`\^^I 12  \catcode`\^^L 12  \catcode`\^^M 12
    \endlinechar`\^^M
    \def\empty{}%  this is the "plain" meaning
    \@FILE
    \empty  % \@FILE is given \empty else \FILE^^M\EOF will fail
}
\endlinechar -1
\catcode`\^^M 12  \catcode `\| 0  \catcode `\\ 12 |relax
|gdef|@FILE #1^^M\EOF{%
  |newlinechar`|^^M
  |immediate|write 0{#1}%
  |immediate|closeout 0|relax
  |endgroup
  |message{\EOF}
}
|endgroup
\EOF               
\FILE plainind.tex 
% \FILE plainind.tex
% Version: 0.0
% Date: 2 October 1992
% Author: Jonathan Fine
% Address: 203 Coldhams Lane, Cambridge, CB1 3HY, England
% Email: J.Fine@pmss.cam.ac.uk
% Copyright (c) 1992.  Subject to the terms of the
% Free Software Foundation general public license.

% PLEASE REPORT ANY ERRORS

\catcode`\@=11
% documentation is at end of the file

% disaster if this file is loaded twice
\ifx\macr@\undefined \else
  \catcode`\@=12
  \immediate\write16 {!! this file cannot be loaded twice !!}
  \undefined  \endinput \fi

% use \macr@ as a constructor
\def\macr@ #1%
{%
  % defend against errors
  \ifx#1\undefined \undefined \fi
%  \immediate\write16 {\string#1=\meaning#1}%
  %
  \toks0 \expandafter{#1}%  the `##' in \angle forces use of \toks
  \edef #1%
  {%
    \noexpand \macr@
    \noexpand #1%
    \the\toks0
    \noexpand \macr@end
  }%
%  \immediate\write16 {\string#1=\meaning#1}%
}

% use \paramacr@ as a constructor
\def\paramacr@ #1%
{%
  % defend against errors
  \ifx#1\undefined \undefined \fi
  \ifnum\escapechar=`\\ \else \undefined \fi
%  \immediate\write16 {\string#1=\meaning#1}%
  %
  % store the mangled name
  \edef\next{%
    \expandafter
    \noexpand \csname *\string#1\endcsname
  }%
  %
  % defend against errors
  \expandafter\ifx\next\relax \else \undefined \fi
  %
  % shuffle the values
  \expandafter\let\next #1%
  \edef #1%
  {%
    \noexpand \paramacr@
    \noexpand #1
    \expandafter
    \noexpand \next
  }%
%  \immediate\write16 {\string#1=\meaning#1}%
%  \immediate\write16
%  {%
%    \expandafter\string\next=\expandafter\meaning\next
%  }%
}

% redefine the |\output| routine for |plain|
\def\plainoutput
{%
  % store the \box to be shipped out
  \setbox0\vbox{\makeheadline\pagebody\makefootline}%
  %
  % change to the \write-ing values
  %
  \def\macr@##1##2\macr@end{\noexpand##1}%
  \def\paramacr@##1##2{\noexpand##1}%
  \def\footnote##1##2{}%  Works most of the time!
  %
  % \of is used as a delimiter by the math macro \root
  \let\of\relax
  %
  \shipout\box0
  %
  \advancepageno
  \ifnum\outputpenalty>-\@MM \else\dosupereject\fi
}

% make the changes
% the order is as in the file |plain.tex|
\macr@\rm \macr@\mit \macr@\oldstyle \macr@\cal \macr@\it \macr@\sl
\macr@\bf \macr@\tt \macr@\lq \macr@\rq \macr@\lbrack \macr@\rbrack
\macr@\thinspace \macr@\negthinspace \macr@\enspace \macr@\enskip
\macr@\quad \macr@\qquad \macr@~ \macr@\slash \macr@\break
\macr@\nobreak \paramacr@\rlap \paramacr@\llap \paramacr@\underbar
\macr@\strut \macr@\aa \macr@\l \macr@\L \macr@\_ \macr@\AA
\macr@\dag \macr@\ddag \macr@\S \macr@\P \paramacr@\d \paramacr@\b
\paramacr@\c \macr@\copyright \macr@\dots \macr@\TeX \paramacr@\`
\paramacr@\' \paramacr@\v \paramacr@\u \paramacr@\= \paramacr@\^
\paramacr@\.  \paramacr@\H \paramacr@\~ \paramacr@\" \paramacr@\t
\macr@\hrulefill \macr@\dotfill \macr@\rightarrowfill
\macr@\leftarrowfill \macr@\downbracefill \macr@\upbracefill \macr@\,
\macr@\> \macr@\; \macr@\!  \macr@\* \macr@\hbar \macr@\surd
\macr@\angle \macr@\int \macr@\oint \macr@\neq \macr@\mapsto
\macr@\joinrel \macr@\relbar \macr@\Relbar \macr@\hookrightarrow
\macr@\hookleftarrow \macr@\bowtie \macr@\models
\macr@\Longrightarrow \macr@\longrightarrow \macr@\longleftarrow
\macr@\Longleftarrow \macr@\longmapsto \macr@\longleftrightarrow
\macr@\Longleftrightarrow \macr@\iff \macr@\ldots \macr@\cdots
\macr@\vdots \macr@\ddots \macr@\acute \macr@\grave \macr@\ddot
\macr@\tilde \macr@\bar \macr@\breve \macr@\check \macr@\hat
\macr@\vec \macr@\dot \macr@\widetilde \macr@\widehat
\paramacr@\overrightarrow \paramacr@\overleftarrow
\paramacr@\overbrace \paramacr@\underbrace \paramacr@\skew
\macr@\lmoustache \macr@\rmoustache \macr@\lgroup \macr@\rgroup
\macr@\arrowvert \macr@\Arrowvert \macr@\bracevert \macr@\Vert
\macr@\vert \macr@\uparrow \macr@\downarrow \macr@\updownarrow
\macr@\Uparrow \macr@\Downarrow \macr@\Updownarrow \macr@\backslash
\macr@\rangle \macr@\langle \macr@\rbrace \macr@\lbrace \macr@\rceil
\macr@\lceil \macr@\rfloor \macr@\lfloor \macr@\bigl \macr@\bigm
\macr@\bigr \macr@\Bigl \macr@\Bigm \macr@\Bigr \macr@\biggl
\macr@\biggm \macr@\biggr \macr@\Biggl \macr@\Biggm \macr@\Biggr
\paramacr@\big \paramacr@\Big \paramacr@\bigg \paramacr@\Bigg
\macr@\choose \macr@\brack \macr@\brace \macr@\sqrt \paramacr@\root
\macr@\vphantom \macr@\hphantom \macr@\phantom \macr@\mathstrut
\macr@\smash \macr@\cong \macr@\notin \macr@\rightleftharpoons
\paramacr@\buildrel \macr@\doteq \macr@\log \macr@\lg \macr@\ln
\macr@\lim \macr@\limsup \macr@\liminf \macr@\sin \macr@\arcsin
\macr@\sinh \macr@\cos \macr@\arccos \macr@\cosh \macr@\tan
\macr@\arctan \macr@\tanh \macr@\cot \macr@\coth \macr@\sec
\macr@\csc \macr@\max \macr@\min \macr@\sup \macr@\inf \macr@\arg
\macr@\ker \macr@\dim \macr@\hom \macr@\det \macr@\exp \macr@\Pr
\macr@\gcd \macr@\deg \macr@\bmod \paramacr@\pmod \paramacr@\cases
\paramacr@\matrix \paramacr@\pmatrix \paramacr@\bordermatrix

% these \let commands asre copied from |plain|
% they provide alternative control seqeunces for the same command
\let\^^_=\v \let\^^S=\u \let\^^D=\^ \let\ne=\neq \let\|=\Vert
\let\}=\rbrace \let\{=\lbrace

% if you want \write\index{\^^_} to produce \^^_ rather than \v,
% then *replace*   \let\^^_=\v   by   \macr@\^^_  .

% changes to plain macros now finished, so now give \macr@ and
% \paramacr@ the default, typesetting values.
\def\macr@#1{}
\let\paramacr@\macr@

% finally, this value should never change.
\let\macr@end\relax
\catcode`\@=12

\endinput

Certain of the user-available commands of |plain| are text-like.  For
example, |\sin| produces $sin$, |\alpha| $\alpha$, and |\TeX| \TeX.
These commands have been modified so that they behave appropiately
within a |\write|.

As |\alpha| is |\mathchar"10B|, it is unexpandable and so will
produce `|\alpha |' (with a trailing space) in a |\write|.  With the
usual definition of |\TeX|, it is otherwise.  In a |\write| it
is expanded, to reproduce its definition.  For other commands, worse
can happen.

However, |\write| commands (unless called for |\immediately|) are
acted upon only when the enclosing box is shipped out.  When a
|\shipout| is performed, the argument to a |\write| will be expanded,
according to the definitions current {\it at that moment}.

The command |\TeX| is altered from |...| to
||
  \macr@\TeX ... \macr@end
||
where the default values
||
  \def\macr@#1{}
  \let\macr@end\relax
||
result in |\TeX| being typeset as usual.

The |\output| routine of |plain| has been modified so that just
before the |\shipout|, the definition
||
  \def\macr@#1#2\macr@end{\noexpand#1}
||
is in force.

For macros that take parameters, a variant of this technique is used.

Note.  The commands |\lq|, |\rq|, |lbrack| and |\rbrack| have not
been changed.
\EOF               
\FILE plainind.demo 
% \FILE plainind.demo
% Version: 0.0
% Date: 2 October 1992
% Author: Jonathan Fine
% Address: 203 Coldhams Lane, Cambridge, CB1 3HY, England
% Email: J.Fine@pmss.cam.ac.uk
% Copyright (c) 1992.  Subject to the terms of the
% Free Software Foundation general public license.

% PLEASE REPORT ANY ERRORS

% First, alter the text-like macros of "plain".
\input plainind

% Implement a chapter command
\def\Chapter #1%
{%
   \bigskip
   \leftline
   {%
     % put a \write into the box
     \write\toc{#1}%
     % and print the text in boldface
     \bf #1%
   }%
}

% and have the \toc write to the screen
\chardef\toc 16

% Now for some text

\Chapter{\TeX\ is easy}
Text

\Chapter{Math looks like $\int\!\!\!\int_D dx\,dy$}
More text

\Chapter{Scholarly works\footnote{*}{Look up} have footnotes in titles}

Yet more text.  Note that the for indexing and tabl of contents to
work properly, the second argument to the footnote must be delimited
by braces.  Note also that - TeXbook p117 - that footnote insertions
will be lost ``if they occur inside of boxes that are inside of
boxes''.

\vfill
\end
\EOF               
\input plainind.demo  
\end  

------------------------------
                                        
                       UK TeX ARCHIVE at ASTON UNIVERSITY
                              >>>  UK.AC.TEX  <<<
                                        
                  *** Interactive and file transfer access ***
           JANET: Host: uk.ac.tex, Username: public, Password: public
                              (DTE 000020120091)
                    Internet: host tex.ac.uk [134.151.40.18]
               For telnet access, login: public, password: public
      For anonymous ftp, login: anonymous, password: <your-e-mail-address>
                                        
                              *** Mail server ***
                    Send mail to TeXserver@uk.ac.tex (JANET)
                   or TeXserver@tex.ac.uk (rest of the world)
                   with message body containing the word HELP
                                        
\section FILES OF INTEREST

    [tex-archive]00readme.txt
    [tex-archive]00directory.list        [tex-archive]00directory.size
    [tex-archive]00directory_dates.list  [tex-archive]00last30days.files
    [tex-archive.doc]TeX-FAQ.txt    (Frequently Asked Questions list)
    [tex-archive.doc]FAQ-Supplement-*.txt    (FAQ supplement)

\section DIGESTS

    This year's UKTeX back issues are stored in the archive in directory
      [tex-archive.digests.uktex.92]
    This year's TeXhax back issues are stored in the archive in directory
      [tex-archive.digests.texhax.92]
      Latest TeXhax: V92 #18
    TeXMaG back issues are stored in the archive in directory
      [tex-archive.digests.tex-mag]
      Latest TeXMaG: V5N3

\section MEDIA DISTRIBUTIONS
    Postal addresses are given below.

\subsection Washington Unix TeX distribution tape
    Latest copy of May/June 1991 contains:
    TeX 3.14, LaTeX 2.09, Metafont 2.7, plus many utilities
    suitable for Unix 4.2/4.3BSD & System V
    tar format, 1600bpi, blockfactor 20, 1 file (36Mb)

    Copies available on:
       One 2400ft 0.5" tape sent to Aston with return labels AND return postage
   OR
       One Quarter-Inch Cartridge, QIC-120 or QIC-150 format (DC600A or DC6150)
       sent with envelope AND stamps for return postage to Nottingham
         (Due to currency exchange, this service is offered only within the UK)

\subsection VMS tapes
    VMS backup of the archive requires three 2400ft tapes at 6250bpi.
    VMS backup of TeX 2.991 plus PSprint requires one 2400ft tape.

\subsection Exabyte 8mm tapes
    Same contents available as 0.5" tapes.
    Following tape types available: SONY Video 8 cassette P5 90MP,
    MAXELL Video 8 cassette P5-90, TDK Video 8 cassette P5-90MPB

\section TeX IMPLEMENTATIONS FOR SMALL COMPUTERS

\subsection OzTeX V1.4 (for Macintosh)
    Send 7 UNFORMATTED 800K disks to Aston with return postage.

\subsection emTeX (for OS/2, PC-DOS and MS-DOS)
    The complete package (3.5" High density disk format ONLY)
    is available from Aston at a cost of 15 pounds sterling,
    including documentation, disks, post and packing (DO NOT SEND DISKS):
      specify Set A.
    Additional utilities including DVIPS, 5 pounds sterling:  specify Set B.
    FLI files for FX, 5 pounds sterling:  specify Set C.
    FLI files for P6M, 5 pounds sterling:  specify Set D.

    For general enquiries, and a free catalogue detailing other disk 
    formats, precompiled fonts and lots of other goodies, contact:
    Eigen PD Software, P.O. Box 722, Swindon SN2 6YB  (tel: 0793-611270)
    (JANET e-mail address: kellett@uk.ac.cran.rmcs)

\subsection TeX for the Atari ST
    All enquiries for disks etc. should be directed to:
    The South West Software Library, P.O. Box 562, Wimborne, Dorset BH21 2YD
    (JANET e-mail address: mdryden@uk.co.compulink.cix)

\section POSTAGE RATES
    All prices in Pounds Sterling.
    For Aston orders, make cheques payable to Aston University.

    0.5" tapes: UK: 2.50 (one tape),  5.00 (two tapes).
            Europe: 5.00 (one tape),  9.00 (two tapes).
            Outside Europe please enquire.
    8mm tapes:
            UK: 1.00,  Europe: 2.00.
    Quarter-inch cartridges:
            UK: 1.00,  Europe: 2.00.
    Diskettes:
    Quantity/Size   Europe   World    UK 1st   UK 2nd
      18/3.5"        3.10     5.10     1.40     1.10
      11/3.5"        1.80     2.90     0.80     0.65
      18/5.25"       1.20     2.00     0.60     0.50
      11/5.25"       0.80     1.30     0.50     0.35

\section POSTAL ADDRESSES
    Please include SELF-ADDRESSED ADHESIVE LABELS for return postage.

    Peter Abbott
    Information Systems, Aston University, Aston Triangle, Birmingham B4 7ET

    David Osborne
    Cripps Computing Centre, University of Nottingham, Nottingham NG7 2RD
    (for Quarter-inch cartridges ONLY -- must include stamps for return postage
)

\section UK TeX USERS GROUP

    For details, contact:
    Geeti Granger, Text Processing Dept, John Wiley & Sons, 
    Baffins Lane, Chichester, W Sussex PO19 1UD  (tel: 0243 770329)
 or David Penfold, Edgerton Publishing Services,
    30 Edgerton Road, Edgerton, Huddersfield HD3 3AD (tel: 0484 519462)

\bye

End of UKTeX Digest [Volume 92 Issue 37]
****************************************