* Which manual for basic drawing?
@ 2007-05-01 13:21 James Buchanan
2007-05-01 13:33 ` Aditya Mahajan
0 siblings, 1 reply; 9+ messages in thread
From: James Buchanan @ 2007-05-01 13:21 UTC (permalink / raw)
To: ntg-context
Hello,
I'm writing some simple workbooks for kids in grades 1 to 10 to help
them with their math. I've worked with TeX and LaTeX for a while, until
I was attracted to ConTeXt for is nice colors and things like that.
I need to know how to:
* Draw simple number lines, color if possible, label the cm dots or
vertical lines, label the number line, fill in the numbers (or miss some
out), place it where I want it, and perhaps have the label in a
different color
* Draw plane shapes like squares, rectangles, triangles and so on, just
2-D plane shapes. Outline in some color, inside with another color.
Label them. Place them where I a want them. Sometimes I would like to
extend the lines to show that all exterior angles add up to 360 degrees,
things like that, and add in the arc and shade it in a different color.
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.
Is there a manual I should start with to learn how to do these things,
and develop my own macros? First I would just like to learn how to do
them, then gradually write my own macros. The material in my TeX Book
and my Guide to LaTeX series gives instruction in drawing but it quickly
progresses beyond my ability into 2-D shapes and so on. I understand
basic things like \move{} and lineto{} and \lvec{} but that's where I
get confused.
I was wondering if anyone could suggest a good ConTeXt series of
readings to come to grips to switching from TeX/LaTeX to ConTeXt and
then onto drawing basics and fonts and colors.
Thank you for your time,
James Buchanan
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
2007-05-01 13:21 Which manual for basic drawing? James Buchanan
@ 2007-05-01 13:33 ` Aditya Mahajan
2007-05-01 14:19 ` Thomas A. Schmitz
2007-05-02 0:05 ` Aditya Mahajan
0 siblings, 2 replies; 9+ messages in thread
From: Aditya Mahajan @ 2007-05-01 13:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, 1 May 2007, James Buchanan wrote:
> Hello,
>
> I'm writing some simple workbooks for kids in grades 1 to 10 to help
> them with their math. I've worked with TeX and LaTeX for a while, until
> I was attracted to ConTeXt for is nice colors and things like that.
>
> I need to know how to:
>
> * Draw simple number lines, color if possible, label the cm dots or
> vertical lines, label the number line, fill in the numbers (or miss some
> out), place it where I want it, and perhaps have the label in a
> different color
>
> * Draw plane shapes like squares, rectangles, triangles and so on, just
> 2-D plane shapes. Outline in some color, inside with another color.
> Label them. Place them where I a want them. Sometimes I would like to
> extend the lines to show that all exterior angles add up to 360 degrees,
> things like that, and add in the arc and shade it in a different color.
Metapost or pstricks is the easiest way to draw such things. I would
recommend metapost, as it is well integrated with Context. See
http://melusine.eu.org/syracuse/metapost/cours/ for some examples of
geometric figures using metapost. Also see
http://wiki.contextgarden.net/Metapost
http://wiki.contextgarden.net/MetaFun
http://wiki.contextgarden.net/Mpgraphic
The last page does not list \usempgraphic and \startMPcode ...
\stopMPcode which are perhaps the easiest way to include MP figures.
See the metafun manual for details.
> 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.
> Is there a manual I should start with to learn how to do these things,
> and develop my own macros? First I would just like to learn how to do
> them, then gradually write my own macros. The material in my TeX Book
> and my Guide to LaTeX series gives instruction in drawing but it quickly
> progresses beyond my ability into 2-D shapes and so on. I understand
> basic things like \move{} and lineto{} and \lvec{} but that's where I
> get confused.
Have a look at the metapost manual. If you think geometrically, then
metapost is fairly easy to use.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
2007-05-01 13:33 ` Aditya Mahajan
@ 2007-05-01 14:19 ` Thomas A. Schmitz
2007-05-02 0:05 ` Aditya Mahajan
1 sibling, 0 replies; 9+ messages in thread
From: Thomas A. Schmitz @ 2007-05-01 14:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On May 1, 2007, at 3:33 PM, Aditya Mahajan wrote:
>> * Draw simple number lines, color if possible, label the cm dots or
>> vertical lines, label the number line, fill in the numbers (or
>> miss some
>> out), place it where I want it, and perhaps have the label in a
>> different color
>>
>> * Draw plane shapes like squares, rectangles, triangles and so on,
>> just
>> 2-D plane shapes. Outline in some color, inside with another color.
>> Label them. Place them where I a want them. Sometimes I would like to
>> extend the lines to show that all exterior angles add up to 360
>> degrees,
>> things like that, and add in the arc and shade it in a different
>> color.
>
> Metapost or pstricks is the easiest way to draw such things. I would
> recommend metapost, as it is well integrated with Context. See
> http://melusine.eu.org/syracuse/metapost/cours/ for some examples of
> geometric figures using metapost. Also see
While I don't disagree with Aditya, I think tikz should also be
considered. It works well with ConTeXt if you use a relatively new
version (like the one in TeXLive 2007), some people find its syntax
easier to master than metapost, and the code can be used in ConTeXt
and LaTeX. Just have a look at the big pgfmanual.pdf, which is
probably already on your hard disk.
Thomas
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
2007-05-01 13:33 ` Aditya Mahajan
2007-05-01 14:19 ` Thomas A. Schmitz
@ 2007-05-02 0:05 ` Aditya Mahajan
2007-05-02 6:18 ` James Buchanan
1 sibling, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2007-05-02 0:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
2007-05-02 0:05 ` Aditya Mahajan
@ 2007-05-02 6:18 ` James Buchanan
2007-05-02 20:46 ` Idris Samawi Hamid
0 siblings, 1 reply; 9+ messages in thread
From: James Buchanan @ 2007-05-02 6:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
Aditya Mahajan wrote:
> Here is an example:
>
> \setupcolors[state=start]
>
> \def\solutionbox
> {\dosingleempty\dosolutionbox}
>
> \def\dosolutionbox[#1]%
> {\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1]
> {\strut}}
>
>
> \starttext
[cut]
> \stoptext
>
> Aditya
Thanks everyone for your input. I think I have enough to go on now. It
does seem MetaPost is easiest, but quickly gets complicated. I have not
seen any simple geometry examples labeling angles, for example. I
suppose though I can figure out those things for myself when I get some
more practice in.
Is there a book on ConTeXt that starts from the beginning like layout of
the page, setup of colors, and things like that, then typing in text,
and finally drawing, fonts, inclusion of graphics and things like that?
Thanks again for everyone's generous help, Aditya and Thomas.
James Buchanan
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
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:39 ` James Buchanan
0 siblings, 2 replies; 9+ messages in thread
From: Idris Samawi Hamid @ 2007-05-02 20:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Wed, 02 May 2007 00:18:46 -0600, James Buchanan
<spartacus007@internode.on.net> wrote:
> Thanks everyone for your input. I think I have enough to go on now. It
> does seem MetaPost is easiest, but quickly gets complicated.
Then you should definitely try TikZ
> I have not
> seen any simple geometry examples labeling angles, for example. I
> suppose though I can figure out those things for myself when I get some
> more practice in.
Again, TikZ ;-)
> Is there a book on ConTeXt that starts from the beginning like layout of
> the page, setup of colors, and things like that, then typing in text,
> and finally drawing, fonts, inclusion of graphics and things like that?
There are two general manuals on ConTeXt in the official documentation,
and also one (The MetaFun manual) on Metapost. Look all three up on the
wiki:
http://wiki.contextgarden.net/Official_ConTeXt_Documentation#General_Manuals
A real-life book on ConTeXt is still needed however. The manuals are a bit
rough around the edges...
Best
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
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
1 sibling, 1 reply; 9+ messages in thread
From: Idris Samawi Hamid @ 2007-05-02 20:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
PS
On Wed, 02 May 2007 14:46:12 -0600, Idris Samawi Hamid
<ishamid@colostate.edu> wrote:
> On Wed, 02 May 2007 00:18:46 -0600, James Buchanan
> <spartacus007@internode.on.net> wrote:
>
>> Thanks everyone for your input. I think I have enough to go on now. It
>> does seem MetaPost is easiest, but quickly gets complicated.
>
> Then you should definitely try TikZ
Thanks to Mojca we have a package
http://modules.contextgarden.net/TikZ
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
2007-05-02 20:48 ` Idris Samawi Hamid
@ 2007-05-03 2:38 ` James Buchanan
0 siblings, 0 replies; 9+ messages in thread
From: James Buchanan @ 2007-05-03 2:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
Idris Samawi Hamid wrote:
> PS
>
> On Wed, 02 May 2007 14:46:12 -0600, Idris Samawi Hamid
> <ishamid@colostate.edu> wrote:
>
>> On Wed, 02 May 2007 00:18:46 -0600, James Buchanan
>> <spartacus007@internode.on.net> wrote:
>>
>>> Thanks everyone for your input. I think I have enough to go on now. It
>>> does seem MetaPost is easiest, but quickly gets complicated.
>> Then you should definitely try TikZ
>
> Thanks to Mojca we have a package
>
> http://modules.contextgarden.net/TikZ
>
> Idris
Thanks Idris!
Best wishes,
James Buchanan
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Which manual for basic drawing?
2007-05-02 20:46 ` Idris Samawi Hamid
2007-05-02 20:48 ` Idris Samawi Hamid
@ 2007-05-03 2:39 ` James Buchanan
1 sibling, 0 replies; 9+ messages in thread
From: James Buchanan @ 2007-05-03 2:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
Idris Samawi Hamid wrote:
http://wiki.contextgarden.net/Official_ConTeXt_Documentation#General_Manuals
>
> A real-life book on ConTeXt is still needed however. The manuals are a bit
> rough around the edges...
>
> Best
> Idris
I haven't found the general manuals to be all that useful, since running
the commands to get a basic "hello, world" page didn't work (but then
again, it was probably my fault. I suspect I didn't install it correctly).
I'll follow the installation instructions and start again from scratch
to see if I get anywhere.
Best,
James
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-03 2:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-01 13:21 Which manual for basic drawing? James Buchanan
2007-05-01 13:33 ` Aditya Mahajan
2007-05-01 14:19 ` Thomas A. Schmitz
2007-05-02 0:05 ` Aditya Mahajan
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
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).