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