On Tue, 1 May 2007, Aditya Mahajan wrote:
On Tue, 1 May 2007, James Buchanan wrote:
When doing basic material like:
Solve:
6 + 7 + 4 = [box]
Have the equals signs and boxes lined up (or not), two sets of simple add these numbers (or whatever) per column. The answer box could be filled with a light color.
This can be done easily using context's alignment mechanism. I am in a bit of a hurry right now, and will post an example later in the evening.
Here is an example: \setupcolors[state=start] \def\solutionbox {\dosingleempty\dosolutionbox} \def\dosolutionbox[#1]% {\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1] {\strut}} \starttext Not aligned \startformula \startalign[n=1] \NC 6 + 7 + 4 = \solutionbox \NR \NC 16 + 5 + 4 = \solutionbox[width=1cm] \NR \NC 6 + 200 + 4 = \solutionbox[width=3cm] \NR \stopalign \stopformula aligned \startformula \startalign[n=7,align={right,middle,right,middle,right,middle,left}] \NC 6 \NC + \NC 7 \NC + \NC 4 \EQ \NC \solutionbox \NR \NC 16 \NC + \NC 5 \NC + \NC 4 \EQ \NC \solutionbox[width=1cm] \NR \NC 6 \NC + \NC 200 \NC + \NC 4 \EQ \NC \solutionbox[width=3cm] \NR \stopalign \stopformula Two column \startformulas \startformula \startalign[n=7,align={right,middle,right,middle,right,middle,left}] \NC 6 \NC + \NC 7 \NC + \NC 4 \EQ \NC \solutionbox \NR \NC 16 \NC + \NC 5 \NC + \NC 4 \EQ \NC \solutionbox[width=1cm] \NR \NC 6 \NC + \NC 200 \NC + \NC 4 \EQ \NC \solutionbox[width=3cm] \NR \stopalign \stopformula \startformula \startalign[n=7,align={right,middle,right,middle,right,middle,left}] \NC 6 \NC + \NC 7 \NC + \NC 4 \EQ \NC \solutionbox \NR \NC 16 \NC + \NC 5 \NC + \NC 4 \EQ \NC \solutionbox[width=1cm] \NR \NC 6 \NC + \NC 200 \NC + \NC 4 \EQ \NC \solutionbox[width=3cm] \NR \stopalign \stopformula \stopformulas \stoptext Aditya