[comp.text] TeXhax Digest V89 #31

TeXhax@cs.washington.edu (TeXhax Digest) (05/02/89)

TeXhax Digest    Monday, April 3, 1989  Volume 89 : Issue 31

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:         

                        Clashing with plain TeX ?
                       Re: Disappearing l after fil
                         ... plus 1 fil L L L L L
                   TeX as a spelling check preprocessor
                      Re: TeX, LaTeX, AMS Abstracts
                           Query about AMS fonts
         Problem with script which generates CM fonts automatically
                              Re: fontdimen's
                     How do you do a font substitution
                          Needed: Acronym definition
        LaTeX: "New paragraph" at end of list when \parindent is zero
                           Re: Change bars in LaTeX
                        Concerning nested conditionals
                         Problem with headers in LaTeX
                    Saving diskspace on preloaded Unix TeXs
                     SAS generated PostScript files in TeX

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

Date: Sun, 2 Apr 89 10:51:28 PDT
From: iwm%doc.imperial.ac.uk@NSS.Cs.Ucl.AC.UK
Subject: Clashing with plain TeX ?
Keywords: TeX

I have been trying to format a large document produced by s2latex, the scribe
to LaTeX converter. This is not a complete converter, and in most cases I have
been able to work around incorrectly translated commands, adding \newcommands
and \newenvironments at the document head. A couple of these have produced
puzzling errors, which I guess to be due to clashes with Plain TeX or LaTeX 
internals: 
\newcommand{\endth}{{\bf endth}}
complains that \endth is already defined,  \renewcommand complains that it 
is NOT defined! Defining a command copy or an  environment group also seems to 
cause problems. Given the way LaTeX is implemented I cannot see how such 
problems can be avoided, ideally TeX would have a module facility to hide
plain TeX; perhaps \newcommand and \newenvironment could perform a little more
checking ?

Ian W Moor
  UUCP: uunet!mcvax!ukc!icdoc!iwm     
  ARPA: iwm@doc.ic.ac.uk
  JANET: iwm@uk.ac.ic.doc
           
 Department of Computing   We don't need no documentation,
 Imperial College.         We don't need no source control,
 180 Queensgate            No dark sarcasm in the boardroom,
 London SW7 UK.            Manager! leave those programmers alone!

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

Date: Mon 3 Apr 89 09:04:38-EDT
From: b beeton <BNB@SEED.AMS.COM>
Subject: Re: Disappearing l after fil
Keywords: TeX

victor eijkhout wonders why the "l" in "left" disappears in the
when it occurs in the expression "...1fil left...".
this condition even has its own entry in the texbook index:
"l after fil".  the first reference, page 271, contains the formal
definition of <fil unit> which shows how this is parsed.  the second
reference, page 337, in answer 27.4, deals with the broader range of
situations in which keywords (listed) follow certain glue or rule
specifications.  this is a well-documented, if not well-known feature.
						bb

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

Date: 3-APR-1989 19:01:38 GMT -01:00 (BST)
From: CHAA006%vaxa.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK
Subject:  ... plus 1 fil L L L L L
Keywords: TeX

Victor Eijkhout queried whether TeX should absorb the `L' of `Left'
in a construct such as

	\hskip 0 pt plus 1 fil Left or Right

It is clear from TeX: The program (\section 454) that Knuth intended
the `L' to be absorbed in just that way, but it's considerably less
clear to me exactly which WEB macro is quietly skipping over the
intervening space.  Perhaps a real `TeX: The program' afficionado will
reveal exactly where the space goes .....

					** Phil.

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

Date: Sun, 2 Apr 89 16:58:33 BST
From: spqr%electronics-and-computer-science.southampton.ac.uk@NSS.Cs.Ucl.AC.UK
Subject: TeX as a spelling check preprocessor
Keywords: TeX, spell checker

Graham Toal claim that the only complete `deTeXer' is TeX is very
fair, but his conclusion that we need a spelling checker which uses
the output from TeX is bizarre. I really cannot imagine a working
cycle of writing which involved putting my stuff through TeX to see if
it was spelt correctly! Why don't all the writers out there start
separating TeX the Typesetter from Writing With Markup? The vast
majority of people actually composing enough words to need the
spell chequer are surely better off having the checking done as they
write, in their editor, or in section-sized batches if they prefer,
and at the writing stage they should be using {\bf Generic Markup}!
I'd think poorly of someone who composed in raw TeX, but I'd admire
someone who wrote text marked with intentions, and later implemented
those intentions using TeX as a tool. And if you write `intentions' in
a disciplined way, it is trivial to filter them out for a spelling chekker.

