TeXhax Digest   Tuesday, February 23, 1988   Volume 88 : Issue 19
                      [SCORE.STANFORD.EDU]<TEX.TEXHAX>TEXHAX19.88

Editor: Malcolm Brown

Today's Topics:

                             under-tilde
              Re: Search paths (font files) for drivers
                         Re: file extensions
    Request for fonts for the Addison-Wesley Epson printer driver.
                            Icelandic TeX
                           DVIDIS on BITNET
                         Footnote rule macro
         Re: Flame of the week: Unix-style command interfaces
              PCWRITEX conversion driver PC-WRITE==>TeX
                       Drop initials for LaTeX
                          Bradfield comment
               LaTeX version numbers:  statis thereof.
                      multiplying cmssdc10 by 4
                   Re: Dynamic \parskip computation

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

Date:     18-FEB-1988 08:37:36 GMT
From: FPS%VAXA.CC.IMPERIAL.AC.UK@forsythe.stanford.edu
Subject: under-tilde

under-tilde:
this is all rather embarassing. the following code will
do an undertilde, and remains robust under a variety of
conditions (like superscripting etc). however, i suspect
\mathchoice was a sledgehammer approach. using \mathpalette
i couldn't get the spacings right, but maybe i should
go back and give it another whirl. incidentally, without
the sterling preview capabilities of TeXtures this would have
been a nightmare:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ut#1,\mathchoice
%displaystyle
  ,\vtop,\ialign,##\crcr
  $\hfil\displaystyle,#1-\hfil$\crcr\noalign
  ,\nointerlineskip\vskip1pt-
  $\hfil\displaystyle\char'176\hfil$\crcr---
%textstyle
  ,\smash
  ,\vtop,\ialign,##\crcr
  $\hfil\textstyle,#1-\hfil$\crcr\noalign
  ,\nointerlineskip\vskip1pt-
  $\hfil\textstyle\char'176\hfil$\crcr---
  ,\textstyle\vphantom,#1---
%scriptstyle
  ,\vtop,\ialign,##\crcr
  $\hfil\scriptstyle,#1-\hfil$\crcr\noalign
  ,\nointerlineskip\vskip0.7pt-
  $\scriptstyle\hfil\char'176\hfil$\crcr---
%scriptscriptstyle
  ,\vtop,\ialign,##\crcr
  $\hfil\scriptscriptstyle,#1-\hfil$\crcr
  \noalign,\nointerlineskip\vskip0.5pt-
  $\scriptscriptstyle\hfil\char'176\hfil$\crcr----
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  testing, testing                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$$\ut,\bf X-\ut,1-\ut,\bf\Phi-abcaN,\ut,\aleph--b_,\ut,Q-_,\ut,.---$$
$$\ut,\oldstyle7-\ut,\cal A-$$
or even something ordinary $\ut,\alpha+\beta-$ but what happens in
text mode when we go on and on and on long enough to complete at least
two lines, will
the baselines be the proper width apart,
or will they have a bit extra added
because of this tilde?
$$\ut,\alpha+\beta\times\gamma-$$
\end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
malcolm clark  aka  texline@uk.ac.ic.cc.vaxa    (janet)

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

Date:    Wed Feb 17 15:05:28 MET 1988
From: XITIJSCH%DDATHD21.BITNET@forsythe.stanford.edu
Subject: Re: Search paths (font files) for drivers

Please excuse the late reaction but we had some drop outs
in our TeXhax delivery.

Stephan Bechtolsheimer writes

    Does anybody have string feelings for search paths for fonts files of
    drivers? There are two extremes: one is to use the environment variable
    TEXFONTS as TeX does, the other extreme is use separate search paths like
    TEX_PK, TEX_GF, TEX_PXL.

In our drivers we have choosen a third possibility because we
think that both solutions are not adequate.  TeX uses only one
area because for all output devices the font metrics should
be the same.  (Minor differences as in the gray fonts are an
other subject.)  But for each printing engine there will be a
different set of fonts.  Character outlines and descriptions
in those font files (be it GF, PK or PXL format) for one device
should not differ because they should all be created from the
GF file.  (Converting PK files to PXL files with PKtoPX and
back with PXtoPK can yield a new font with different horizontal
escapements --- this is especially true for the cm font family.)

