Article View: comp.text.tex
Article #723Re: Space problem behind environment
From: Rainer Schoepf
Date: Tue, 04 Aug 1992 14:52
Date: Tue, 04 Aug 1992 14:52
66 lines
2971 bytes
2971 bytes
In article <dak.712929976@kaa> dak@kaa.informatik.rwth-aachen.de (David Kastrup) writes:
maarel@cwi.nl (E. v.d. Maarel) writes:
>Hi,
>Here's something I don't understand:
>I use \newenvironment to define an environment which
>makes subequations numbers, like in < 1.2a--1.3b >.
>It is similar to the thing defined in subeqn.sty,
>however I tried to make it based on LaTeX's way of
>defining things.
>The thing is that right behind closing the equations with
>\end{subequations}, ther is a little extra space inserted, so
>the next line f text is not flush the left margin.
>This space is typically about 3pt.
>Try the attached example.
>Applying % behind the \end{subequations} solves the problem.
>I just want to (try to) understand what is happening.
>Anybody any idea?
>Thanks,
>--Eric
>-BEGIN EXAMPLE--------------------------------------------------------
>\documentstyle{article}
>\newfont{\Bbb}{msbm10}
>\newcommand{\RR}{\mbox{\Bbb R}}
>%subequations environment
>\newcounter{saveequation}
>\newenvironment{subequations}{
> \refstepcounter{equation}
> \setcounter{saveequation}{\value{equation}}
> \setcounter{equation}{0}
> \renewcommand{\theequation}{
> \thesection.\thesaveequation\alph{equation}
> }
>}{
> \setcounter{equation}{\value{saveequation}}%
>}
I wonder that your problem seems comparatively small.
Whenever after a } you have a newline, or a space, TeX inserts a space
token. So the lines above should be ended almost all by %. Why they work,
I don't know.
Ok, but your problem might be solved by giving \ignorespaces as the last
command of your closing environment, so that at least a~space following
the closing } of the environment will be ignored.
No that weon't work. You have to include
\global\@ignoretrue
in the end part of your environment.
--
Rainer Schoepf
Konrad-Zuse-Zentrum ,,Ich mag es nicht, wenn
fuer Informationstechnik Berlin sich die Dinge so frueh
Heilbronner Strasse 10 am Morgen schon so
W-1000 Berlin 31 dynamisch entwickeln!''
Federal Republic of Germany
<Schoepf@sc.ZIB-Berlin.de> or <Schoepf@sc.ZIB-Berlin.dbp.de>
Technical Details
Message-ID:
<SCHOEPF.92Aug4155219@quattro.sc.ZIB-Berlin.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!gibb.math.fu-berlin.de!SchoepfReferences:
<6935@charon.cwi.nl> <dak.712929976@kaa>Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!gibb.math.fu-berlin.de!Schoepf From: Schoepf@sc.ZIB-Berlin.de (Rainer Schoepf) Subject: Re: Space problem behind environment In-Reply-To: dak@kaa.informatik.rwth-aachen.de's message of 4 Aug 92 12:06:16 GMT Message-ID: <SCHOEPF.92Aug4155219@quattro.sc.ZIB-Berlin.de> Sender: news@math.fu-berlin.de (Math Department) Reply-To: Schoepf@sc.ZIB-Berlin.de Organization: Konrad-Zuse-Zentrum fuer Informationstechnik Berlin References: <6935@charon.cwi.nl> <dak.712929976@kaa> Date: Tue, 4 Aug 1992 14:52:19 GMT Lines: 66