[OS X TeX] two-page split equation
Alain Schremmer
Schremmer.Alain at gmail.com
Wed Apr 12 05:09:12 CEST 2006
Maarten Sneep wrote:
> On 11 Apr 2006, at 1:59, Alain Schremmer wrote:
>
>> \allowdisplaybreaks
>> \begin{align*}
>> …
>> \end{align*}
>
>
> This provides me with a nice example of the meaning of 'scope',
> another term you were not familiar with, IIRC.
Well, I am quite familiar with the scope of quantifiers in formal
languages. What bothered me was Companion 2ed acting as if it were quite
the trivial thing what the "usual rules for scoping" were.
> Scope in traditional programming is the "reach" of a piece of code,
> most commonly a variable: where can you use a variable in your code.
>
> In TeX the scope (of changes) is limited to the current group. In the
> piece of code I quoted, the change caused by \allowdisplaybreaks
> applies to all code that comes after it, in he current group (usually
> until \end{document}). However, if you want to apply it only to a
> specific align environment, you have to put the environment inside a
> group, and apply it there:
>
> { % this starts a group
> \allowdisplaybreaks
> \begin{align*}
> …
> \end{align*}
> } % this closes the group, resetting TeX to not break displays.
>
> Groups are delimited by curlies {} or \begingroup \endgroup pairs. In
> LaTeX, \begin{...} and \end{...} also delimit groups.
This is good to know. Now why couldn't Companion 2ed have this?
> As always there are exceptions to this rule, especially when defining
> commands. Figuring those out is left as an excersise for the reader ;-)
I always was a terrible student and never liked exercises more strenuous
than watching a movie, reading a book or listening to music. So, I will
pass and when I am stuck, will put it to this list who, by then, will
have forgotten that I was supposed to figure it out by myself and will
bail me out as usual.
Most grateful regards
--schremmer
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list