From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 6B3F6229BD for ; Thu, 14 Nov 2024 20:14:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 0737B484835 for ; Thu, 14 Nov 2024 20:14:37 +0100 (CET) Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=ntg.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntg.nl; h= content-type:content-type:list-unsubscribe:list-subscribe :list-post:list-owner:list-help:list-archive:archived-at:list-id :subject:subject:reply-to:precedence:content-language :in-reply-to:mime-version:user-agent:date:date:message-id:from :from:references:received:received:received:received:received :received:received; s=cgl; t=1731611676; x=1734203677; bh=YkFR07 QkI8Uo4r6BiBnr2u9slxzUu3fNnE/4CJjnQ6M=; b=rWBtziSJYPXeeL10TXt0rr jXlHRh5ifsOQHY/2D6MUjnitUNz1oLS6bmSprSh6D/mV27AN5yZ+X49G9/0bXNxw 6sQ/4Gk0Y++omkyBNshu6DuWKNTyv+q61MQ3i3yT+Clvkxz/mPB8zM8ZNS2EZ9Cu OnCcChn50fVXsiXXuV3iQ= X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A6dkfaPenV6H for ; Thu, 14 Nov 2024 20:14:36 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A9C45484C68 for ; Thu, 14 Nov 2024 20:13:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 3163C483E12 for ; Thu, 14 Nov 2024 20:13:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tDfLfms7LNbt for ; Thu, 14 Nov 2024 20:13:20 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.46; helo=mail-ej1-f46.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id A6AAF483DF6 for ; Thu, 14 Nov 2024 20:13:20 +0100 (CET) Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a9a0ef5179dso183485866b.1 for ; Thu, 14 Nov 2024 11:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731611600; x=1732216400; darn=ntg.nl; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:from:to:cc:subject:date :message-id:reply-to; bh=DG7mYM1igRQb+jmz8TbThOUWaapWC9CNWc6S5lK62EY=; b=VO6kRek+RcEdsC682xCXFcdlGyg2w0AqwTV1PofLqbxyEXidOqPA3WPhT28USEEIrX tmwI/LOSqaoIfP+j5j5nnT08h71re8s4+aLkO/bOWepw3e/cG0UA9mnsXpQYuWn8IneA B4ewBQwKi6uEULkCBacJUQU49ftSPq51L216z6IWbJRW27lmfyi7/OT3dnUVuMqoLDkM f0Wq+9x25HTGQbUdh190lh14I212ZiSIfk8YvGTdqpebLCK8t5fDi+QBu6f9f7TjOa8V T8i96rQnikNISvzMoAD5Vj/Eg4bgIZPad+EbLKgwTMGTh7PnYdtM/lOeQo1QlUQbRL4V Q8Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731611600; x=1732216400; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DG7mYM1igRQb+jmz8TbThOUWaapWC9CNWc6S5lK62EY=; b=C7Cfl43fiRfg0AmYtGC/50FU1sVW+4NWHXLBnH6D9BC4SjK41MeHAU6Ll/xoeGTjW7 FvZ84/0ZHeiHQzO5QLA7NT8QA2zzqQh4jQltOF6ff2n9oi+PxmYFTkNF3QDEtThWg1nD 9pWrctWDyn067MlkoErDEmuZ6fGB3UNYrmEDt7BwLf2MK02RHr5oFPa1GHo6AkPteF4B ppYbjK4ya4tY9V3Ur/UiGKmNunZjrlyuQoQIXlfpZ2HoCJ8DakDh9YN7Dp+Xx6J36jRW 1r2bqVX0kniczVBt9E+3aAJU1ig8i3sVK6FdjoEv5gRgLUSCNC5y12rPoJ6GYvikSwnQ VCYw== X-Gm-Message-State: AOJu0Yy9wv8l2cOHrE/ulUnOnoP+z2xwoe+zf61Kvy1tYNXnJxWnhp3K dfFnwDEVTWZ/Ei2p0iqeLBrMJyBa147HizUZTe+9hhsTJyzVTxQP X-Google-Smtp-Source: AGHT+IE04NFla7NhihsijXNcyCvArtuljLApgEjv4W3bby1Q/kElx5O3sIa8qF7Fj/hBTRv+9oRL2A== X-Received: by 2002:a17:906:389:b0:aa1:f73b:be3d with SMTP id a640c23a62f3a-aa1f73bbf39mr593192466b.27.1731611599545; Thu, 14 Nov 2024 11:13:19 -0800 (PST) Received: from ?IPv6:2a02:810d:a8c0:7ec:2969:d8ad:db31:9070? ([2a02:810d:a8c0:7ec:2969:d8ad:db31:9070]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa20dffd695sm92577666b.114.2024.11.14.11.13.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2024 11:13:19 -0800 (PST) To: mailing list for ConTeXt users , Thomas Meyer References: <21d6d575-e2f0-c228-1fd1-db10ae39f614@gmail.com> <1aa402e0-7028-4e5b-84f1-e041e30a480d@t-online.de> <463aed1c-3422-4f02-90a4-d0b815780784@fiee.net> From: Wolfgang Schuster Message-ID: <3a988866-d930-2a6a-3340-7e36e6758399@gmail.com> Date: Thu, 14 Nov 2024 20:13:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.64 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Message-ID-Hash: A46HBHMKS3CEKSNHJYNZRRKQF6NZMD3V X-Message-ID-Hash: A46HBHMKS3CEKSNHJYNZRRKQF6NZMD3V X-MailFrom: wolfgang.schuster.lists@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Problem with tabulate List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============5500167932900386055==" This is a multi-part message in MIME format. --===============5500167932900386055== Content-Type: multipart/alternative; boundary="------------E83947CFF312CA97FEE91E9C" Content-Language: en-US This is a multi-part message in MIME format. --------------E83947CFF312CA97FEE91E9C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Thomas Meyer schrieb am 14.11.2024 um 12:02: > Hi Hraban, > > Wolfgangs example > > \start > \setupTABLE[start][frame=3Doff,width=3D11mm,align=3Dmiddle,offset=3D0pt= ] > \setupTABLE[row][first][topframe=3Don] > \setupTABLE[row][last][bottomframe=3Don] > \startTABLE > \NC[nc=3D2] Wurfst=C3=A4rke\\ R / H \NC\NR > \NC 2 \NC 3 \NC\NR > \stopTABLE > \stop > > seems to be a mixture of > \starttabulate > \NC \NC \NC\NR ... > > and > \setupTABLE > \bTABLE > \bTR \bTD ... > > For that what Wolfgang wrote I found nothing in the wiki. > No explanation for \start nor width nor the mixture(?) above ... > Perhaps Wolfgang can also comment on that. 1. \startTABLE The \startTABLE environment I used in my example is just a wrapper for=20 \bTABLE which saves typing for short/small tables. In the following example both tables produce the same results because=20 the first table is converted into the code used by the second table. %%%% begin example \starttext \startTABLE \NC table content \NC\NR \stopTABLE \bTABLE \bTR \bTD table content \eTD \eTR \eTABLE \stoptext %%%% end example 2. Table settings When you use the \bTABLE environment each cell is a \framed block where=20 you can set the width or height, framecolor etc. %%%% begin example \starttext \bTABLE \bTR \bTD[width=3D2cm,height=3D2cm,framecolor=3Dred,align=3D{middle,lohi}= ] table=20 content \eTD \eTR \eTABLE \startframed[width=3D2cm,height=3D2cm,framecolor=3Dred,align=3D{middle,lo= hi}]=20 table content \stopframed \stoptext %%%% end example 3. \setupTABLE With the \setupTABLE command you can change the values which are used to=20 format the cells of the table. With the first two optional arguments you can control whether settings=20 are applied only to certain table rows or columns but also for certain=20 cells (e.g. row 3 column 2). %%%% begin example \starttext \setupTABLE[framecolor=3Dred] \bTABLE \bTR \bTD first table \eTD \eTR \eTABLE \stoptext %%%% end example 4. \start When you use the \setupTABLE command like shown below the settings are=20 applied to all the following tables. %%%% begin example \starttext \setupTABLE[framecolor=3Dred] \bTABLE \bTR \bTD first table \eTD \eTR \eTABLE \bTABLE \bTR \bTD second table \eTD \eTR \eTABLE \stoptext %%%% end example To ensure the new color for the frame is only applied to the first table=20 add \start before you change the value with \setupTABLE and \stop after=20 the table. When you do this you create a local group where the changed frame color=20 is kept local to the group. %%%% begin example \starttext \start \setupTABLE[framecolor=3Dred] \bTABLE \bTR \bTD first table \eTD \eTR \eTABLE \stop \bTABLE \bTR \bTD second table \eTD \eTR \eTABLE \stoptext %%%% end example When you have multiple tables with the same style you don't want to=20 change the table values each time by hand. The method of choice here is to collect all changes to the table layout=20 in a \startsetups block (the argument is just a name for the block) and=20 load it afterwards at the start of the table with the setups key. %%%% begin example \starttext \startsetups [redtableframe] \setupTABLE[framecolor=3Dred] \stopsetups \bTABLE[setups=3Dredtableframe] \bTR \bTD first table \eTD \eTR \eTABLE \bTABLE \bTR \bTD second table \eTD \eTR \eTABLE \stoptext %%%% end example Wolfgang --------------E83947CFF312CA97FEE91E9C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thomas Meyer schrieb am 14.11.2024 um= =20 12:02:
=20 =20 Hi Hraban,

Wolfgangs example

\start
\setupTABLE[start][frame=3Doff,width=3D11mm,align=3Dmiddle,offset=3D0= pt]
\setupTABLE[row][first][topframe=3Don]
\setupTABLE[row][last][bottomframe=3Don]
\startTABLE
\NC[nc=3D2] Wurfst=C3=A4rke\\ R / H \NC\NR
\NC 2 \NC 3 \NC\NR
\stopTABLE
\stop

seems to be a mixture of
\starttabulate
\NC \NC \NC\NR ...

and
\setupTABLE
\bTABLE
\bTR \bTD ...

For that what Wolfgang wrote I found nothing in the wiki.
No explanation for \start nor width nor the mixture(?) above ...
Perhaps Wolfgang can also comment on that.

1. \startTABLE

The \startTABLE environment I used in my example is just a wrapper for=20 \bTABLE which saves typing for short/small tables.

In the following example both tables produce the same results because=20 the first table is converted into the code used by the second table.

%%%% begin example
\starttext

\startTABLE
\NC table content \NC\NR
\stopTABLE

\bTABLE
\bTR \bTD table content \eTD \eTR
\eTABLE

\stoptext
%%%% end example


2. Table settings

When you use the \bTABLE environment each cell is a \framed block where=20 you can set the width or height, framecolor etc.

%%%% begin example
\starttext

\bTABLE
\bTR \bTD[width=3D2cm,height=3D2cm,framecolor=3Dred,align=3D{middle,lohi}= ] table content \eTD \eTR
\eTABLE

\startframed[width=3D2cm,height=3D2cm,framecolor=3Dred,align=3D{middle,lo= hi}]=20 table content \stopframed

\stoptext
%%%% end example


3. \setupTABLE

With the \setupTABLE command you can change the values which are used to format the cells of the table.

With the first two optional arguments you can control whether settings=20 are applied only to certain table rows or columns but also for certain=20 cells (e.g. row 3 column 2).

%%%% begin example
\starttext

\setupTABLE[framecolor=3Dred]

\bTABLE
\bTR \bTD first table \eTD \eTR
\eTABLE

\stoptext
%%%% end example


4. \start

When you use the \setupTABLE command like shown below the settings are=20 applied to all the following tables.

%%%% begin example
\starttext

\setupTABLE[framecolor=3Dred]

\bTABLE
\bTR \bTD first table \eTD \eTR
\eTABLE

\bTABLE
\bTR \bTD second table \eTD \eTR
\eTABLE

\stoptext
%%%% end example

To ensure the new color for the frame is only applied to the first table add \start before you change the value with \setupTABLE and \stop after the table.

When you do this you create a local group where the changed frame color=20 is kept local to the group.

%%%% begin example
\starttext

\start
\setupTABLE[framecolor=3Dred]
\bTABLE
\bTR \bTD first table \eTD \eTR
\eTABLE
\stop

\bTABLE
\bTR \bTD second table \eTD \eTR
\eTABLE

\stoptext
%%%% end example

When you have multiple tables with the same style you don't want to=20 change the table values each time by hand.

The method of choice here is to collect all changes to the table layout=20 in a \startsetups block (the argument is just a name for the block) and=20 load it afterwards at the start of the table with the setups key.

%%%% begin example
\starttext

\startsetups [redtableframe]
\setupTABLE[framecolor=3Dred]
\stopsetups

\bTABLE[setups=3Dredtableframe]
\bTR \bTD first table \eTD \eTR
\eTABLE

\bTABLE
\bTR \bTD second table \eTD \eTR
\eTABLE

\stoptext
%%%% end example

Wolfgang

--------------E83947CFF312CA97FEE91E9C-- --===============5500167932900386055== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============5500167932900386055==--