[comp.text] TeXhax Digest V89 # 71

TeXhax@cs.washington.edu (TeXhax Digest) (08/04/89)

TeXhax Digest       Tuesday, August 1, 1989  Volume 89 : Issue 71

Moderators: Tiina Modisett and Pierre MacKay

%%% The TeXhax digest is brought to you as a service of the TeX Users Group %%%
%%%       in cooperation with the UnixTeX distribution service at the       %%%
%%%                      University of Washington                           %%%

Today's Topics:         

                             IBM 3820 output on MVS
                              Needed: page styles
                   Simple LaTeX questions and local guides
                            Catcodes and mathcodes
                  Defining an environment that does nothing
                            A change to subeqn.sty
                                  Ascii chart

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

Date: Wed, 26 Jul 89 16:24:43 -0700
From: Louis M. McDonald <louis@aerospace.aero.org>
Subject: IBM 3820 output on MVS
Keywords: IBM 3820, dviware

Does anyone know where I can get an DVI to IBM3820 program?

I would prefer that it run on VAX/VMS so I can ship the file
to the IBM for printing. Otherwise, I will be satified with
it running under MVS...(ug!)

Louis McDonald
louis@aerospace.aero.org

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

Date: Fri, 28 Jul 89 15:08:30 GMT
From: Vivian Harrington <HARRINGT%IRLEARN.BITNET@UWAVM.ACS.WASHINGTON.EDU>
Subject: Needed: page styles
Keywords: LaTeX, page styles

Hi
  I need the page numbers at the bottom of the page and positioned
in the left corner for the left-side page and the right corner for
the right-side page ( like the Latex Users Guide except I need
footers rather that headers).   Thanks in advance.

             Vivian Harrington
             University College Dublin

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

Date: Fri, 28 Jul 89 09:01 CDT
From: U2591AA@VMS.UCC.OKSTATE.EDU
Subject: Simple LaTeX questions and local guides
Keywords: LaTeX, suggestions

There have been a lot of simple requests regarding LaTeX on TeXhax recently,
and at least as many gripes about the requests.  The following suggestions
might help cut down some of the requests:

	1. The first paragraph of every "Local Guide to LaTeX" should state
	   that every one who hopes to use LaTeX **MUST** buy the book.  Our
	   local guide states that I will not answer LaTeX questions unless
	   the user owns the book and knows where the index is located.

           (For heaven's sake (and LL's), if you don't have a local guide,
            MAKE ONE!  Maybe LL's example local guide can be copied out of
            the shar file in which it resides in the archives and made easily
	    accessible via ftp.)

	2.  If you tell someone about TeXhax, tell them it is not meant for
	    LaTeX questions which can be easily answered by looking in the
	    index.

	3.  Watch for an upcoming announcement about a LaTeX Volunteer Help
	    Corps.  Keep the information and tell your users about it.

	4.  When you talk to new LaTeX users, tell them about other people
	    in the building who use LaTeX.  Answers from friends are usually
	    faster than answers from TeXhax.

Scott McCullough
Dept. of Physics
Oklahoma State University
Stillwater, OK  74078-0444		u2591aa@vms.ucc.okstate.edu (internet)
					u2591aa@uccvms (bitnet)

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

Date: Sat, 29 Jul 89 09:22:03 GMT
From: "Wayne G. Sullivan" <WSULIVAN%IRLEARN.BITNET@UWAVM.ACS.WASHINGTON.EDU>
Subject: Catcodes and mathcodes
Keywords: TeX, catcodes, mathcodes

The example I sent earlier, thanks to some elucidation from Chris Thompson,
I recognize to be a 'feature' of TeX and not a 'bug':

       catcode`\_=\active
       \def_{\char`\_}
       $ _ $
       \bye

The problem here is that in mathmode TeX treats ordinary characters whose
mathcode is 32768 as active characters. When TeX (using the plain format)
sees '_' as an ordinary character and not a subscript marker, it replaces
it by its active character value, which was redefined here to be essentially
"the character '_'". Upon evaluating this value, the mathcode is again
computed and TeX again looks up the active character value of '_' resulting
in a loop until one intervenes.
The moral is that if one wishes to redefine catcodes to make active characters,
one should check the mathcode: if it is 32768, then extra care is necessary
to avoid difficulties. Perhaps one should redefine the mathcode as well.
So long as mathmode is not entered, a conflict between definitions as
active characters will not arise. However, TeX moves easily into mathmode in
many contexts, so the lack of explicit math delimiters is not sufficient to
insure that mathmode is not used.
                                Wayne Sullivan

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

