[comp.text] TeXhax Volume 88, Number 47

bts@sas.UUCP (Brian T. Schellenberger) (05/23/88)

TeXhax Digest   Wednesday, May 18, 1988   Volume 88 : Issue 47
                   [SCORE.STANFORD.EDU]<TEX.TEXHAX>TEXHAX47.88

Moderator: Malcolm Brown

Today's Topics:

                 Zero TFM checksums (TeXhax #41,#43)
                  Bibtex 0.99c change file for web2c
                     Re: overfull citation labels
                 Beta test dvi2ps with psfig support.
                  Translating Mac PostScript to TeX?
                Needed: Include-facility for dvi-files
                    Need help about slide making.
                  how to make TeX on Gould machines
                       Lamport's recent answers
         Problem creating suitable TEX fonts for LN03R on VMS
              Subject cross-referencing BibTeX databases
                    On what systems will TIB run?
                       overfull citation labels
        MicroTeX, '386, and expanded memory problem & solution
             Increasing TeX Memory for PiCTeX with LaTeX
              CM font conversion from 88dpi -> 300dpi ?
         Re: "Standard" collection of CM fonts [long message]
                           Signed halfwords

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


Date: Mon, 9 May 88 09:35:57 PDT
From: mackay@june.cs.washington.edu (Pierre MacKay)
Subject: Zero TFM checksums (TeXhax #41,#43)

Chris Thompson's points are all well taken, and I am delighted with the
recipe for a 0 checksum font.  

The Zero checksum provision will probably remain a part of the standard
description of the way TeX and drivers interact, even though there is
some cogency in the arguments he presented.  

I hasten to reassure everybody that no 0 checksums are in the present lot
of rebuilt fonts (which reflect several small corrections over the past year 
or so) nor will there be any in the future.  That was a response to a
period when cm was still in a fluid state.  


Email:  mackay@june.cs.washington.edu		Pierre A. MacKay
Smail:  Northwest Computing Support Group	TUG Site Coordinator for
	Lewis Hall, Mail Stop DW10		Unix-flavored TeX
	University of Washington
	Seattle, WA 98195
	(206) 543-6259

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

Date:     Mon,  9 May 88 12:41:24 CDT
From: William LeFebvre <phil@rice.edu>
Subject:  Bibtex 0.99c change file for web2c

Does there yet exist a change file for bibtex.web (0.99c) that can be
used to generate a pascal program suitable for input to web2c?  (How's
that for a lengthy question?).  If so, where can I get ahold of it?  If
not, I guess I'll start looking into how to write one.  Thanks!

			William LeFebvre
			Department of Computer Science
			Rice University
			<phil@Rice.edu>

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

Date: Mon, 9 May 88 12:06:46 EDT
From: Ram-Ashwin@YALE.ARPA (Ashwin Ram)
Subject: Re: overfull citation labels

> When I use this .bst, the citation labels in the text get rather lengthy,
> and can extend over the righthand margin considerably, so I get something
> that looks like:
>       |-----------------text--------------------|
>       |-----------------text---------[Johnson and Johnson, 1988].
>       |-----------------text--------------------|
>                                               Is there some trick to 
> getting this to work right (i.e., splitting the cite across two lines)?

If you look at the \cite command in latex.tex, you'll see that it expands to
\@citex, which in turn gives you a \hbox with the cite text in the hbox.  If
you remove the hbox, the cite text will be formatted "normally".  Here's the
code for \@citex from latex.tex:

\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,}\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
\hbox{\csname b@\@citeb\endcsname}}}{#1}}
^^^^^
Delete this \hbox.  I usually also add a space after the "," that separates
multiple cites (the third line in the above definition).

-- Ashwin Ram --

ARPA:    Ram-Ashwin@cs.yale.edu
UUCP:    {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin
BITNET:  Ram@yalecs

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

Date: Mon, 9 May 88 14:19:42 PDT
From: tli%sargas.usc.edu@oberon.USC.EDU (Tony Li)
Subject: Beta test dvi2ps with psfig support.

For the adventurous --

I have a version of dvi2ps which supports psfig which I am now making
available for general beta test.  This is (to the best of my
knowledge) the most recent version of dvi2ps with some minor
additions.  It includes support for a specially altered psfig, which
is also being distributed.  This version of dvi2ps is not compatible
with other versions of psfig.

Interested parties may anonymously FTP the files ~/pub/dvi2ps.tar.Z
and ~/pub/psfig.tar.Z from the host Sargas.usc.edu [128.125.1.11].
Please be gentle, this is only a Sun 3/50 ;-).  Bug reports to me,
please.

Credit:
dvi2ps has been hacked on by many folk.  I've made only trivial mods.
psfig was developed by Trevor Darrell.

Tony

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

Date:    Mon, 9 May 88 18:05 EDT
From: "Peter A. Krupa" <KSN%PSUVM.BITNET@forsythe.stanford.edu>
Subject: Translating Mac PostScript to TeX?

My boss and I would like to somehow download our Mac LaserWriter printouts
to the Imagen printer in the terminal room.  It understands TeX, imPRESS,
and DVI.  Does anyone know of an application that can accomplish this?

Any information you can provide will be greatly appreciated.
                                        -------

Peter A. Krupa (a.k.a. Spiny_Norman)
Garfield Thomas Water Tunnel
Applied Research Laboratory
Pennsylvania State University
State College, PA 16804

ksn@psuarlb (whew!)

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

Date: Tue, 10 May 88 11:34:34 GMT
From: MAT420%DE0HRZ1A.BITNET@CUNYVM.CUNY.EDU

Who has information about a preview for the IBM-RT microcomputer (IBM
6150) that does not require X-windows? Public-domain would be preferred....
Many thanks
Gerhard

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

From: Michael Payer <payer%lan.informatik.tu-muenchen.dbp.de@RELAY.CS.NET>
Subject: Needed: Include-facility for dvi-files
Date: Tue, 10 May 88 16:19:12 -0200

I look for a possibility to include dvi-files, such that a
master file can instruct the includer (or the dvi-driver,
respectively) to overlay a certain position of the actual
page by the contents of an existent dvi-file. 

I need this stuff, since I have *very* large picture
environments which are too big for our TeX-installation.
Moreover, my pictures often contain the same background stuff,
namely VLSI masterslice layouts, and I don't like LaTeXing
these time-consuming background pictures each time they
are needed. 

A minimal solution would be to overlay the actual page as a
whole by a separate page contained in another file.

Thanks for any help that is available.

			 Michael Payer

payer@lan.informatik.tu-muenchen.dbp.de
                                         / relay.cs.net
payer%lan.informatik.tu-muenchen.dbp.de@ - unido.uucp
                                         \ ddoinf6.bitnet
phone: +49 89 2105 2389
mail:  Institut fuer Informatik, Technische Universitaet Muenchen,
       P.O.B. 20 24 20, D-8000 Muenchen 2, West Germany

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

Date: Tue, 10 May 88 20:34:19 PDT
From: Eric Behr <khayo@math.ucla.edu>
Subject: Need help about slide making.

I have to make a presentation in June, using transparencies.

I cant use SliTeX for 2 reasons: on my home computer I do not have the fonts,
and I would like a other layout.

Can anybody help with my quite simple requirements ?

- use \oval or equivalent to have a frame around the text.
- Have each slide with a title and number, center/down. (The title
  is not general to the whole show, it is just the name of the chapter)
- Have the text verticaly centered, within the frame. (The frame is not the
  whole page). This is the most difficult part for me, I just dont know/
  understand how to do this. I know SliTeX is doing it, but I am not
  able to understand the code.)
