[comp.text.tex] Problem with spacing macros

stephen@media-lab.MEDIA.MIT.EDU (Stephen F. Scherock) (02/28/91)

I have compiled TeX from web2c5.8a.tarZ on both a Sun 4 (SunOS 4.1)
and a Decstation 5000 (ULTRIX 4.0).  Both pass the trip test.  I am
using the plain.tex (version 3.0) macro from labrea, and slightly
modified lplain.tex (version 2.09-February 8, 1990) from labrea.  The
modifications were as suggested in the web2c package (using a small
file lplain3.tex that set \lefthyphenmin and \righthyphenmin).  

Now for the problem:  None of the popular "spacing" macros work
properly (I'm speaking of setspace.sty, doublespace.sty, and
fnspacing.tex).  They invariably produce errors like the following:

Input File:
    \documentstyle[doublespace]{article}

    \begin{document}

    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.

    \begin{onehalfspace}
    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.
    \end{onehalfspace}

    Now is the time for all good men to come to the aid of their country.
    Now is the time for all good men to come to the aid of their country.

    \end{document}

LaTeX run:
    This is TeX, C Version 3.1
    (test.tex
    LaTeX Version 2.09 <7 Dec 1989>
    (/v/lib/tex/macros/article.sty
    Document Style `article' <16 Mar 88>.
    (/v/lib/tex/macros/art10.sty)) (/v/lib/tex/local-macros/doublespace.sty)
    (test.aux)
    LaTeX error.  See LaTeX manual for explanation.
		  Type  H <return>  for immediate help.
    ! \begin{document} ended by \end{onehalfspace}.
    \@latexerr ...for immediate help.}\errmessage {#1}

    \@checkend ...empa \@currenvir \else \@badend {#1}
						      \fi
    \end #1->\csname end#1\endcsname \@checkend {#1}
						    \if@endpe \global \let \@gte...
    l.15 \end{onehalfspace}

In other words, the \end{whateverspacingmacro} causes latex to barf.
This happens with all three macros sets.  To the best of my
understanding, latex is interpreting the \endgroup (in the \end{.}
macro) as ending the document environment.  If I wrap the spacing
envronment in another environment, latex thinks that environment has
been ended by the \endgroup.  If I just ignore the error, latex seems
to do the right thing.  Since I get the error on both machines, I'm
sure that its either a genuine bug, or I have a bad file.  Does anyone have
any clues?

Thanks

Stephen Scherock
scherock@athena.mit.edu

P.S.  I had to turn off all optimizations to compile on the
      decstation, OPT=-O0