Sebastian Rahtz, Computer Science, Southampton, UK

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

Date: Mon, 3 Apr 89 10:24:37 -0500
From: Jay H Beder <beder@csd4.milw.wisc.edu>
Subject: Re: TeX, LaTeX, AMS Abstracts
Keywords: TeX, LaTeX, AMS Abstracts

   Regarding John Taylor's note of 6 March 1989, a brief discussion comparing
TeX, LaTeX, and AMS-TeX can be found in the March 1989 Notices of the American
Mathematical Society, in the column by Jon Barwise.

   As to my own inquiry regarding the writing of AMS abstracts in TeX or
LaTex, an article will be appearing in the May-June AMS Notices on just this
topic.  Once can now fill out the entire AMS abstract form electronically using
TeX or AMS-TeX.  Details (and files) are available from Janene Winter
(jxw@math.ams.com).  LaTeX files are being developed, and may be available late
this summer.

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

Date: Mon, 3 Apr 89 10:27:23 EDT
From: gae@sphere.mast.ohio-state.edu (Gerald Edgar)
Subject: Query about AMS fonts
Keywords: AMS, fonts

I notice that in the TeX distribution, the new AMS Fonts only go up
to magstep 1 in the 300pk files.  (I am particularly interested in
the script characters, eusm10, at magstep 2.)  Why stop there?  The 200dpi
part has higher magsteps.

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

Date: Mon, 3 Apr 89 10:06:29 -0700
From: Tomas G. Rokicki <rokicki@polya.Stanford.EDU>
Subject: Problem with script which generates CM fonts automatically
Keywords: CM fonts, LaTeX

This recently came across texhax as a portion of a script to generate
Computer Modern fonts automatically.

; for font in circle10 circlew10 lasy10 lasy5 lasy7 lasyb10 line10 linew10
; do
; 	for magstep in 0 0.5 1 2 3 4 5
; 	do
; 		res=`magpk $magstep`
; 		echo "cmmf '\mode=localfont;' '\mag=magstep$magstep;' '\batchmode;' input $font"
; 		echo gftopk $font.${res}gf
; 		echo rm $font.${res}gf
; 	done
; done

Unfortunately, using MF with the cmbase preloaded on the LaTeX fonts
causes bad fonts to be generated.  For example, the line10 created
with cmbase has characters with an escapement of 0; without cmbase they
have the correct escapement values.  Since reading cmbase.tex is so
quick compared to actually generating fonts, there is no reason to
explicitly include or preload cmbase when generating fonts; it will
be read in if it is needed.

This leads to particularly subtle flaws, since the maxdrift algorithms
in the drivers will cause the output to be almost right, only off by
a few pixels---but it is very noticeable nonetheless.

I recommend everyone check their line10 font for 0 dx's (with pktype)
and completely regenerate their LaTeX fonts if found.

 tom

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

Date:  Mon, 03 Apr 89 10:56:40 CST
From: Don Hosek <U33297%UICVM.UIC.EDU@UWAVM.ACS.WASHINGTON.EDU>
Subject: Re: fontdimen's
Keywords: CM font, parameters

The answer to the non-linearities in the CM font parameters can be found
by looking at the MF source for the cmsy* files (see pp.~32-34 of Vol.E
of C&T).

THe parameters in question all use the number subs, which is defined as
s/d where s is the ptsize of super and subscripts and d is the design
size. Thus, we have the following values for subs for each design size:
5: 5/5
6: 5/6
7: 5/7
8: 6/8
9: 6/9
10: 7/10
Thus, while the final numbers may not be mathematically "pleasing", the
way to get there is kind of nice.