- The text body can be enums, lists, regular paragraphs, etc...
- *Must* use *only* regular TeX LaTeX fonts, the HUGE magnification
  provides the correct size for me.

I am just an amateur LaTeX user... But I badly need this.

Jean-Pierre H. Dumas

network@frsac11 (bitnet)
network%frsac11.bitnet@cunyvm.cuny.edu (arpanet)
dumas@sumex-aim.stanford.edu (arpanet)

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

Date: Wed, 11 May 88 09:10:46 edt
From: shaddock@rti.rti.org (Mike Shaddock)
Subject: how to make TeX on Gould machines

The fix for Gould machines is to tell the C compiler what to put in
"fardata".  Fardata is data which is not accessed directly from a base
register (if you would like a description of Gould addressing, let me
know).  The -f flag to the C compiler is used to specify a file which
contains the names of the variables to put into fardata.  For the
current version of web2c, the following file will work:
========== cut here ==========
texpool
triec
trieo
trietaken
zzzaa
strstart
zzzae
dvibuf
zeqtb
strpool
trie
triehash
triel
trier
fontinfo
========== cut here too ==========
Put the above data into a file called FARLIST (or anything else) in
the ctex directory, and change CFLAGS in Makefile to be

	CFLAGS = -O -f FARLIST

TeX should compile now.  However, it didn't pass the trip test, but I am
working on it in my copious spare time :-).  You will also need to do
this for Metafont, and some of the other utilities.  There is a way to
make the Pascal version run if you absolutely must, but it is
extremely ugly and doesn't pass the trip test either (the C version
produces incorrect results, the Pascal version core dumps).