So I would propose to distinguish the output devices but not
the font formats.  This will yield, e.g., to path names like
RICOH_FONT, IMAGEN_FONT, etc.  The formats can be indicated
by a suffix (but only for the human --- device drivers should
ignore the suffix and should {\it only\/} look at the magic
two or four bytes at the beginning of the font file).

                        Joachim


   TH Darmstadt
   Institut f\"ur Theoretische Informatik
   Joachim Schrod
   Alexanderstr. 24            Bitnet: XITIJSCH@DDATHD21
                                  (Please try again if I don't answer ---
   D-6100 Darmstadt               our Bitnet connection is very instable...)
   West Germany

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

Date:    Wed Feb 17 14:51:31 MET 1988
From: XITIJSCH%DDATHD21.BITNET@forsythe.stanford.edu
Subject: Re: file extensions

John Ramsdell wanted other suffixes than `.tex' for
input files (TeXhax #7/8) and Eric Berg has answered
that this is impossible because the file type is
``hardcoded'' (TeXhax #14).

Please note that the statement of Eric Berg
        [...] a different .FMT file by itself can't change
        the default file type [...]
is wrong. The file type is a WEB string, i.e. a preprocessed
string (see section 537 in TeX and remember that each
preprocessed string is written once to the string pool file),
and is written into TEX.POOL by TANGLE.  TEX.POOL
is read by INITeX and \dump'ed to the .FMT file --- therefore
TeX knows about the default file suffixes from the .FMT file.

So if you want different suffixes just keep several copies of
TEX.POOL for each macro package and edit each copy (yes, search
for `.tex' and don't forget to alter the length designator
in front of the line).  The different macro packages will have
different file default suffixes after this.
The same procedure can be used to alter the default input search
area (TeXINPUTS) --- this enables the possibility to locate
input files like style files for each macro package in an other
area. (At least, in most TeX implementations.)