Date: Wed, 26 Jul 89 20:54 EST
From: <FISK%BOWDOIN.BITNET@UWAVM.ACS.WASHINGTON.EDU>
Subject: Defining an environment that does nothing
Keywords: environment, TeX, LaTeX

How can I define an environment "nothing" so that nothing between
\begin{nothing} and \end{nothing} is output.  For instance, I
would like

this is text \\
\begin{nothing}
here is something\\
here is more \\
\end{nothing}
this is text

to produce this output:

this is text
this is text

It is trivial to write a command to do this; how do I turn the command
into an envrionment?


Steve Fisk                              Department of Mathematics
207-725-3574                            Bowdoin College
fisk@bowdoin.bitnet                     Brunswick, Me. 04011 USA

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

Date: Sun, 30 Jul 89 11:19:26 EDT
From: Rick Zaccone <zaccone%sol.bucknell.edu@UWAVM.ACS.WASHINGTON.EDU>
Subject: A change to subeqn.sty
Keywords: LaTeX, environment, subequations

In TeXhax v89n007, Johannes Braams (braams@hlsdnl5.bitnet) posted a
bug fix to the subeqn environment.  I found this environment to be
useful but it lacked an important capability.  I group equations into
a subequation environment because they are related in some manner.
This means that I sometimes want to refer to them as a group.

I have made a change to the environment that allows a user to label
and refer to all of the equations in a subequation environment as a
group.  Attached is the revised version of subeqn.sty, and a sample
file.

Rick Zaccone
zaccone@bknlvms.bitnet
zaccone@sol.bucknell.edu
% ----------------------------------------------------------------------
%                     This LaTeX environment  is for
%printing   subequations.   To   use   this   environment,  include  in  the
%\documentstyle header  a command to  load in the  .sty file containing this
%macro. For example:
%     \documentstyle[subeqn]{article}
%if you  have the  macro in  a file subeqn.sty. The environment seems pretty
%well documented in the comments.
%
% Modified : June 8, 1989.  You can now reference either individual
%            equations in the subequations environment, or all of
%            them.  If you use a \label command immediately after the
%            \begin{subequations} command, then a reference to that
%            label will generate a reference to the equation number
%            without the alphabetic extension.
%
%            Rick Zaccone
%            zaccone@bknlvms.bitnet
%            zaccone@sol.bucknell.edu
% Modified : 16 - january - 1989 by Johannes Braams ( BRAAMS@HLSDNL5)
%            Added \global\@ignoretrue in the definition of
%            \endsubequations in order to prevent a spurious space
%            at the beginning of the next text-line. Also added %'s
%            at the end of each command-line for the same reasons.
%
%%%----------------------------------------------------------------
%%% File: subeqn.sty
%%% The subequations environment %%%
%
% Within the subequations environment, the only change is that
% equations are labeled differently.  The number stays the same,
% and lower case letters are appended.  For example, if after doing
% three equations, numbered 1, 2, and 3, you start a subequations
% environmment and do three more equations, they will be numbered
% 4a, 4b, and 4c.  After you end the subequations environment, the
% next equation will be numbered 5.
%
% Both text and equations can be put inside the subequations environment.
%
% If you make any improvements, I'd like to hear about them.
%
% Stephen Gildea
% MIT Earth Resources Lab
% Cambridge, Mass. 02139
% mit-erl!gildea
% gildea@erl.mit.edu
%
\newtoks\@stequation

\def\subequations{\refstepcounter{equation}%
  \edef\@savedequation{\the\c@equation}%
  \@stequation=\expandafter{\theequation}%   %only want \theequation
  \edef\@savedtheequation{\the\@stequation}% %expanded once
  \edef\oldtheequation{\theequation}%
  \setcounter{equation}{0}%
  \def\theequation{\oldtheequation\alph{equation}}}%

