[NTG-context] formula block with align and pagebreak

Aditya Mahajan adityam at umich.edu
Tue Jul 18 18:06:32 CEST 2006

On Tue, 18 Jul 2006, Tobias Burnus wrote:

> Hello,
> I have often longer equations of the type
> \startformula\startalign
>  A = b c
>  B = c d
>  E = g h
> \intertext{Some intermediate text}
>  F = h j
>  G = k l
> \stopformula\stopalign
> I would like to keep the alignment (per page), however I also would like
> to have automatic page breaks inbetween. I can split it manually into
> two \startformula\startalign ... \stopformula\stopalign blocks, but this
> I would have to adapt any time I change something, which changes the
> text length, before that block.
> Any idea?
> Additional question: Does anyone know why in the example the "Gauss'
> law" starts not at the top of the page but roughly two line further down?
> Tobias

Page break with math is a bit tricky at the moment. Before I come to 
that, some comments.

Hans, right now zapf.tex reads

\definetypeface [zapf] [cg] [calligraphy] [chancery]
\switchtotypeface [zapf] [12pt,cg]

Zapf Chancery

\input tufte.tex

Shouldn't that be surrounded by a start/stop (or bgroup/egroup) to 
prevent font changes in the entire document?

Tobias, startintertext/stopintertext are already in the core, so you 
do not need to redefine those in your document.

Now coming back to the main problem of equations not breaking across 
pages. Taco had provided a fix for making this work. There are a few 
issues with math equations breaking across pages, and this is the 
reason that the fix is not in the core. I am attaching Taco's fix, 
keep in mind that this is not final.

-------------- next part --------------

     \crcr} % todo: number

            \firstineqalign\leftofeqalign \span 
            \textineqalign{\mathmatrixparameter\c!style ##}\rightofeqalign}%
            \nextineqalign\leftofeqalign \span 
            \textineqalign{\mathmatrixparameter\c!style ##}\rightofeqalign}%
            \leftofeqalign \span 
            \textineqalign{\mathmatrixparameter\c!style ##}\rightofeqalign}%
   \halign \@EA \bgroup\the\scratchtoks \crcr}

   \eqaligncolumn\zerocount % could be \scratchcounter
   \scratchcounter=\ifnum\eqaligncolumn>\scratchcounter \eqaligncolumn \else \plusone \fi
   \preparemathmatrix } % uses scratchcounter

    \displ at y
       % we're in a mathbox
   \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA \bgroup\the\scratchtoks\crcr}


More information about the ntg-context mailing list