🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #718

Re: Space problem behind environment

#718
From: David Kastrup
Date: Tue, 04 Aug 1992 12:06
49 lines
2130 bytes
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.
Technical Details
Message-ID: <dak.712929976@kaa>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!kaa!dak
References: <6935@charon.cwi.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!kaa!dak
From: dak@kaa.informatik.rwth-aachen.de (David Kastrup)
Newsgroups: comp.text.tex
Subject: Re: Space problem behind environment
Message-ID: <dak.712929976@kaa>
Date: 4 Aug 92 12:06:16 GMT
References: <6935@charon.cwi.nl>
Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
Lines: 49
Nntp-Posting-Host: kaa