\def\endsubequations{%
  \setcounter{equation}{\@savedequation}%
  \@stequation=\expandafter{\@savedtheequation}%
  \edef\theequation{\the\@stequation}\global\@ignoretrue}
%%%----------------------------
% ----------------------------------------------------------------------
Here's an example.

\documentstyle[subeqn]{article}
\begin{document}
Here is an equation with a number.
\begin{equation}
Ax = b
\end{equation}
Now begin some subequations.
\begin{subequations}
\label{eq:a}
Here's one.
\begin{equation}
\label{eq:c}
Ax = c
\end{equation}
Here's another.
\begin{equation}
\label{eq:d}
Ax = d
\end{equation}
\end{subequations}
Now, I can refer to individual equations such as~(\ref{eq:c})
and~(\ref{eq:d}), or I can refer to~(\ref{eq:a}), which is the entire
group.
\end{document}

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

Date:  Mon, 31 Jul 89 09:53:57 MET
From: Victor Eijkhout <U641000%HNYKUN11.BITNET@Forsythe.Stanford.EDU>
Subject: Ascii chart
Keywords: TeX, ASCII chart

Hello,
on usenet someone asked if an Ascii chart in TeX existed.
Well, after one saturday night of hacking it does!

This gives 7-bit ascii in binary/octal/decimal/hex form
in a nice tabular format, so once you know (and i'm telling you
now) that the control-key zeros bits 6 and 7, this allows you
to deduce that for instance ctrl-m equals a cr.

Plain TeX, of course, but by commenting in/out a few lines you
can make it LaTeX, if that's what you want. For some reason
however, the table then winds up on page two...
Also the code does contain a couple of kludges, so don't look
too hard.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                     A S C I I    wall chart                        %%
%%                                                                    %%
%% by Victor Eijkhout                                                 %%
%% u641000@hnykun11.bitnet                                            %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Choose your favourite format:
%%
\nopagenumbers %% 2 lines
\vsize=28cm    %% for PLAIN TeX
%\documentstyle{article}            %% 4 lines for LaTeX
%\begin{document}                   %% not that it matters anything,
%\pagestyle{empty}                  %% rest of the document
%\setlength{\textheight}{28cm}      %% is 'pure' TeX.
%%%%%% and don't forget the \bye / \end{document} at the end!! %%%%%%%

%% fonts
\font\bitfont=cmr7 \fontdimen3\bitfont=3mm
\font\codefont=cmr5
\font\namefont=cmss10 scaled 1200
\font\titlefont=cmss10 scaled 1440
\font\commentfont=cmss10

%% counts and dimens
\newdimen\rowheight \rowheight=1cm
\newdimen\colwidth  \colwidth=1.6cm
\newdimen\topwhite \topwhite=2pt
\newdimen\botwhite \botwhite=3pt
\newdimen\leftwhite \leftwhite=2pt
\newdimen\rightwhite \rightwhite=2pt
\newcount\rowcount \rowcount=-1 %% note!
\newcount\colcount \colcount=0
\newcount\thenumber

%% tidbits
\def\\{$\backslash$}
\def\thinline{\vrule width .25mm}
\def\fatline{\vrule width .5mm}
\tolerance=10000
\vbadness=10000

%% code conversion
\def\calcnumber{{\multiply\colcount by 16
                 \advance\colcount by \rowcount
                 \global\thenumber=\colcount}}
\def\deccode{\number\thenumber}
\def\octcode{{\ifnum\thenumber>63
                            \advance\thenumber by -64
                            \count0=\thenumber \divide\count0 by 8
                            1\number\count0
              \else         \count0=\thenumber \divide\count0 by 8
                            \ifnum\count0>0 \number\count0 \fi\fi
              \multiply\count0 by 8
              \advance\thenumber by -\count0
              \number\thenumber}}
