Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool.mu.edu!sol.ctr.columbia.edu!ira.uka.de!sun1.ruf.uni-freiburg.de!rusmv1!texinfo1 From: texinfo1@rusmv1.rus.uni-stuttgart.de (Rainer Schoepf) Newsgroups: comp.text.tex Subject: Re: \newenvironment and equations Summary: It's a feature, not a bug! Message-ID: <1991May10.200437.8054@rusmv1.rus.uni-stuttgart.de> Date: 10 May 91 20:04:37 GMT References: <1991May10.065801.20125@fwi.uva.nl> Organization: Comp.Center (RUS), U of Stuttgart, FRG Lines: 42 In article <1991May10.065801.20125@fwi.uva.nl> smagt@fwi.uva.nl (Patrick van der Smagt) writes: >Please help me! I can't figure it out. When I define >-------------- >\newenvironment{teq}{\begin{equation}}{\end{equation}} >\begin{teq} >x^2 + y^2 = c^2, >\end{teq} >To get the correct generalisation of the rule as >presented in the previous chapter, we must set >-------------- > >the line following this displayed equation is indented by a >space. In this specific case, the output of dvitty is > >-------------- > x2 +y2= c2; (1) > > To get the correct generalisation of the rule as presented in the >previous chapter, we must set >-------------- > >This looks like a bug in \newenvironment, or is this a >feature of one of those wonderful LaTeX commands? > > Patrick van der Smagt You have a space (actually an end-of-line) after your \end{teq} and consequently, you get a space in the output. This behaviour is the same for every LaTeX environment, except for a few special ones (like equation) that explicitly discard spaces following their \end tag. [Classified information: this is done by setting a global switch to true, with the name of `@ignore'. The \end command checks that switch and calls TeX's \ignorespaces primitive, if necessary.] Rainer Sch\"opf