But if you choose other file suffixes, don't make the extensions
longer than three letters --- many systems (notably the PC's)
don't allow more and file exchange will be unnecessarily difficult.
(I.e., use `.cwb' instead of `.cweb'!)

                                Joachim Schrod
   TH Darmstadt
   Institut f\"ur Theoretische Informatik
   Joachim Schrod
   Alexanderstr. 24            Bitnet: XITIJSCH@DDATHD21
                                  (Please try again if I don't answer ---
   D-6100 Darmstadt               our Bitnet connection is very instable...)
   West Germany

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

Date:         Thu, 18 Feb 88 14:58:31 IST
From: "Jacques J. Goldberg" <PHR00JG%TECHNION.BITNET@forsythe.stanford.edu>
Subject:      Request for fonts for the Addison-Wesley Epson printer driver.

Mark,
1. Quick solution to get them at 240dpi only: purchase the PC TeX Epson driver.
It has CM fonts, and many more varieties than the MicroTeX package driver.
However, no 120dpi for fast draft quality. They come PXL but PXL-EPF loves them

2. See TUG, may have what you need on stock, at least in PXL format.

3. If you still consider do-it-yourself, well, breathe in and read this:

To make them is a real pain, for several reasons, not only the CPU cost.

I have done that. The question is, how to ship them ?
I have run Metafont for all Computer Modern fonts at 240dpi and 120dpi,
at magsteps 0,1/2,1,2,3,4. This has taken 18 hours (yes) of IBM-3081D cpu.
I had contemplated doing it on a VMS VAX785 : that would have taken about
120 hours of CPU.
Then I turned GF into PXL files, on the mainframe. Then I downloaded the files
to a PC at 9600 bauds, it took only approximately 48 hours. Then I had to strip
off the trailing zeroes at the end of the TFM and PXL files which IBM's VM
(and DEC's VMS) pad to make fixed size blocks. Then I had to PXL->EPF all the
files with the Addison-Wesley (MicroTeX) utility (PXL-EPF) to make the EPF
files. On my way I had to discover that Metafont's aspect ratio parameter
should NOT be changed from 9/10 when going from 240dpi to 120dpi (unadvertized
in the DOTPRNT documentation).
If I hadn't purchased PersonalReXX before, I might still be busy typing
commands: mind you, 85 files times 12 subdirectories.

This was to make you aware, in case you were not, that Metafont CPU hours are
not the end of it.

Now if YOU, or for that matter anybody else still bound to the poor AM* fonts
libraries distributed with MicroTeX, want those fonts, what is your suggestion
about how to ship them ? That's about 50x360kb diskettes if in backup format
with one backup per directory, or that's about 15 PS2 3inch1/2 diskettes.
If I send you a magnetic tape, will you want to load it to your mainframe and
then download with KERMIT ( which I used) or a similar file transfer utility?
If any of those solutions makes sense for you, will a request for a $150
contribution sound exaggerate, to purchase the media and cover duplications
costs and air mail ? (needless to say, check to my university, not personal
to me, with receipt) .

And what's going to happen to me if more people ask for that? Will I turn from
being a Physics Prof. into a diskette duplicator ? Or should I consider
shipping prerecorded hard disks anyway ? (this stuff takes up 1/2 at least of
my 32MB hard disk on my self assembled machine, not an IBM of course).

                                                       Jacques

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

Date: Wed, 17 Feb 88 18:02 EST
From: Armann Ingolfsson <V999Q8BX%UBVMS.BITNET@forsythe.stanford.edu>
Subject: Icelandic TeX

I recently read an article in the TeXhax Digest in which the
author refered to an Icelandic version of TeX.  I could
not find any mention of the Icelandic version of TeX in
the issues of the TeXhax digest stored at this university
(SUNY at Buffalo) at the time.   What is the best way
for me to obtain information about this version of
TeX?

Thanks,

'Armann Ing'olfsson.

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

Date: Wed, 17 Feb 88 17:03 EST
From: "Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU)"
Subject: DVIDIS on BITNET

In a recent issue of TeXhax (V88 #15), Niels Walet asks whether there is any
way to receive my DVIDIS previewer for VAXStations on BITNET.  This jogged my
memory, and I realized that I had forgotten to forward the following message
I received, many weeks ago, from a kind soul who, in return for my getting the
stuff out to him, has offered to provide it to other BITNET sites:

	Date: 6 Jan 88 12:59 +0800
	From: Ed Sternin <edik%nmr.physics.ubc.cdn%ubc.csnet@RELAY.CS.NET>
	Subject: RE: DVIDIS files
	To: "Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU)" <LEICHTER@VENUS>

	I would be most happy to serve as a supplier of these files to BITNET
	world.  Those able to understand NETDATA encoding of binary files
	should send their requests to

			useredik@ubcmtsg.bitnet

	Those capable of accepting EAN files (which always travel AS IS,
	whether ascii or binary), send requests to

			edik@nmr.physics.ubc.cdn

	For now only by special arrangement, but this may change soon (I am
	trying  to convince someone at TRIUMF to give the files a permanent
	home), VMSDUMP files can be mailed via BITNET.  Send requests to the
	second address above.

Please be kind to Ed; he's probably decided that serving as a source is pretty
easy - no requests on 6 weeks, right?
							-- Jerry

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

Date: Thu, 18 Feb 88 15:24:28 EST
From: dow@wjh12.harvard.edu (Dominik Wujastyk)
Subject: Footnote rule macro

A colleague of mine, Prof. Gary Tubb, is using TeX to set the next volume
of the Harvard Oriental Series, of which he is the editor.  He is required
to make the volume comply with the style of previous volumes in the series,
and the following macro was written in the course of doing this.  Since Gary 
is not yet on the net, he is submitting this through me.
----------------------------------- cut here --------------------------------
%  *  The plain TeX format places a footnote rule above the
%  *  footnotes on each page.  It may be omitted by changing the
%  *  height of \footnoterule to 0pt.  But traditional book
%  *  design often calls for the use of such a rule only above a
%  *  continuation of a footnote broken on the previous page.
%  *  Using a variation of a "the dirtiest trick of all"
%  *  described on page 400 of The TeXbook, the following code
%  *  adds to the plain.tex format so as to prevent the footnote
%  *  rule when notes are printed, except when the previous page
%  *  contains footnote material with no completed footnote in
%  *  its last line.
%  *
%  *  First a strut that will be 1sp deeper than the normal strut
%  *  (and thus significant to TeX but invisible to the human
%  *  eye) is provided, to be placed at the end of each completed
%  *  footnote:

\newdimen\fnendstrutdepth
   \fnendstrutdepth=\dp\strutbox
   \advance\fnendstrutdepth by 1sp
\newbox\fnendstrutbox
   \def\fnendstrut{\unhcopy\fnendstrutbox}
   \setbox\fnendstrutbox=\hbox{\vrule
      height\ht\strutbox
      depth\fnendstrutdepth width0pt}
%
%  *  Then a portion of the footnote commands in plain.tex is
%  *  redone with two changes, so that the strut is placed after
%  *  each completed note and may appear in the last line of
%  *  footnote material on a page:
%
\catcode`\@=11
\def\vfootnote#1{\insert\footins\bgroup
   \interlinepenalty=\interfootnotelinepenalty
   \splittopskip=\ht\strutbox
   \splitmaxdepth=\fnendstrutdepth    % * This is one change.
   \floatingpenalty=20000
   \leftskip=0pt \rightskip=0pt
   \spaceskip=0pt \xspaceskip=0pt
   \textindent{#1}\footstrut
   \futurelet\next\fo@t}
\def\@foot{\fnendstrut\egroup}        % * This is the other.
\catcode`\@=12
%
%  *  Next a new condition is provided, for checking to see
%  *  whether the footnote material on the previous page ended
%  *  with the special strut, and thus with a completed footnote:
%
\newif\ifbrokennote
%
%  *  Finally, the definition of \pagecontents is redone by
%  *  surrounding the command for printing the footnote rule with
%  *  a check and reset of this new condition:
%
\catcode`\@=11
\def\pagecontents{\ifvoid\topins\else\unvbox\topins\fi
  \dimen@=\dp255 \unvbox255
  \ifvoid\footins\else
    \vskip\skip\footins
    \ifbrokennote\footnoterule\fi     % * These lines replace the
    \ifdim\dp\footins=\fnendstrutdepth% * command \footnoterule
      \global\brokennotefalse         % * in the original version
      \else\global\brokennotetrue\fi  % * of plain.tex.
    \unvbox\footins\fi
  \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
\catcode`\@=12
%
%  *  NB: This approach assumes that each footnote begins on a
%  *  new line.  If the plain.tex format has been enhanced to
%  *  allow short footnotes to be printed continuously or in
%  *  columns, the last line of footnote material on a page may
%  *  contain a completed footnote, even if the final note is
%  *  continued on the following page.
%  *
%  *
%  *  Gary Tubb,
%  *  Assoc. Professor of the Humanities (Sanskrit),
%  *  Harvard.
%  *
%  *  Snail: Quincy House #100,
%  *  Cambridge, MA 02138.
%  *
%  *  E-mail c/o Dominik Wujastyk
%  *  Internet: dow@wjh12.harvard.edu
%  *  Bitnet:   dow@harvunxw.bitnet
%  *  uucp:     ...!ihnp4!wjh12!dow
%  *  

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

Date: Thu, 18 Feb 88 11:04:53 PST
From: <David_Osborne%VAXA.NOTT.AC.UK@forsythe.stanford.edu>
Subject: Re: Flame of the week: Unix-style command interfaces

Don Hosek <DHOSEK%YMIR.BITNET@forsythe.stanford.edu> writes in
TeXhax V88#17 deprecating use of Unix-style command interfaces...

> Why don't I like Unix-style interfaces? Because I'm not on a unix system!
> ... Writing in C is not a sufficient excuse.

He has a point in that Unix-style option letters don't sit comfortably
beside the other commands on a non-Unix system with a well-defined way
of setting command options, such as VMS.

Looking at VMS in particular, there is another advantage in using the
``standard'' method, in that the command-definition language which is
used to define command qualifiers also allows sophisticated checking of
qualifiers and their parameters to be performed.  All this happens
*without* loading the executable image, since it's done in the command
interpreter, so a bad qualifier or parameter is reported to the user
before the program runs.  Unix-style C programs which use minus-flagged
options letters have to do their own checking at run-time, independently
of the operating system.

I'm a user of both Unix and VMS, implementing TeX and its supporting
software on both systems, so I can see both sides of the argument, but I
think VMS scores here in consistency and utility.  I'd say that programs
running under VMS should use these facilities where possible, but how do
developers of portable software feel about this?  I know that Nelson
Beebe, for example, argues in the implementation details for his driver
software on using Unix-style consistently across different systems.

Dave.

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

Date: Thu, 18 Feb 88 16:28 GMT
From: Peter Flynn UCC <CBTS8001%IRUCCVAX.UCC.IE@forsythe.stanford.edu>
Subject: PCWRITEX conversion driver PC-WRITE==>TeX

For those using (or with users using) the PC-WRITE editor/wordprocessor on
PCs, I have developed an interface to TeX which retains most (not all) of their
formatting and typeface attributes.

This means people with documents written using PC-WRITE's wordprocessing
facilities can export their document (assumed  to be a .DOC file) into a .TEX
file direct. The final cleanup is thus minimised and avoids tedious
repeat-replaces and hunting for obscure characters. All the IBM PC character
set is represented, excluding the line-drawing characters (I could add these,
in \tt form, for use in \verbatim mode, I guess).

The distribution file is a UUEncoded .ARC file of 108Kb containing:

     READ.ME          instructions
     PR.DOC           PC-WRITE print driver definitions
     PCWRITEX.DOC     documentation file
     PCWSTY.TEX       TeX file of redefinitions
     PCWRITEX.TEX     documentation after running thru the driver
     PCWRITEX.DVI     TeX output of documentation
     PCWRITEX.HP      HPLJ printable documentation

I can mail this to anyone who wants it, but I would prefer if some kindhearted
moderator would stick it up on a server somewhere. For those on BITNET VAXen,
I can send/file/vmsdump the .ARC, which is smaller; for those with Colour Book
FTP (ie JANET and HEANET), the file is VAX1.UCC.IE::DB0:[FTP]PCWRITEX.ARC
(uid FTP, psw FTP).

I cannot claim it is 100% bugfree, and I do not have the time to provide full
support, but anyone is free to modify it how they wish. A copy has also been
sent to Kevin White (kevinw@bytecosy) on BIX for the IBM.ARC area.

Peter Flynn
<cbts8001@vax1.ucc.ie>
<cbts8001@iruccvax.bitnet>

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

Date: Thu, 18 Feb 88 16:19:39 EST
From: dow@wjh12.harvard.edu (Dominik Wujastyk)
Subject: Drop initials for LaTeX

I have made small modifications to David Cantor's macro for making a drop
initial (or initials) at the start of a paragraph, in order to make the 
macro work easily in the LaTeX environment.  The files DROP.DOC and DROP.STY
which contain these modifications have been sent to Ken Yap's LaTeX style
repository at Rochester.
Dominik Wujastyk
bitnet:	 user DOW on the bitnet node HARVUNXW
arpanet: dow@wjh12.harvard.edu
csnet:   dow@wjh12.harvard.edu
uucp:    ...!ihnp4!wjh12!dow

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

Date:         Thu, 18 Feb 88 12:28:38 EST
From: Steve Campbell  <SLC%NCSUMATH.BITNET@forsythe.stanford.edu>
Subject:      Bradfield comment

I also thought the Lamport comment unreasonably critical for the following
reason.  I write scientific papers using LaTex.  I have no desire to hack any-
thing and would be happy with the style.  However, I often have to produce
camera ready copy for conference proceedings with a style specified by the
conference organizers or their publishers.  If I do not follow the style, my
paper may not be included.  Questions of greater beauty are irrelevant in this
case.
                                   Steve Campbell

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

Date: Thu, 18 Feb 88 15:47 CST
From: "John L. Huxtable" <HUXTABLE@kuhub.ukans.edu>
Subject: LaTeX version numbers:  statis thereof.

    I am concerned about the way LaTeX is updated.  Dr. Lamport seems
to feel it is sufficient to change the date printed by the program
when he makes changes.  Most people (Dr. Knuth apparently included)
find it reasonable to change the version number as well.  In general,
people do not remember dates---they remember version numbers, and few
enough of those.
    What justification is there for keeping the version number at 2.09
when the source has changed many times?

John L. Huxtable
The University of Kansas
huxtable@ukanvax.bitnet		(Now)
huxtable@kuhub.ukans.edu	(Someday?)

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

Date: Thu, 18 Feb 88 15:17:22 EST
From: "Karl Berry." <karl%umb.edu@RELAY.CS.NET>
Subject: multiplying cmssdc10 by 4

is not a good idea. I doubt that the resulting file will even make
it through Metafont, let alone produce decent characters.

As I think has been mentioned before, John Sauter at DEC has produced
Metafont files that interpolate between Knuth's values for the
parameters. Therefore, you can make any point size Computer Modern
font you like, and the type looks better than magnification.
The difference between, say, Sauter's cmr11 and cmr10 scaled \magstephalf
is noticeable, perhaps even if you haven't had type design training.

He also has VMS command files to help the development, and I have
similar ones for Unix. But all the real work is done in Metafont,
so his work shouldn't be any more operating system dependent
than Metafont itself.

Karl.
karl@umb.edu

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

Date:         Thu, 18 Feb 88 15:54:07 CST
From: "Thomas J. Reid" <X066TR%TAMVM1.BITNET@forsythe.stanford.edu>
Subject:      Re: Dynamic \parskip computation

Stephen V. Bechtolsheim asked (in TeXhax 88 # 17) about using \everypar
to call a macro to set the \parskip glue to be placed before the paragraph.
As he points out, the paragraph has already been started by the time
the \everypar token list gets expanded.  The solution is to "back-out"
the paragraph, set \parskip, then restart the paragraph.  One condition
which requires special attention is that the paragraph may have been
started using \noindent.  This fact needs to be noted so that when the
paragraph is restarted, the normal \parindent glue is not added.

The remainder of this note contains the needed \everypar token list
as well as some testing macros.

Tom Reid

% Test for response to Stephen v. Bechtolsheim's TeXhax note
% about having a "\ComputeParSkip" call to compute the \parskip
% to be placed before each paragraph.

\newcount\parcount \parcount=0

% Define a simple \ComputeParSkip macro that cycles the \parskip glue
% from 6pt to 36pt by 6pt intervals.  A small amount of stretch and
% shrink are included to prevent overfull/underfull vboxes.

\def\ComputeParSkip{\global\advance\parcount by 6
   \ifnum\parcount>36 \global\parcount=6 \fi
   \parskip=\parcount pt plus 1pt minus 1pt }

% Save the old \everypar token list.

\edef\oldeverypar{\the\everypar}

% Define the new \everypar token list incorporating the old list.
% First, set the default ("outer level") \parskip to 0pt.

\parskip=0pt

\everypar={\oldeverypar
   {\everypar={\relax}\setbox0=\lastbox
    \parindent=\wd0 \ComputeParSkip
    \par \leavevmode}}

% Detailed Description of New \everypar:
%
% The function of this token list is to "back-out" the paragraph, set the
% new \parskip glue (using \ComputeParSkip), then restart the paragraph.
% The detailed function of each step follows:
%
% \oldeverypar..........Execute the token in the original \everypar token
%    list.
%
% {.....................Start a new group to localize the effect of the
%    commands which follow.
%
% \everypar={\relax}....Temporarily (since we're in a local group)
%    redefine \everypar to prevent endless recursion of the previous
%    \everypar token list.
%
% \setbox0=\lastbox.....Place the last hbox in \box0.  At the time that
%    \everypar is executed, the "last" box is the paragraph indent glue
%    that started the paragraph.  This may be the value of \parindent
%    if the paragraph was started in the normal way, or it may be a box
%    0pt wide if the paragraph was started with \noindent. Execution of
%    \lastbox also causes the previous hbox to be removed from the
%    current horizontal list.
%
% \parindent=\wd0.......Assign the width of the paragraph indent box
%    to \parindent.
%
% \ComputeParSkip.......Call a macro to compute and same the desired
%    paragraph skip in \parskip.  Note that this macro is called from
%    within an inner group, so some of its functions may have to be
%    made global (hence the \global\advance in the sample macro above).
%    However, the assignment of \parskip must NOT be made global: the
%    value of \parskip at the outer level must remain to be 0pt.
%
% \par..................This ends the "just-begun" paragraph.  Since
%    \lastbox removed the paragraph indent glue from the horizontal
%    list, the only remaining trace that a paragraph existed is the
%    \parskip glue that was in effect at the outer level. This will
%    be a skip of 0pt.
%
% \leavevmode...........Restart the paragraph using the temporary
%    \parskip and \parindent.  This effectively restarts the paragraph
%    using the original paragraph indentation and the newly computed
%    \parskip.

% }.....................End the inner group and restore \parskip to 0pt
%    and \parindent to its original value.

% --------------------------------------------------------------------

% Define some handy-dandy random text generating macros.  For more
% information on these, see "Floating figures at the right, and
% Some random text for testing" (TUGboat Vol. 8 No. 3 pp. 315--320).

% Note:  The macros have been modified so that a blank is not output
%        before the first word of a sentence.

\newcount\rndnum \newcount\rndval \newcount\rndtemp \rndnum=0

\def\rnd{\global\multiply\rndnum by 371 \global\advance\rndnum by 1
   \ifnum\rndnum>99999 \rndtemp=\rndnum \divide\rndtemp by 100000
      \multiply\rndtemp by 100000 \global\advance\rndnum by -\rndtemp
   \fi \global\rndval=\rndnum \global\divide\rndval by 1000 \relax}

\newcount\ns \newcount\nw \newcount\nc \newcount\np \newcount\ASCII

\def\randompar{\rnd \ns=\rndval \divide\ns by 10\advance\ns by 3
   \loop \ifnum\ns>0 {\randomsent}. \advance\ns by -1 \repeat}

\newif\ifsos % Flag for "start of sentence."

\def\randomsent{\rnd \nw=\rndval \divide\nw by 7 \advance\nw by 5 \ASCII="41
   \sostrue \loop \ifnum\nw>0 \ifsos \sosfalse \else \ \fi
      {\randomword}\advance\nw by -1 \repeat}

\def\randomword{\rnd \nc=\rndval \divide\nc by 15 \advance\nc by 2
   \loop \ifnum\nc>0 {\randomchar}\advance\nc by -1 \repeat}

\def\randomchar{\rnd \multiply\rndval by 29 \divide\rndval by 100
   \ifnum\rndval=26 \rndval=0 \fi \ifnum\rndval>26 \rndval=4 \fi
   \advance\rndval by \ASCII \char\rndval \global\ASCII="61}


% Using the current time in minutes since midnight, skip a variable
% number (0 to 99) of pseudo-random numbers.  This way, the job
% stands a good chance of being different every time it is run.

\np=\time \ns=\np \divide\ns by 100 \multiply\ns by 100 \advance\np by -\ns
\loop \ifnum\np>0 \rnd \advance\np by -1 \repeat

\noindent \randompar % Generate a non-indented paragraph.

% Generate 20 to 29 paragraphs of "text."
\rnd \np=\rndval \divide\np by 10 \advance\np by 20
\def\dopar{\par}
\loop \ifnum\np>0 \dopar {\randompar}\advance\np by -1 \repeat

\noindent \randompar % Generate another non-indented paragraph.

\bye % Thomas Reid / Texas A&M University / Computing Services Center

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

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