\def\hexdigit#1{\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
                          8\or 9\or A\or B\or C\or D\or E\or F\or
                          \edef\tmp{\message{illegal hex digit
                                         \number#1}}\tmp
                          \fi}
\def\hexcode{{\count0=\thenumber \divide\count0 by 16
              \ifnum\count0>0 \hexdigit{\count0}\fi
              \multiply\count0 by 16
              \advance\thenumber by -\count0 \count0=\thenumber
              \hexdigit{\count0}}}

%% the heading
\def\threebit#1#2#3{\vbox to 1.2\rowheight{\bitfont
                      \vskip\topwhite
                      \hbox to \colwidth{\hskip\leftwhite#1\hfil}
                      \vfil
                      \hbox to \colwidth{\hfil#2\hfil}
                      \vfil
                      \hbox to \colwidth{\hfil#3\hskip\rightwhite}
                      \vskip\botwhite}}
\def\comment#1{\vbox to \colwidth{\hrule height 0mm depth .25mm
                      \vfil
                      \hbox to 2\colwidth{\commentfont\hfil#1\hfil}
                      \vfil}}
\def\dcomment#1#2{\vbox to \colwidth{\hrule height 0mm depth .25mm
                      \vfil
                      \hbox to 2\colwidth{\commentfont\hfil#1\hfil}
                      \vskip \botwhite
                      \hbox to 2\colwidth{\commentfont\hfil#2\hfil}
                      \vfil}}
\def\bithead{\vbox to \colwidth{\hsize=1.5\colwidth
                   \vskip\topwhite
                   \hbox to \hsize{\commentfont\hfil BITS\hfil}
                   \vfil
                   \hbox to \hsize{\bitfont\ b4 b3 b2 b1 }
                   \vskip\botwhite}}

%% routines for single chars
\def\fourbit#1\fb{\vbox to \rowheight{
                     \vfil
                     \hbox to 1.5\colwidth{\bitfont #1\ }
                     \vfil}%
                  \global\advance\rowcount by 1
                  \global\colcount=0}
\def\asc#1\ii{\calcnumber
              \vbox to \rowheight{\offinterlineskip
                     \vskip\topwhite
                     \hbox to \colwidth{\codefont
                                        \hskip\leftwhite
                                        \deccode\hfil}
                     \vfil
                     \hbox to \colwidth{\vrule width 0cm
                                               height 10pt depth 2pt
                                        \namefont
                                        \hfil#1\hfil}
                     \vfil
                     \hbox to \colwidth{\codefont
                                        \hskip\leftwhite
                                        \hexcode\hfil\octcode
                                        \hskip\rightwhite}
                     \vskip\botwhite}%
              \global\advance\colcount by 1}