Note that this means that most of us are using incorrect values for those
parameters when we used a magnified cmsy unless we're also using magnified
fonts for subscripts (note for macro package designers: you can, if you
like override the values of font dimen's whenever you like).

 dh

 
         Don Hosek           Internet: U33297@UICVM.UIC.EDU
         3916 Elmwood        Bitnet: U33297@UICVM
         Stickney, IL 60402          DHOSEK@YMIR
         Work: 312-996-0658  UUNet: dhosek@jarthur.claremont.edu

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

Date: Thu, 30 Mar 89 12:05 EST
From: MANIERE%dsn.sdr.slb.com@RELAY.CS.NET
Subject: How do you do a font substitution
Keywords: fonts, TeX

I have the following problem. How can I substitute the Roman font that
  LaTeX is using as the main font by a Sans Serifs fonts. 
  I want to keep the latex functionality on size and bold format.
  and I would like the \large\bf to still give me a large bold format.
J.Maniere

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

Date: Thu, 30 Mar 89 15:54:35 PST
From: Paul E. McKenney <mckenney@spam.istc.sri.com>
Subject: Needed: Acronym definition
Keywords: macro, acronym

Could someone grant me enlightenment (or a macro definition) so that I
can do something like:

	\acronym{TLA}{three-letter acronym}

and then have the first subsequent instance of ``\TLA'' expand to:

	three-letter acronym (TLA)

and later instances simply expand to ``TLA''.  I would not expect this to
handle capitalized and pluralized variants correctly, but if it does,
so much the better!
				Thanx, Paul

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

Date: Sun,  2 APR 89 21:53:58 GMT
From: CCZDGR%VAXH.CCC.NOTTINGHAM.AC.UK@UWAVM.ACS.WASHINGTON.EDU
Subject: LaTeX: "New paragraph" at end of list when \parindent is zero
Keywords: LaTeX, paragraph

DESIGNS THAT DON'T INDENT PARAGRAPHS

LaTeX allows paragraphs to be distinguished by:
  indentation of the first line by \parindent
  vertical separation by \parskip.

The "standard" LaTeX styles (except letter) have \parskip as zero,
and \parindent nonzero.  However, many "reference manuals" these days seem to
distinguish paragraphs by a nonzero \parskip, with a zero \parindent.
For example, Digital Equipment Corporation does this.

LISTS

Suppose that one has a design that involves distinguishing paragraphs
by vertical space, rather than by indenting the first line.

Bearing in mind that "the primary function of design is to make the
document easier to read" and that "visual structure must reflect logical
structure", one still needs to distinguish between "list entirely within
paragraph" and "list at end of paragraph".  I.e., we should still have
"the text following a displayed paragraph environment beginning a new
paragraph if there is a blank line after the \end command" only, with
such designs, vertical space is needed to "begin a new paragraph" rather
than horizontal space.

PROBLEM

There is a problem with lists in such designs in that many such designs
have a lot of vertical space between list-items and around the list anyway
(e.g. in DEC manuals), which makes the reader's job of distinguishing
"list within paragraph" from "list at end of paragraph" difficult.

I've been trying to do a modification of Hubert Partl's REFMAN 0.1 option
(which gives output that is similar to the PostScript manuals) in such a
way as to get rid of the vertical space around and within lists, so as to make
it clear whether "text following the environment begins a new paragraph" or
not.  (REFMAN 0.1 does not redefine lists, so I'm starting from the original
Lamport definitions.)  So, in redefinitions of enumerate, etc., I set
      \topsep -\parskip \itemsep 0mm \parsep 0mm \listparindent 1em
to try to get rid of vertical space.  (Curiously, a design that starts
from the premise that there shouldn't normally be paragraph indentation
led me to set \listparindent nonzero as a convenient way of distinguishing
paragraphs within lists.)

This seems to work in getting rid of the vertical space around the list and
between the list items, so that the reader is ready to distinguish
"list within paragraph" from "list at end of paragraph" by checking whether
there is "a blank line" at the end of the list.

Unfortunately, whereas latex.tex meticulously keeps track of whether or
not a line after a list should be given the horizontal features that
mark "new paragraph", it doesn't seem to do the same with the vertical
features.  The relevant section seems to be that which defines @endparenv.

Thus all my lists come out looking like "lists within paragraphs" and I have
to resort to visual design (i.e. individual \vspace$\parskip commands)
to recover the distinction between the two logical cases.

SOLUTION?

I have an old latex.tex and a new one.  I find the older one easier to
understand and I assume that the new one usually acts like the old one
except (as the comment says) when a user has put a \noindent somewhere
inconvenient.  So I'll describe things in terms of the old one.
\@endparenv is defined to
    \addvspace$\@topsepadd
    ...
    everypar == BEGIN \hskip -\parindent ... END

Shouldn't it actually be doing something like
    \addvspace$\@topsepadd+\parskip
    ...
    everypar == BEGIN \hskip -\parindent \vskip -\parskip ... END
i.e. do for vertical paragraph-distinguishing space what it does for
horizontal pararaph-distinguishing space?  In the "standard styles",
\parskip is zero, so this would make no difference.  But in styles
(such as DEC's, the PostScript manuals, etc.) that have \parindent zero,
I assume that it would make the difference between whether "the text
following a displayed-paragraph environment appears to begin a new paragraph
or not if there is a blank line after the \end command".

In terms of the manual, it seems to be a question of whether one
violates "vertical space following the environment is the same as the one
preceding it" (page 114) or "text following a displayed-paragraph environment
begins a new paragraph if there is a blank line after the end command"
(page 165).  At the moment, it looks as though, in such designs, the
second proposition gets violated, but I think it might be better to have
a (minor) violation of the first proposition.  (The first proposition
would still be true for the standard styles where \parskip is zero.)

ANOTHER SOLUTION?

If the place to do this is not latex.tex, does anyone know of a neat way
of redefining environments like enumerate in such a way that an extra
\vspace$\parskip is done "if there is a blank line after the \end command".
LaTeX seems to "know" if there is such a blank line, but the bit of LaTeX
that "knows"  (latex.tex) seems a long way from the bit of LaTeX that
has to use the knowledge (a style-option file).

                                                                   David Rhead

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

Date: 31-MAR-1989 09:09:54 GMT
From: AJSCU%VAXA.STIR.AC.UK@UWAVM.ACS.WASHINGTON.EDU
Subject: Re: Change bars in LaTeX
Keywords: LaTeX, change bars

How do you do "sidelining" in LaTeX ? That is, place a vertical bar in
the left margin opposite text which has (for example) changed since
the last draft of the document.

Alistair Scolley,        ( AJSCU@VAXA.STIR.AC.UK )
Computer Unit,
University of Stirling,
Stirling,
Scotland FK9 4LA

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

Date: Mon, 3 Apr 89 10:40:20 PDT
From: Jim Boyce <jeb@lucid.com>
Subject: Concerning nested conditionals
Keywords: nested conditionals

We had this problem sometime ago in a somewhat different setting.  In the
source for the documentation of a set of related products, we have conditionals
\ifProductA, IfProductB, and so on.  We needed the macro

\ifor ProductA,ProductC,ProductE\endor % variable number of arguments
that expands to \iftrue iff the particular product is in the list and to 
\iffalse otherwise.

Our solution was (@ has been \catcoded to letter)

\newif\if@r
\let\endor\iftrue
\def\ifor #1\endor {\@rfalse \dothe@r #1,done,\if@r}
\def\dothe@r #1,{\csname if#1\endcsname\@rtrue\fi\dothe@r}
\def\ifdone \@rtrue\fi\dothe@r {}

The macro call gets scanned in one of two ways:
If it is normal scanning, then the macro generates \iftrue or \iffalse.
If it is skipping text, then the macro call is not expanded and the
delimiter in the arglist looks like \iftrue, so it can skip \else and \fi
properly.

In your setting, you don't have a natural set of arguments, so adding a
delimiter to fix scanning looks a little awkward, but it may be the easiest
solution.

 jim

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

Date: Thu, 30 Mar 89 13:42:25 est
From: jsv@cs.brown.edu
Subject: Problem with headers in LaTeX
Keywords: LaTeX, headers

Has anyone ever gotten the twoside alternating headers
to work in article document style (with twoside option) 
and headings page style in LaTeX?

I'm somewhat new to LaTeX; for the last nine years,
I've used my own macro package in TeX.
But from what the LaTeX manual says about marks, 
it should *definitely* be giving me alternating headers.
What I get using the headings page style
and the twoside option to the article document style
is the correct headers for even-numbered pages
but the headers for odd-numbered pages contain
only the page number and not the running section title.
The odd-numbered header should contain the title
of the most recent section or subsection.  Both
\section and \subsection are supposed to set the
appropriate mark.

Any help would be appreciated.  Thanks.
    Jeff Vitter (jsv@cs.brown.edu)

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

Date: Fri, 31 Mar 89 10:08:01 +0100
From: uunet!cs.ruu.nl!piet@entropy.ms (Piet van Oostrum)
Subject: Saving diskspace on preloaded Unix TeXs
Keywords: UNIX TeX, space

Preloaded (undumped) TeXs generally contain a lot of unused memory. On most
Unix systems this memory is set to all zero. Also most Unix systems have a
facility whereby zero filled blocks in a file can be `holes', i.e. they do
not occupy disk blocks. On our system this saves about 40% of the disk
space on a large TeX executable. Here is a C program to copy a file, so
that zero blocks in the copy will be holes. Note: ls -l will show the size
of the file as if all the bytes are present. You can only check the number
of disk blocks by asking the free space on the disk before and after the
copy (e.g. by the `df' command). The actual amount saved depends on the
blocksize of the filesystem.

%----------------------------------- cpz.c ------------------------------------
/* A program to copy a file, such that zero blocks will be `holes'
    Piet van Oostrum, Dept of Computer Science, University of Utrecht
    Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
    Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)
   Usage: cpz infile outfile
*/

#include <stdio.h>
#include <sys/file.h>

#define BL 256
#define BSIZ (BL * sizeof (long))

long buf[BL];

main(argc, argv)
int argc; char **argv;

{
    int i, n, count=0, in, out;
    char last;
    char *cbuf = (char *) buf;
    if (argc != 3) {fprintf (stderr, "Usage: %s in out\n", argv[0]); exit(1);}
    in = open(argv[1],O_RDONLY);
    if (in<0) {fprintf (stderr,"Can't open %s\n", argv[1]); exit(2);}
    out = creat(argv[2],0755);
    if (out<0) {fprintf (stderr,"Can't open %s\n", argv[2]); exit(3);}

    while ((n=read (in, buf, BSIZ))>0) {
	last = cbuf[n-1];
	i = 0;
	if (n == BSIZ)
	    while (i<BL && buf[i]==0) i++;
	if (i==BL) {
	    lseek (out, BSIZ, 1);
	    count++;
	} else {
	    if (write (out, buf, n) != n) {
		fprintf (stderr, "Error writing %s\n", argv[2]); exit(5);
	    }
	}
    }
    if (n==0 && last=='\0') {
	lseek (out, -1, 1);
	if (write (out, &last, 1) != 1) {
	    fprintf (stderr, "Error writing %s\n", argv[2]); exit(6);
	}
    }
    if (n<0) {fprintf (stderr, "Error reading %s\n", argv[1]); exit(4);}
    fprintf (stderr, "Tried to suppress %d KB of zeroes\n",count*BSIZ/1024);
    exit(0);
}

Piet van Oostrum, Dept of Computer Science, University of Utrecht
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)

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

Date: Fri, 31 Mar 89 20:02 +0100
From: "Network Research Group, AU" <ECOMAIL@vms2.uni-c.dk>
Subject: SAS generated PostScript files in TeX
Keywords: PostScript, TeX

Here at our node (VAX/VMS 5.0) we have - at last - installed SAS 5.18.
Hence, we are very interested in using SAS/Graph  generated PostScript
files in our TeX documents, when the DeVice Independent files are
transleted to PostScript using DVIlaser from ArborText, Inc.
 
In their DVILASER/PS user manual some advice is given as to insert
PostScript graphs into TeX documents, but somehow the `PrintChart'
procedure produces an error.
 
Therefore we would like to ask if any of you have TeX macros designed
especially for incorporating SAS Graph (and other related) output 
files into DVIlaser documents.
 
Sincerely,

 Gustav Jeppesen &  Per Nikolaj D. Bukh         

 Network Research Group, Department of Economics      
 University of Aarhus, Denmark

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

%%% 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
%%%
%%% Concerning subscriptions, address changes, unsubscribing:
%%%  BITNET: send a one-line mail message to LISTSERV@UWAVM
%%%         SUBSCRIBE TEXHAX <your name>    % to subscribe
%%%      or UNSUBSCRIBE TEXHAX <your name>
%%%
%%%  All others: send a similar one line mail message to
%%%           TeXhax-request@cs.washington.edu
%%%     Please be sure you send a valid internet address!!
%%%        in the form name@domain or name%routing@domain
%%%     and use the style of the Bitnet one-line message, so that
%%%     we can find your subscription request easily.
%%%
%%% 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
%%%
%%% For further information about TeX Users Group services and publications
%%%  contact Karen at KLB@SEED.AMS.COM or write to TUG at
%%%   TeX Users Group
%%%   P.O. Box 9506
%%%   Providence, R.I. 02940-9506
%%%   Telephone      (401) 751-7760
%%%
%%% Current versions of the software now in general distribution:
%%%    TeX       2.95 (2.98 coming)    metafont  1.7
%%%    plain.tex 2.94                  plain.mf  1.7
%%%    LaTeX     2.09 ( 8/10/88)       cmbase.mf see cm85.bug
%%%    SliTeX    2.09                  gftodvi   1.7
%%%    tangle    2.9                   gftopk    1.4 
%%%    weave     2.9                   gftype    2.2
%%%    dvitype   2.9                   pktype    2.2 
%%%    pltotf    2.3                   pktogf    1.0
%%%    tftopl    2.5                   mft       0.3
%%%    BibTeX    0.99c                 
%%%    AmSTeX    1.1d
%%%\bye
%%%

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