ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jim <zlists+context@jdvb.ca>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: \starttable questions
Date: Thu, 25 Jan 2024 17:01:34 -0400	[thread overview]
Message-ID: <ZbLMLhejwZGC4mPI@x360.localdomain> (raw)
In-Reply-To: <db320a5a-1c68-4d06-abaa-8f1af8deb164@fiee.net>

Hi Henning,

On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote:

> Am 25.01.24 um 16:12 schrieb Jim:
>> Hi, I was wondering if anyone here could help me with these three things:

>> For a long time I have been using Wichura's TaBle macros (i.e., what one
>> gets with
>>          \input table
>> in plain TeX) and would like to use what appears to be ConTeXt's version of
>> those (i.e., what one gets with \starttable ... \stoptable).


>> However, https://wiki.contextgarden.net/Command/starttable says
>> The environment \starttable ... \stoptable is and (sic) old and
>> nearly obsolete way to handle tabular material

>> Q1: are there plans to remove \starttable ... \endtable from ConTeXt any
>> time "soon", or is that wiki comment gratuitously pessimistic?


> Hans suggests to use tabulate as long as it fits.

I just gave that a try, using the same syntax as \starttable:

\starttable[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptable

\starttabulate[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptabulate

While tabulate produced a table with the above input, it needs some work to
make the table look good.  (The columns are too narrow, the vrules don't
meet the hrules, ...).

Perhaps these can be fixed with some tweaking, but I notice that in all of
https://wiki.contextgarden.net/Command/starttabulate
and
https://wiki.contextgarden.net/Tabulate
and
http://www.ntg.nl/maps/22/28.pdf
there is a conspicuous lack of examples with vrules.  And the tables in the
(at least) the starttabulate wiki page which use vrules don't use tabulate
to create the tables.

Coincidence?  I think not.  :-)


> tabulate uses mostly the same syntax as table(s), but as far as I looked
> into the sources, it’s a different (and probably better) implementation.

> I’m quite sure \starttable will stay, it’s just discouraged since
> \startTABLE (natural tables) is better if you need more than \starttabulate.

I looked at that and played with it (briefly), but when I saw there was
something to make tables (i.e., \starttable) which used a syntax close to
what I already know, I thought I'd go with what I know.  At this point my
ConTeXt learning curve is pretty steep already, but perhaps at some point
in the future I'll be able to heed your advice.


>> In a recent answer on this list, Mikael helped someone by pointing out the
>> \HF[...] command.  The \HF command is not listed in the \starttable wiki page.

>> Q2: Is \HF[] documented anywhere?  If so, can someone point me to that/those
>> document(s)?

> I also don’t know anything about \HF and didn’t find it in the source.
> Are you sure it wasn’t just used in a math context?

It was indeed used in a math context.  Unfortunately, that knowledge
doesn't bring me any closer to finding the documentation.  (Which gets me
back to my learning curve. :-)

>> Perhaps an answer to Q2 will answer this one too, but in case it doesn't...

>> When using Wichura's \BeginTable ... \EndTable macros, I occasionally
>> use the \\+nm feature to add n points above the current line and/or m
>> points below the current line.

>> Q3: Does ConTexT's \starttable ... \endtable have this feature?
>> If so, how does one access this feature?

> Probably not, you don’t use \\ in a ConTeXt table.

That I already knew.

> There’s \TB[] that understands the same parameters as \blank

Thanks for that information.  Unfortunately, it doesn't work well for
tables with vrules, in either \starttabulate or \starttable.  However,
thanks for mentioning it, not all tables have vrules.

Cheers.
                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-01-25 21:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 15:12 [NTG-context] " Jim
2024-01-25 16:16 ` [NTG-context] " Henning Hraban Ramm
2024-01-25 21:01   ` Jim [this message]
2024-01-25 21:22     ` Wolfgang Schuster
2024-01-26  0:52       ` Jim
2024-01-26  7:18         ` vm via ntg-context
2024-01-26  8:55         ` Aditya Mahajan
2024-01-26 14:44           ` Jim
2024-01-25 16:30 ` Aditya Mahajan
2024-01-25 23:36   ` Jim
2024-01-26  0:25     ` Aditya Mahajan

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=ZbLMLhejwZGC4mPI@x360.localdomain \
    --to=zlists+context@jdvb.ca \
    --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).