From: "Eckhart Guthöhrlein" <eckhart_guthoehrlein@public.uni-hamburg.de>
Subject: Re: Table problem
Date: Sat, 07 Jul 2001 21:01:24 +0200 [thread overview]
Message-ID: <5.1.0.14.0.20010707203504.00ab2e48@public.uni-hamburg.de> (raw)
In-Reply-To: <Pine.GSO.4.05.10107071835430.854-101000@sumak>
At 18:53 07.07.2001 +0300, Tarik Kara wrote:
>It's me again. As you might have guessed I am trying to switch to ConTeXt.
>To start with I want to convert one of my old (LaTeX) document into
>ConTeXt. Although the documentation is extensive I can't seem to find what
>I need. By new guestion is:
>
>A have tables (a game matrix) like the one given in the attachment. What
>is the best way to construct a table like the one in the attachment: The
>label "Player 2" should be centered among the last 2 columns (the
>\TWO\JustCenter{Player 2} did not do a good job), The label "Player 1"
>should be centered among the last two rows (using the command \LOW{Player
>1} in the first row seems to be working ok). The dimension of the
>table does not have to be 2x2, but if you can show how to do it for 2x2 I
>believe I can extended to nxm.
>
>Also is there a way to get the number pairs alined by the comman.
I'm just switching from LaTeX, too, so don't expect too much from me. But I
think that
\starttable[|l|c|c|c|]
\NC \NC \NC\TWO{Agent 2} \NC\SR
\NC \NC \NC C \NC D \NC\SR
\DC \DC \DL[2] \DR
\NC \LOW{Agent 1} \NC C \VL $(-5,-5)$ \VL $(-1,-10)$ \VL\SR
\DC \DC \DL[2] \DR
\NC \NC D \VL $(-10,-1)$ \VL $(-2,-2)$ \VL\SR
\DC \DC \DL[2] \DR
\stoptable
solves your problem. A possibility for the alignment at the comma may be
\starttable[|l|c|r s0|l s3 |r s0 |l s3|]
\NC \NC \NC\FOUR\JustCenter{Agent
2} \NC\SR
\NC \NC \NC\TWO\JustCenter{C} \NC
\TWO\JustCenter{D} \NC\SR
\DC \DC \DL[4] \DR
\NC \LOW{Agent 1} \NC C \VL $(-5$ \NC $,-5)$ \VL $(-1$ \NC
$,-10)$ \VL\SR
\DC \DC \DL[4] \DR
\NC \NC D \VL $(-10$ \NC $,-1)$ \VL $(-2$ \NC
$,-2)$ \VL\SR
\DC \DC \DL[4] \DR
\stoptable
This is something like r@{,}l in LaTeX... At least it works. I put the
comma in the second column to get correct spacing. Maybe Hans or another
more experienced contexter knows a better solution to the alignment
problem. With natural tables, there is an alignment character, but I don't
know if this is the case with table and tabulate, too. And I'm not sure if
it could actually work in this case, since you don't simply want to type a
number with a decimal comma, but a pair of numbers in math mode, separated
by a comma.
The vertical alignment of 'Agent 1' is not perfect, though. Time for a
question: Is there a possibility to span an arbitrary number of rows and
align some text vertically centered in the resulting space? (ny=3 like in
natural tables, with additional centering?) The multirow package does this
for latex (quite well, except for very special cases).
Btw, there are some examples of tables in the beginners' manual which are
not (yet?) in the english beta reference manual, so you may want to have a
look at this.
I think tables are a topic where the context documentation (at least the
english one) ought to be extended, especially for newcomers and 'converts'
from latex. As soon as I am more experienced, and as soon as I have
finished my current work (diploma thesis), I would be willing make
contributions in this area (although the first precondition might take some
time...)
Eckhart
next prev parent reply other threads:[~2001-07-07 19:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-07 15:53 Tarik Kara
2001-07-07 19:01 ` Eckhart Guthöhrlein [this message]
2001-07-08 19:23 ` Tarik Kara
2001-07-08 22:00 ` Eckhart Guthöhrlein
2001-07-09 8:12 ` Tarik Kara
2001-07-08 23:00 ` Hans Hagen
2001-07-08 23:05 ` Hans Hagen
2001-07-07 19:01 ` Eckhart Guthöhrlein
2002-05-23 5:32 table problem Denis B. Roegel
2002-05-23 7:01 ` Taco
2003-03-10 7:50 Table problem Willi Egger
2003-03-10 8:21 ` Patrick Gundlach
2003-03-10 21:56 ` Hans Hagen
2004-09-06 11:59 TaBlE problem Nikolai Weibull
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=5.1.0.14.0.20010707203504.00ab2e48@public.uni-hamburg.de \
--to=eckhart_guthoehrlein@public.uni-hamburg.de \
/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).