Re: [NTG-context] textbackground trouble

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi Hans and Taco,

 Something goes wrong when a textbackground occurs right at the page 
 boundary. Please have a look at the attached file (a snippet from an 
 updated copy of Myway on using new math features).
so, what goes wrong here? 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi Hans and Taco,

 Something goes wrong when a textbackground occurs right at the page
 boundary. Please have a look at the attached file (a snippet from an
 updated copy of Myway on using new math features).
 so, what goes wrong here?

I get

Runaway argument?
{boxgridtype := 0 ;
! Paragraph ended before \flushTeXtexts was complete.
to be read again
\par
argument boxgridtype := 0 ;\par
   boxlinetype := 0 ;\par boxfilltype 
:= 1 ;\...

\writecheckedMPgraphic ...aphic \flushTeXtexts {#1
   }\writeMPgraphic 
{#1}
\startMPgraphic ...hic \writecheckedMPgraphic {#1}

\stopwritingMPgraphic
\getMPdrawing ...ic \MPdrawingdata \stopMPgraphic

\loadcurrentMPgraphic {}\d...

\dopositionaction ...fMPdrawingdone \getMPdrawing
   \fi \resetMPdrawing 
\popMP...
...
l.96 \ShowExample

?

The backgrounds on the first page do not have any color. The string
boxlinetype := 0 ;boxfilltype := 1 ;boxgridcolor := 
(scaledrgb(0,0,1,1)) ;boxlinecolor := (scaledrgb(0,0,1,1))

ends up at the bottom of page 1.


I do not know what is going wrong.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
 I get

 Runaway argument?
 {boxgridtype := 0 ;
 ! Paragraph ended before \flushTeXtexts was complete.
 to be read again
 \par
 argument boxgridtype := 0 ;\par
   
hm, did you use the latest version? 

(looks like a endofline problem, i.e. some empty line not converted to an 
endline char) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 I get

 Runaway argument?
 {boxgridtype := 0 ;
 ! Paragraph ended before \flushTeXtexts was complete.
 to be read again
 \par
 argument boxgridtype := 0 ;\par

 hm, did you use the latest version?

 (looks like a endofline problem, i.e. some empty line not converted to an 
 endline char)

Just downloaded the latest beta and the problem is not present. Sorry 
for the noise.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] textbackground trouble

2006-06-28 Thread Aditya Mahajan

Hi Hans and Taco,

Something goes wrong when a textbackground occurs right at the page 
boundary. Please have a look at the attached file (a snippet from an 
updated copy of Myway on using new math features).


Aditya\usemodule[mag-01]
% \input mathfix %Bugfix by Taco

\setuptyping[style=\ttx\setupinterlinespace]
\setupheadertexts[section]

\setupbodyfontenvironment   [default][em=italic]

\definetextbackground
  [example]
  [width=\textwidth,
   background=color,
   backgroundcolor=lightgray,
   frame=off,
   leftoffset=1em,
   rightoffset=1em,
   location=paragraph,
   after={\blank[small]},
   before={\blank[small]}]

\def\ShowExample
  {\startexample
% \nobreak
\typebuffer
   \stopexample
   \getbuffer}

\setvariables
  [magazine]
  [title={Using \textbackslash startalign and friends},
   author=Aditya Mahajan,
   date=\currentdate,
  ]


\starttext \setups[titlepage] \setups[title]
\startbuffer
\startformula \startalign[m=2]
  \NC a_1 x + b_1 y \NC = c_1 \NC d_1 u + e_1 v \NC = f_1 \NR
  \NC a_2 x + b_2 y \NC = c_2 \NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample

The distance between the pairs can be increased by the option
\typedistance of \tex{startalign}.
\startbuffer
\startformula \startalign[m=2,distance=5em]
  \NC a_1 x + b_1 y \NC = c_1 \NC d_1 u + e_1 v \NC = f_1 \NR
  \NC a_2 x + b_2 y \NC = c_2 \NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample

A combination of \type[m=...,n=...] can be used.
\startbuffer
\startformula \startalign[m=2,distance=8em,n=5,
  align={right,middle,middle,middle,left}]
  \NC 0 \NC  \NC 2x + 5y \NC  \NC 10
  \NC 4 \NC  \NC 3x +  y \NC  \NC 9  \NR
  \NC 3 \NC  \NC 2y + 3z \NC  \NC 15
  \NC 10\NC  \NC 8y + 5z \NC  \NC 20 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample

Sometimes, one simply wants to display two separate set of equations side by
side. For such applications the above pairs mode can be cumbersome to work
with.  There is another alternative in \tex{startformulas}

\startbuffer
\startformulas
  \startformula \startalign
\NC a_1 x + b_1 y \NC = c_1 \NR
\NC a_2 x + b_2 y \NC = c_2 \NR
  \stopalign \stopformula
  \startformula \startalign
\NC d_1 u + e_1 v \NC = f_1 \NR
\NC d_2 u + e_2 v \NC = f_2 \NR
  \stopalign \stopformula
\stopformulas
\stopbuffer
\ShowExample

More than two groups can also be placed.
\startbuffer
\startformulas
\dorecurse{5}{\startformula
\startalign[n=3,align={middle,middle,middle}]
\NC a  \NC = \NC b  \NR
\NC 2a \NC = \NC 2b \NR
\stopalign
\stopformula}
\stopformulas
\stopbuffer
\ShowExample


\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context