Let me know if you need any help getting this stuff to run on a Gould.

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

Date:     Wed, 11 May 88 9:58:56 EDT
From:     "David F. Rogers" <dfr@USNA.MIL>
Subject:  Lamport's recent answers

G'day
 
In a recent Texhax (#44) Leslie Lamport states that his answers to several
questions are more abrupt than usual 'because this sort of novice question
should not be wasting everyone's time by appearing in TeXHaX'
 
I ABSOLUTELY disagree.
 
TeXHaX is for everyone, novice and expert alike.
 
As the author of LaTeX, Lamport basically has two choices. The first is
to, like Knuth, refuse to discuss LaTeX any more because he has better
things to do. Fair enough, we all understand this position. However, if
he chooses to remain involved, then he must answer each and every question:
simple, stupid, intelligent, or interesting completely, in detail and
politely.
 
If he does not want to do this, then I for one suggest that he adopt the
first choice.
 
Professor David F. Rogers
Aerospace Engineering Department
U.S. Naval Academy
Annapolis, MD 21402
USA
Tel: 301-267-3283/4/5
 
ARPANET: dfr@usna.mil
UUCP:    ~uunet.uu.net!usna!dfr

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

From: system%hep.nrc.cdn%ean.ubc.ca@RELAY.CS.NET
Date: 11 May 88  9:00 -0600
Subject: Problem creating suitable TEX fonts for LN03R on VMS

	I have a VAX 8250 running VMS 4.6 and have a Digital LN03R
	laserwriter (POSTSCRIPT device ; purchased 1988) I am trying to get
	TEX output onto. I have composed a DVI driver from the Beebe driver 
	software and it works fine. I am having trouble however fine tuning the
	fonts to produce quality output.  Using METAFONT, I have produced 
	outputs of varying quality by tweaking some of parameters in the
	WAITS.MF file,	namely BLACKER, FILLIN and O_CORRECTION.  The values I
	came up with are .6, 1.0 and .5 respectively although with BLACKER set
	at that value varying the other two did very little.

	The other bit of relavent information would be that I am using
	the CM fonts that come with the standard TEX distribution.

	I would be interested in firstly knowing what exactly are the 
	FILLIN and O_CORRRECTION parameters and what should 
	happen when I vary them and secondly I would be interested if 
	anyone would have any ideas on how to produce quality TEX
	output via VMS using an LN03R.  The quality we currently get
	is certainly legible and is fine for rough copies but is 
	really unsuitable for "good" copies.  I don't think this is the 
	fault of the LN03R because we are able to produce non-TEX
	documents on it which have decent quality letters.

	I would be grateful for any information on this topic.

	Please reply directly to me as I am not a subscriber to this 
	distribution list.

	Thank you

	Bill Jack    JACK @ NRCHEP.BITNET

		System Manager,   National Research Council, 
				  High Energy Physics
				  Ottawa,  CANADA
				  613-957-8591

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

Date: Wed, 11 May 88 09:47:26 EDT
From: Brook_Milligan@um.cc.umich.edu
Subject: Subject cross-referencing BibTeX databases

I am curious about how others have approached the problem of developing
a BibTeX reference database that includes cross-referencing of subjects,
authors, etc.  An obvious, but also plainly inelegant, means would be to
have a "document" full of \nocite's for each subject; however, this
prevents searchs and would be difficult to maintain.  What other ideas
are there?  Does anyone have a useful system implemented?
 
Brook Milligan                         Brook_Milligan@um.cc.umich.edu
Department of Biology
University of Michigan                 (313) 747-0898
Ann Arbor, Michigan  48109

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

Date: Wed, 11 May 88 08:54:50 pdt
From: Alex Woo <woo@pioneer.arc.nasa.gov>
Subject: On what systems will TIB run?

I am trying to standardize on a reference format.  BIBTEX is too verbose and
we already have extensive REFER databases.  On what computers/OS will TIB run?

Thanks.

Alex Woo
woo@pioneer.arc.nasa.gov

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

Date: Wed, 11 May 88 09:08:26 PDT
From: fanty%icsia2.Berkeley.EDU@berkeley.edu (Mark Fanty)
Subject: overfull citation labels

I solved this problem by redefining citex, taking out the \hbox command.
I also modified the line-break penalty at the comma between citations
so that it will be a preferred break for long citations (better there
than between author names).  With short citations, a break there is
discouraged as usual.  Because of the "@" commands, these defs must go
in a ".sty" file.

%for use with aaai-named bib style

\let\@internalcite\cite
\def\cite{\def\@commapen{-1000}\def\citename##1{##1}\@internalcite}
\def\shortcite{\def\@commapen{1000}\def\citename##1{}\@internalcite}
\def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}

% redefine citex so citation no longer goes in an hbox
% also, add a space after the comma between citations
% also, make the penalty after the comma negative: a good place to break
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\penalty\@commapen\ }\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}

	Mark Fanty
	International Computer Science Institute
	1947 Center Street., Suite 600
	Berkeley, CA 94704

	(415) 643-7294
	fanty@icsi.berkeley.edu

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