%%%%%%%%%%%%%%%%% and now the table itself %%%%%%%%%%%%%%%%%%%%%%%%%
\vbox{
\halign{\fourbit#\fb&\fatline\asc#\ii&\thinline\asc#\ii&
                     \fatline\asc#\ii&\thinline\asc#\ii&
                     \fatline\asc#\ii&\thinline\asc#\ii&
                     \fatline\asc#\ii&\thinline\asc#\ii\fatline\cr
          \omit&\multispan8\titlefont ASCII CONTROL CODE CHART\hfil\cr
    \noalign{\vskip3mm \hrule}
          \omit\hfil\threebit{b7}{b6}{b5}
                 &\omit\fatline\threebit000&\omit\thinline\threebit001%
                 &\omit\fatline\threebit010&\omit\thinline\threebit011%
                 &\omit\fatline\threebit100&\omit\thinline\threebit101%
                 &\omit\fatline\threebit110&\omit\thinline\threebit111%
                                                 \fatline\cr
    \noalign{\vskip-.5mm} %brute force
          \omit\bithead
                 &\omit\fatline\comment{CONTROL}\span\omit
                 &\omit\fatline\dcomment{SYMBOLS}{NUMBERS}\span\omit
                 &\omit\fatline\comment{UPPER CASE}\span\omit
                 &\omit\fatline\comment{LOWER CASE}\span\omit\hfil\fatline \cr
    \noalign{\hrule}
      {} 0 0 0 0&NUL&DLE&SP     &0  &@  &P       &` &p  \cr   \noalign{\hrule}
      {} 0 0 0 1&SOH&DC1&!      &1  &A  &Q       &a &q  \cr   \noalign{\hrule}
      {} 0 0 1 0&STX&DC2&"      &2  &B  &R       &b &r  \cr   \noalign{\hrule}
      {} 0 0 1 1&ETX&DC3&\#     &3  &C  &S       &c &s  \cr   \noalign{\hrule}
      {} 0 1 0 0&EOT&DC4&\$     &4  &D  &T       &d &t  \cr   \noalign{\hrule}
      {} 0 1 0 1&ENQ&NAK&\%     &5  &E  &U       &e &u  \cr   \noalign{\hrule}
      {} 0 1 1 0&ACK&SYN&\&     &6  &F  &V       &f &v  \cr   \noalign{\hrule}
      {} 0 1 1 1&BEL&ETB&'      &7  &G  &W       &g &w  \cr   \noalign{\hrule}
      {} 1 0 0 0&BS &CAN&(      &8  &H  &X       &h &x  \cr   \noalign{\hrule}
      {} 1 0 0 1&HT &EM &)      &9  &I  &Y       &i &y  \cr   \noalign{\hrule}
      {} 1 0 1 0&LF &SUB&*      &:  &J  &Z       &j &z  \cr   \noalign{\hrule}
      {} 1 0 1 1&VT &ESC&+      &;  &K  &[       &k &$\{$\cr  \noalign{\hrule}
      {} 1 1 0 0&FF &FS &,      &$<$&L  &\\      &l &$|$ \cr  \noalign{\hrule}
      {} 1 1 0 1&CR &GS &$-$    &=  &M  &]       &m &$\}$\cr  \noalign{\hrule}
      {} 1 1 1 0&SO &RS &.      &$>$&N  &\~{}    &n &\c{}\cr  \noalign{\hrule}
      {} 1 1 1 1&SI &US &/      &?  &O  &\_$\!$\_&o &DEL\cr   \noalign{\hrule}
      \noalign{\vskip2mm}
          \omit&\omit\namefont \hfil LEGEND:\hfil \span\omit
          &\multispan4\vtop{\vskip-10pt
                            \hbox{\vrule
                                  \vbox to \rowheight{
                 \offinterlineskip
                 \hrule\vskip \topwhite
                 \hbox to \colwidth{\codefont\hskip\leftwhite
                                       dec\hfil}
                 \vfil
                 \hbox to \colwidth{\namefont\hfil CHAR\hfil}
                 \vfil
                 \hbox to \colwidth{\codefont\hskip\leftwhite
                                       hex\hfil oct
                                       \hskip\rightwhite}
                 \vskip\botwhite
                 \hrule                               }%
                                  \vrule}}
                      \hfil
          &\multispan2\bitfont realization: Victor\hfil\cr
          }
}
%%%%%%%%%%%%%%%%%%%%%%% and that's it folks! %%%%%%%%%%%%%%%%%%%%%%%%%%

\bye          %% PLAIN TeX
%\end{document} %% LaTeX

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Share and enjoy!

Victor Eijkhout                     Department of Mathematics
                                    University of Nijmegen
                                    Toernooiveld 5
  "Far out in the uncharted         6525 ED Nijmegen, the Netherlands
   backwaters of the unfash-
   ionable end of the               080-613169
   western spiral arm
   of the galaxy"                   u641000@HNYKUN11.BITNET

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

%%% Further information about the TeXhax Digest, the TeX
%%% Users Group, and the latest software versions is available
%%% in every tenth issue of the TeXhax Digest.
%%%
%%% Concerning subscriptions, address changes, unsubscribing:
%%%
%%%  BITNET: send a one-line mail message to LISTSERV@xxx
%%%         SUBSCRIBE TEX-L <your name>    % to subscribe
%%%      or UNSUBSCRIBE TEX-L
%%%
%%% Internet: send a similar one line mail message to
%%%           TeXhax-request@cs.washington.edu
%%% JANET users may choose to use
%%%           texhax-request@uk.ac.nsf
%%% All submissions to: TeXhax@cs.washington.edu
%%%
%%% Back issues available for FTPing as:
%%%          machine:              directory:  filename:
%%%   JUNE.CS.WASHINGTON.EDU         TeXhax/TeXhaxyy.nn
%%%              yy = last two digits of current year
%%%                       nn = issue number
%%%
%%%\bye
%%%

End of TeXhax Digest
**************************
-------