Sender: |
|
Subject: |
|
From: |
|
Date: |
Tue, 7 Oct 1997 09:01:57 +0200 |
In-Reply-To: |
|
Reply-To: |
|
Parts/Attachments: |
|
|
On Mon, 6 October 1997 18:41:17 +0100,
Philip Taylor (RHBNC) <[log in to unmask]> writes:
[...]
> % \mathcode`\"=8000
> % \begingroup
> % \catcode`\"=\active
> % \gdef"{^{\prime\prime}}
> % \endgroup
>
> >> will make trouble even if each article is enclosed in its own group and
> >> there are many ways for this kind of trouble to come up.
>
> Isn't this the sort of construct that LaTeX implicitly proscribes?
> If there were a clean LaTeX method (there probably is!) for achieving
> the effect without the need for \global hacks, then all would be well.
In a lot of these cases \global hacks aren't necessary!
If you are using some group matching hacks using explicit braces and
implicit braces/begingroup/endgroup tokens which are nested as in the
following code
\mathcode`\"=8000
\begingroup
\catcode`\"=\active
\toks0={\endgroup
\def "{^\prime\prime}%
}
\the\toks0\relax
you are able to control which assignments/definitions will be active
at the end of the code without using global assignments.
I have used this technique for `german.sty' since years, thus you can
load this macro file inside a group and if this group is closed _all_
changes are gone (except of all register allocations which are always
done globally). Additionally I have tried to spread this technique,
but have missed the best way: to publish it in TUGboat :-(
-bernd
____________________________________________________________________
Bernd Raichle "Le langage est source
DANTE e.V., Koordinator `german.sty' de malentendus"
email: [log in to unmask] (A. de Saint-Exupery)
|
|
|