Date:     Wed, 11 May 88 09:35 PDT
From: <DBUERGER%SCU.BITNET@forsythe.stanford.edu>
Subject:  MicroTeX, '386, and expanded memory problem & solution

I recently upgraded my AT '286 with a 20 MHz '386 Mylex
motherboard and large drive.  I planned to continue occasional
multi-tasking needs via DESQview and the Expanded Memory
Manager '386 as I had done on my '286.  Unfortunately, due to
both MicroTeX's and LaTeX's large memory requirements, I haven't
been able to get either to run in a DV 8086 virtual window.

Aside from this, I encountered a tricky problem running MicroTeX
that you might encounter.  Or, I should say, MT wouldn't run at
all when the DESQview EMM '386 driver was in force.  This driver
can turn all extended memory into expanded memory.

According to the MicroTeX system guide on pp. 37--39, MT is able
to dynamically take advantage of memory between 640 and 1024 K
if available.  Apparently MT automatically fills any available
memory in this range.  While this might sound good on the surface,
it's a real disadvantage if you want to use the '386's expanded
memory (in this particulary address range) to load TSRs and other
drivers.

I solved the problem by pre-reserving 1024K of the extended
memory (I have 3.4 MB available) for use as an extended memory
disk cache.  The EMM '386 expanded memory starts *after* this
cache.  Unfortunately, none of the available memory between 640
and 1024K can be used due to this MicroTeX "feature."

Has anyone gotten MicroTeX to run in a DOS window running
under an operating system like DOS Merge 386?

David Buerger
Santa Clara University
dbuerger@scu.bitnet

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

Date: Wed, 11 May 88 12:38:14 EDT
From: lee@ms.uky.edu
Subject: Increasing TeX Memory for PiCTeX with LaTeX

I'm sorry if I am repeating a previously answered question, but I
would like to use PiCTeX with LaTeX and need to increase some of TeX's
memory in order to load PiCTeX and to draw some nontrivial pictures.
Where do I start?

Carl W. Lee
Department of Mathematics
University of Kentucky
Lexington, KY 40506
(606)-257-1405

ukma!lee@cbosgd.uucp
lee@j.ms.uky.edu
lee@ukma.bitnet
lee@uky.csnet

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

Subject: CM font conversion from 88dpi -> 300dpi ?
Date: 11 May 88 11:07:08 CST (Wed)
From: iuvax!mdri!hpuinda!ajs@rutgers.edu (Anthony J. Starks)

Without METAFONT, and given the .tfm files and a set of CM fonts at 88dpi
(tuned for my screen previewer) is there any way to generate a set of
fonts for my 300dpi printer?

Thanks,

Anthony J. Starks
Merrell Dow Research Institute
P.O. Box 68470 
Indianapolis, IN 46268

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

