From: Alasdair McAndrew <amca01@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Multiplication table (with lines) in ConTeXt?
Date: Wed, 4 May 2011 20:10:01 +1000 [thread overview]
Message-ID: <BANLkTi=8Zh_x8CsGLhh8OP9G1boofOryBg@mail.gmail.com> (raw)
In-Reply-To: <F6E8794E-A222-4BE4-8410-70801DAABD19@googlemail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2176 bytes --]
It looks like it should work, but when I try it I get a very squashed
table, with lines between all rows and columns... FWIW, I'm using MKII:
"ConTeXt ver: 2011.02.25 22:03 MKII fmt: 2011.3.14 int: english/english"
-Alasdair
On Wed, May 4, 2011 at 5:05 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:
>
> Am 04.05.2011 um 06:45 schrieb Aditya Mahajan:
>
> > \startsetups table:frame
> > \setupTABLE[each][each][frame=off, align=middle]
> > \setupTABLE[row][first][bottomframe=on]
> > \setupTABLE[column][first][rightframe=on]
> > \stopsetups
> >
> > \startTABLE[setups=table:frame]
> > \NC $\times$ \NC 1 \NC 2 \NC ... \NC \NR
> > ....
> > \stopTABLE
>
> and for the lazy people:
>
> \starttext
>
> \startsetups table:multiplication
> \setupTABLE[each][each][frame=off,align=middle,width=2em,height=2em]
> \setupTABLE[row][first][bottomframe=on]
> \setupTABLE[column][first][rightframe=on]
> \stopsetups
>
> \startluacode
> context.bTABLE{setups="table:multiplication"}
> for i=0,6 do
> context.bTR()
> for j=0,6 do
> context.bTD()
> if i==0 and j==0 then
> context("×")
> elseif i==0 or j==0 then
> context(i+j)
> else
> context(i*j)
> end
> context.eTD()
> end
> context.eTR()
> end
> context.eTABLE()
> \stopluacode
>
> \stoptext
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> 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 : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
--
Blog: http://amca01.wordpress.com
Web: http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alasdair.mcandrew
[-- Attachment #1.2: Type: text/html, Size: 3270 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2011-05-04 10:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 4:36 Alasdair McAndrew
2011-05-04 4:45 ` Aditya Mahajan
2011-05-04 7:05 ` Wolfgang Schuster
2011-05-04 10:10 ` Alasdair McAndrew [this message]
2011-05-04 10:32 ` Paul Menzel
2011-05-04 10:52 ` Wolfgang Schuster
2011-05-04 10:43 ` Paul Menzel
2011-05-04 10:49 ` Alasdair McAndrew
2011-05-04 10:57 ` Wolfgang Schuster
2011-05-04 11:10 ` Paul Menzel
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='BANLkTi=8Zh_x8CsGLhh8OP9G1boofOryBg@mail.gmail.com' \
--to=amca01@gmail.com \
--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).