From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78551 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?B?UHJvY2jhemthIEx1a+G5IEluZy4gLSBQb250ZXggcy4gci4gby4=?= Newsgroups: gmane.comp.tex.context Subject: Re: TABLE and row/column align settings Date: Wed, 03 Oct 2012 11:11:43 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1349255470 22400 80.91.229.3 (3 Oct 2012 09:11:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2012 09:11:10 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 03 11:11:16 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TJKyl-0005YU-UZ for gctc-ntg-context-518@m.gmane.org; Wed, 03 Oct 2012 11:10:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B8EC210227; Wed, 3 Oct 2012 11:10:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z5E64ID0hKGj; Wed, 3 Oct 2012 11:10:46 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8CBB5101F1; Wed, 3 Oct 2012 11:10:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 85070101F1 for ; Wed, 3 Oct 2012 11:10:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JLThzJLcB8Iy for ; Wed, 3 Oct 2012 11:10:43 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 51AF4101E8 for ; Wed, 3 Oct 2012 11:10:43 +0200 (CEST) Original-Received: from mail.pontex.cz (mail.pontex.cz [89.233.168.98]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q9397R8N008735 for ; Wed, 3 Oct 2012 11:07:29 +0200 Original-Received: from localhost ([127.0.0.1]) by mail.pontex.cz (Kerio MailServer 6.6.2) for ntg-context@ntg.nl; Wed, 3 Oct 2012 11:10:38 +0200 In-Reply-To: User-Agent: Opera Mail/12.02 (Win32) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=89.233.168.98; country=CZ; region=52; city=Prague; latitude=50.0833; longitude=14.4667; http://maps.google.com/maps?q=50.0833,14.4667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WI6x7s55 - c5c9b2a24c2a - 20121003 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78551 Archived-At: ... Thanks for the answer but - - I generated a macro just do demonstrate different behavior in row #1 depe= nding on whether settings for columns were specified for a PARTICULAR colum= n ("\setupTABLE[column][2][...]") or for columns IN GENERAL ("\setupTABLE[c= olumn][][...]"). I need the case with a particular column settings to work: ---- \starttext \bTABLE \setupTABLE[width=3D2cm] \setupTABLE[column][2][align=3Dflushright] \setupTABLE[row][1][align=3Dmiddle] % Settings for ALL columns in the = row 1 should be overwritten; but are not (?!) \bTABLEhead[align=3Dmiddle] \bTR \bTH[align=3Dmiddle] a\eTH \bTH[align=3Dmiddle] b\eTH \eTR \eTABLEhead \bTABLEbody \bTR \bTD a\eTD \bTD b\eTD \eTR \eTABLEbody \eTABLE \stoptext ---- You can see that "\setupTABLE[row][1][align=3Dmiddle]" doesn't affect colum= n #2, which keeps its previously setting "\setupTABLE[column][2][align=3Dfl= ushright]"; this is unwanted. I'd need "\setupTABLE[row][1][align=3Dmiddle]" to overwrite the column #2 s= etting, so that all columns in the row #1 be mid-aligned. Lukas On Wed, 03 Oct 2012 10:53:39 +0200, Wolfgang Schuster wrote: > > Am 03.10.2012 um 10:16 schrieb Proch=E1zka Luk=E1=B9 Ing. - Pontex s. r. = o. : > >> Hello, >> >> I have a complicated TABLE, but I simplified it to the following example: >> >> ---- >> \def\DoTable#1{% >> \bTABLE >> \setupTABLE[width=3D2cm] >> \setupTABLE[column][#1][align=3Dflushright] % .......................= ................................ [1] >> \setupTABLE[row][1][align=3Dmiddle] % Settings for ALL columns in the= row 1 should be overwritten ... [2] >> \bTABLEhead >> \bTR >> \bTH a\eTH >> \bTH b\eTH >> \eTR >> \eTABLEhead >> \bTABLEbody >> \bTR >> \bTD a\eTD >> \bTD b\eTD >> \eTR >> \eTABLEbody >> \eTABLE >> } >> >> \starttext >> No column specification: \DoTable{} >> >> With column specification: \DoTable{2} >> \stoptext >> ---- >> >> The problem is that row #1 should be mid-aligned in all columns. So I wr= ote: >> >> ---- >> \setupTABLE[column][2][align=3Dflushright] % Column #2 has its own al= ignment... >> \setupTABLE[row][1][align=3Dmiddle] % ... but overwrite here for the = whole row #1 (including column #2) >> ---- >> >> But column #2 keeps the previously assigned alignment. >> >> The situation doesn't change even if I swap [1] and [2] (for the case "t= he earlier setting, the higher priority"). >> >> Moreover, if the column number if not specified (\DoTable{}), the row se= tting overwrites setting for ALL columns; so only if the column is specifie= d precisely, its setting is kept. >> >> So how to overwrite row #1 setting globally? >> >> And how setting priorities are evaluated? I guessed the later specificat= ion, the higher weight (which would allow overwriting)... >> >> Note that in the example it would be possible to specify settings for ea= ch row/column, but it not useful way in the case of more/very complicated t= ables. > > \def\DoTable > {\dosingleempty\DodoTable} > > \def\DodoTable[#1]% > {\bgroup > \setupTABLE[width=3D2cm]% > \doifsomething{#1}{\setupTABLE[column][#1][align=3Dflushright]}% > \setupTABLE[header][align=3Dmiddle]% > \bTABLE > \bTABLEhead > \bTR > \bTH a\eTH > \bTH b\eTH > \eTR > \eTABLEhead > \bTABLEbody > \bTR > \bTD a\eTD > \bTD b\eTD > \eTR > \eTABLEbody > \eTABLE > \egroup} > > \starttext > > No column specification: \DoTable > > With column specification: \DoTable[2] > > \stoptext > > Wolfgang -- = Ing. Luk=E1=B9 Proch=E1zka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezov=E1 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________