Subject: Re: "Standard" collection of CM fonts [long message]
Date: Thu, 12 May 88 04:48:35 -0400
From: Ken Yap <ken@cs.rochester.edu>

A while back I asked what a standard set of TeX fonts was. I got four
answers. Two said don't worry, generate them when users scream for
them. The other two gave me a list of fonts distributed with PC TeX.
Basically the scheme is all the fonts in the TeXbook appendix in
magsteps 0 through 5 and half, plus cmcsc10, cmb10, and cmss10 and one
other I forget.  The other 58 fonts in magsteps 0, half and 1. cminch
in 0 only. Most of the LaTeX fonts in all steps except for a couple.
And logo10 if you like.

Now I don't know if this is authoritative but it makes enough sense to
me. You can magnify any document by half or one magstep and if you
stick to the standard fonts, up to 5.

Anyway I've decided to call this the standard here. So I offering three
shell scripts to the list. The first, listfonts, generates a table
showing what you have at the moment.

The other two, magpk and genfonts, output a shell script to make all
370 gf files and convert to pk on the fly. I generate a shell script
first so it is possible to restart the job in the middle should it
break. Or the machine goes down in the tens of hours it will take. :-)

You can figure out what you need to hack, if you have to.  (Bet Malcolm
will stash these scripts away on Score because of their length.) Have
fun.

	Ken

=====
#!/bin/sh
fontdir=/usr/lib/tex/fonts
trap 'rm /tmp/$$.sed /tmp/$$.awk' 0 1 2 3 15
cat > /tmp/$$.sed <<EOS
s/300pk/0/
s/329pk/0.5/
s/360pk/1/
s/432pk/2/
s/518pk/3/
s/622pk/4/
s/746pk/5/
s/896pk/6/
s/1075pk/7/
s/1290pk/8/
s/1548pk/9/
s/\./ /
EOS
cat > /tmp/$$.awk <<'EOS'
$1 == prev { printf "\t%s", $2 }
$1 != prev { printf "\n%-10s\t%s", $1, $2; prev = $1}
END { printf "\n" }
EOS
cd $fontdir;
ls cm*pk circle*pk lasy*pk line*pk logo*pk manual*pk \
	| sed -f /tmp/$$.sed \
	| sort \
	| awk -f /tmp/$$.awk

=====
#!/bin/sh
case $1 in
	0.5) echo 329 ;;
	0) echo 300 ;;
	1) echo 360 ;;
	2) echo 432 ;;
	3) echo 518 ;;
	4) echo 622 ;;
	5) echo 746 ;;
	6) echo 896 ;;
	7) echo 1075 ;;
	8) echo 1290 ;;
	9) echo 1548 ;;
	*) echo 000 ;;
esac

=====
#!/bin/sh

# basic fonts in magsteps 0 through 5 and 0.5

for font in cmb10 cmbx10 cmbx5 cmbx7 cmcsc10 cmex10 cmmi10 cmmi5 cmmi7 \
	cmr10 cmr5 cmr7 cmsl10 cmss10 cmsy10 cmsy5 cmsy7 cmti10 cmtt10
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

# other fonts only in magsteps 0, 0.5 and 1

for font in cmbsy10 cmbx12 cmbx6 cmbx7 cmbx8 cmbx9 cmbxsl10 cmbxti10 \
	cmdunh10 cmff10 cmfi10 cmfib8 cmitt10 cmmi12 cmmi6 cmmi8 cmmi9 \
	cmmib10 cmr12 cmr17 cmr6 cmr8 cmr9 cmsl12 cmsl8 cmsl9 cmsltt10 \
	cmss12 cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10 cmssi12 \
	cmssi17 cmssi8 cmssi9 cmssq8 cmssqi8 cmsy6 cmsy8 cmsy9 cmtcsc10 \
	cmtex10 cmtex8 cmtex9 cmti12 cmti7 cmti8 cmti9 cmtt12 cmtt8 cmtt9 \
	cmu10 cmvtt10
do
	for magstep in 0 0.5 1
	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

# specials

for magstep in 0 0.5 1
do
	res=`magpk $magstep`
	echo "cmmf '\mode=localfont;' '\mag=magstep$magstep;' '\batchmode;' input logo10"
	echo gftopk logo10.${res}gf
	echo rm logo10.${res}gf
