From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Which manual for basic drawing?
Date: Tue, 1 May 2007 20:05:57 -0400 (EDT) [thread overview]
Message-ID: <alpine.WNT.0.98.0705012003230.3152@nqvgln> (raw)
In-Reply-To: <alpine.WNT.0.98.0705010927010.2924@nqvgln>
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2007-05-02 0:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 13:21 James Buchanan
2007-05-01 13:33 ` Aditya Mahajan
2007-05-01 14:19 ` Thomas A. Schmitz
2007-05-02 0:05 ` Aditya Mahajan [this message]
2007-05-02 6:18 ` James Buchanan
2007-05-02 20:46 ` Idris Samawi Hamid
2007-05-02 20:48 ` Idris Samawi Hamid
2007-05-03 2:38 ` James Buchanan
2007-05-03 2:39 ` James Buchanan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.WNT.0.98.0705012003230.3152@nqvgln \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).