[OS X TeX] two-page split equation

Maarten Sneep maarten.sneep at xs4all.nl
Tue Apr 11 23:02:56 CEST 2006


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. 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.

As always there are exceptions to this rule, especially when defining  
commands. Figuring those out is left as an excersise for the reader ;-)

Maarten------------------------- 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