From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78550 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: TABLE and row/column align settings Date: Wed, 3 Oct 2012 10:53:39 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1349254459 14328 80.91.229.3 (3 Oct 2012 08:54:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2012 08:54:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 03 10:54:24 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 1TJKiH-00016X-Dg for gctc-ntg-context-518@m.gmane.org; Wed, 03 Oct 2012 10:53:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5EA69101E8; Wed, 3 Oct 2012 10:53:45 +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 HupQQ5XfF0oN; Wed, 3 Oct 2012 10:53:43 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 77F89101F1; Wed, 3 Oct 2012 10:53:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1B166101F1 for ; Wed, 3 Oct 2012 10:53:42 +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 M5IesrFqhhi2 for ; Wed, 3 Oct 2012 10:53:41 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 5C381101E8 for ; Wed, 3 Oct 2012 10:53:41 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q938rewH029506 for ; Wed, 3 Oct 2012 10:53:40 +0200 Original-Received: by bkcjm1 with SMTP id jm1so6568925bkc.14 for ; Wed, 03 Oct 2012 01:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=poP16CU/lBIGaJvdgHZlMjDGYIaBwShz0yJnPQe1Wmk=; b=Lf9Zi7CB5hh4kXrGxBiRzE27TwLDiCoYGMUkLsCzw61GQkcabd0a5u6U46JknQrBp3 5mjX+SSNaE3e2hpBdf9erE8Q9Dl1n5oWF6/dlKdGOheVKJ+3BUzhSAxEhA76W8+KirO5 pX9PztUTBz1e92414ebyqCTAArFwXgmoBrs4DsOHCRNtQEPwlY0jVFBxGHmBE2/VlfRO J78qBR+NxkwBdRLpnL5/y7LqE0XAzdmzkWRV2W3obbU8ReCvdKOGRHcaIsZSuv4txceM aGREeGWbnGnfkyFHObWofrN5wnUvbM3h+fXFkrxo7ExvufWZClp+uw1eEZX4FvKvIwu1 oExg== Original-Received: by 10.204.130.200 with SMTP id u8mr64311bks.38.1349254420216; Wed, 03 Oct 2012 01:53:40 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbe6128.pool.mediaWays.net. [77.190.97.40]) by mx.google.com with ESMTPS id n5sm2772003bkv.14.2012.10.03.01.53.39 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2012 01:53:39 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1498) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QI6wRE2T - 2e3a120482b7 - 20121003 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:78550 Archived-At: 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 wro= te: > = > ---- > \setupTABLE[column][2][align=3Dflushright] % Column #2 has its own ali= gnment... > \setupTABLE[row][1][align=3Dmiddle] % ... but overwrite here for the w= hole 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 "th= e earlier setting, the higher priority"). > = > Moreover, if the column number if not specified (\DoTable{}), the row set= ting overwrites setting for ALL columns; so only if the column is specified= precisely, its setting is kept. > = > So how to overwrite row #1 setting globally? > = > And how setting priorities are evaluated? I guessed the later specificati= on, the higher weight (which would allow overwriting)... > = > Note that in the example it would be possible to specify settings for eac= h row/column, but it not useful way in the case of more/very complicated ta= bles. \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 ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________