done

echo "cmmf '\mode=localfont;' '\mag=magstep$magstep;' '\batchmode;' input cminch"
echo gftopk cminch.${res}gf
echo rm cminch.${res}gf

# LaTeX fonts

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

for font in lasy6 lasy8 lasy9
do
	for magstep in 0 0.5 1
	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

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

Date: Thu, 12 May 88 16:55:57 BST
From: CET1%phoenix.cambridge.ac.uk@NSS.Cs.Ucl.AC.UK
Subject: Signed halfwords

I wonder how many implementations of TeX and METAFONT use signed
halfwords; e.g. have min_halfword=-32768 and max_halfword=+32767.
(The only reason for doing this is if signed halfwords can be
accessed more efficiently than unsigned ones: maybe only the IBM
360/370 architecture has this peculiarity.)

Anyway, here is (1) a bug report, and (2) a suggestion for improvement
which are relevant only for such implementations.

1. The bug, which I only noticed quite recently, concerns the lines

begin if lo_mem_max+1000<hi_mem_min then t:=lo_mem_max+1000
else t:=(lo_mem_max+hi_mem_min+2) div 2; {|lo_mem_max+2<=t<hi_mem_min|}

that occur in get_node (TeX section 126, MF section 168). It is possible
(indeed, given the situation described in 2 below, almost certain) that
the number here being divided by 2 is negative. This isn't just a fourth
case to be added to the three mentioned in TeX section 99: it can cause
t to end up equal to hi_mem_min (if hi_mem_min=low_mem_max+3 and div
rounds up negative quotients towards zero---which is the ISO or ANSI
definition). This causes the word there to be mangled. (Of course, in
nearly all such cases you are going to get a "capacity exceeded - main
memory" message very soon anyway!)

A fix for both problems is to rewrite the assignment as

   t := lo_mem_max + (hi_mem_min+2-low_mem_max) div 2;

2. There is code introduced in TeX 1.3 (change #301) and pre-1.0 MF
(change #419?) that prevents low_mem_max ever exceeding mem_bot (TeX)
or mem_min (MF) + max_halfword. This guarantees that the node_size
field never gets too large, but in a very brutal way. The result is
that if that if mem indices run from min_halfword to max_halfword-1
one can never use more than half of mem for multi-word nodes. For many
applications, both of TeX and METAFONT, this is a serious restriction.

My initial thought was that the real requirement was that there not
be more than max_halfword words of *contiguous* free space in the
variable-size portion of mem. Rather than not increasing low_mem_max
in the situation above, one can leave a small dummy node which will
never be deallocated between the old part and the new one. This
certainly does work.

However, it then occurred to me that an even simpler solution would
be to use |hi| and |ho| to keep the |node_size| fields in range; then
no special checks are needed at all. The modifications to TeX consist of

@x section 124
@d node_size == info {the size field in empty variable-size nodes}
@y
@d node_size_field == info {the size field in empty variable-size nodes}
@d node_size(#) == ho(node_size_field(#))
@z

and only five places where one needs to replace

    node_size(x) := y
by  node_size_field(x) := hi(y)

The modifications to METAFONT are similar.

Of course, I was afraid that this might slow the programs down
appreciably (otherwise why hadn't it been done already?). However
measurements showed that any such slowing down was well below the
level I could detect in my implementation.

P.S. It is not too difficult to make changes so that other arrays
besides mem are based at min_halfword rather than 0; in particular
str_pool. Such a modification is useful only if (a) your architecture
likes signed halfwords (b) you want more than 32K of string store, but
not more than 64K (both quite likely) (c) you are paranoid enough to
want to make the str_start array consist of halfwords rather than
fullwords. If anyone meets these requirements, I will send them the
change file.

Chris Thompson
JANET: cet1@uk.ac.cam.phx
ARPA:  cet1%phx.cam.ac.uk@nss.cs.ucl.ac.uk

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

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



-- 
 _______________________                             __Brian___________________
|Brian T. Schellenberger| "The Earth is but one     | ...!mcnc!rti!sas!bts     |
|104 Willoughby Lane    | country, and Mankind its  |work: (919) 467-8000 x7783|
|Cary, NC   27513       | citizens" --Baha'u'llah   |home: (919) 469-9389      |