[comp.text] -me environment clash. Help? Workaround?

stuart@rochester.ARPA (Stuart Friedberg) (01/24/87)

I have found a problem and even know what the cause is, but would
like to know if any smart person out there has a fix.

Configuration:
  tmac.e version 2.15 (4/10/83)
  eqn.me version 1.1 (12/21/84)	(or 2.1 (8/18/80), the comments are strange)
  titroff circa 11/85		(not really relevant)
  4.2 BSD SMI release 2.0	(not really relevant)
  
Syndrome:
  Using the -me macro package for troff, when the very first thing that
  gets printed after a header is a labelled equation, the label gets
  printed in the font and size of the header, not the font and size of
  the text.

Cause:
  Both the equation and the header macros use environment 2; both set
  things like font and size.  Normally there is no conflict between them,
  because they never overlap and they each initialize things correctly
  for their own purposes.  However, when an equation is started before
  the footer trap, and forced to the top of the next page, the footer and
  header macros are trapped and invoked after the equation has set up the
  environment but before the equation gets printed.  Not what you'd call
  reentrant.

  The body of an equation is not affected by this bug because eqn
  explicitly sets the font and size the way it wants it (I think).  The
  label is affected because it's a string rather than a diversion (I am
  sure).

What to Do?
  I tried some simple messing with the header macro to try and make it
  put things back the way they were upon exit, but this didn't help.
  There's a very small number of available environments and I haven't
  analyzed the whole package to see if I can substitute one of the other
  environments in either the header or the equation macros.

  Is anybody out there a -me wizard who can advise me?

Stu Friedberg  {seismo, allegra}!rochester!stuart  stuart@cs.rochester.edu