From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46984 Path: news.gmane.org!not-for-mail From: "Bart C. Wise" Newsgroups: gmane.comp.tex.context Subject: Re: Questions about tables Date: Thu, 22 Jan 2009 13:27:57 -0700 Message-ID: <200901221327.57408.bntgcontext@wiseguysweb.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0464412819==" X-Trace: ger.gmane.org 1232656219 7924 80.91.229.12 (22 Jan 2009 20:30:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2009 20:30:19 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 22 21:31:31 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LQ6Cw-0000dU-Ht for gctc-ntg-context-518@m.gmane.org; Thu, 22 Jan 2009 21:31:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 686571FE1F; Thu, 22 Jan 2009 21:29:57 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23475-05; Thu, 22 Jan 2009 21:29:15 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 148A01FE5E; Thu, 22 Jan 2009 21:29:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 966DD1FE5E for ; Thu, 22 Jan 2009 21:29:13 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26464-04 for ; Thu, 22 Jan 2009 21:29:04 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by ronja.ntg.nl (Postfix) with ESMTP id EA8CE1FE4C for ; Thu, 22 Jan 2009 21:29:04 +0100 (CET) Original-Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by filter3-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0MKT2uB001927 for ; Thu, 22 Jan 2009 21:29:03 +0100 Original-Received: from mx04.mta.xmission.com ([166.70.13.214]) by out01.mta.xmission.com with esmtp (Exim 4.62) (envelope-from ) id 1LQ6Ap-0004nF-LS; Thu, 22 Jan 2009 13:29:11 -0700 Original-Received: from bwise1.provo.novell.com ([137.65.171.141] helo=bwise1.localnet) by mx04.mta.xmission.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LQ69m-0001Tb-Ou; Thu, 22 Jan 2009 13:29:01 -0700 User-Agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; x86_64; ; ) In-Reply-To: X-XM-SPF: eid=; ; ; mid=; ; ; hst=mx04.mta.xmission.com; ; ; ip=137.65.171.141; ; ; frm=bntgcontext@wiseguysweb.com; ; ; spf=none X-SA-Exim-Connect-IP: 137.65.171.141 X-SA-Exim-Rcpt-To: ntg-context@ntg.nl, cldwesterhof@gmail.com X-SA-Exim-Mail-From: bntgcontext@wiseguysweb.com X-SA-Exim-Version: 4.2.1 (built Thu, 07 Dec 2006 04:40:56 +0000) X-SA-Exim-Scanned: No (on mx04.mta.xmission.com); Unknown failure X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=166.70.13.231; country=US; region=UT; city=Salt Lake City; latitude=40.7242; longitude=-111.8787; metrocode=770; areacode=801; http://maps.google.com/maps?q=40.7242,-111.8787&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 169353332 - d226365442d7 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:46984 Archived-At: --===============0464412819== Content-Type: multipart/alternative; boundary="Boundary-00=_NbNeJbYTO49w9uu" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-00=_NbNeJbYTO49w9uu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit On Wednesday 21 January 2009 06:16:36 pm Cecil Westerhof wrote: > I have the following table: > \starttable[|cp(.12\textwidth)|cp(.12\textwidth)|cp(.18\textwidth)|cp(.18\t >extwidth)|cp(.12\textwidth)|cp(.12\textwidth)|cp(.12\textwidth)|] \HL > \CL[darkyellow]\SR > \VL Verwerkt \VL Datum \VL Km-stand \VL Kilometers \VL c/l \VL Liter > \VL Prijs \VL \SR > \HL > \VL \VL \VL \VL \VL \VL > \VL \VL \SR > \HL > \stoptable > > There are two problems with it: > - The horizontal line at the top disappears because of the color. Is > there a way to get it back? > - The table is on the right side of the paper. How can I get it > centered on the page? > > Also is it possible to let the rows fill the complete page? I mean: if > there is room for 40 rows, that there are automatically 40 rows. Cecil, Here's a stab. It uses a macro that Wolfgang wrote on getting the line count to automatically populate the page. However, there's one caveat, I could not start the table at the beginning of the page, I had to put a ".\par" in first. Other than that, it works. \setupcolors[state=start] \showframe \def\TEntry#1#2#3#4#5#6{ \bTR \bTD #1 \eTD \bTD #2 \eTD \bTD #3 \eTD \bTD #4 \eTD \bTD #5 \eTD \bTD #6 \eTD \eTR } \setupTABLE[c][each][align=middle,height=\lineheight] \setupTABLE[r][1][background=color,backgroundcolor=darkyellow] \setupTABLE[c][each][width=0.12\textwidth] \setupTABLE[c][3,4][width=0.18\textwidth] \starttext .\par \startalignment[middle] \dontleavehmode \bTABLE \bTR \bTD Verwerkt \eTD \bTD Datum \eTD \bTD Km-stand \eTD \bTD Kilometers \eTD \bTD c/l \eTD \bTD Liter \eTD \eTR \getnoflines{\dimexpr\pagegoal-\pagetotal-3\lineheight\relax}% \dorecurse{\noflines}{\TEntry{}{}{}{}{}{}} \eTABLE \stopalignment \stoptext Bart --Boundary-00=_NbNeJbYTO49w9uu Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit

On Wednesday 21 January 2009 06:16:36 pm Cecil Westerhof wrote:

> I have the following table:

> \starttable[|cp(.12\textwidth)|cp(.12\textwidth)|cp(.18\textwidth)|cp(.18\t

>extwidth)|cp(.12\textwidth)|cp(.12\textwidth)|cp(.12\textwidth)|] \HL

> \CL[darkyellow]\SR

> \VL Verwerkt \VL Datum \VL Km-stand \VL Kilometers \VL c/l \VL Liter

> \VL Prijs \VL \SR

> \HL

> \VL \VL \VL \VL \VL \VL

> \VL \VL \SR

> \HL

> \stoptable

>

> There are two problems with it:

> - The horizontal line at the top disappears because of the color. Is

> there a way to get it back?

> - The table is on the right side of the paper. How can I get it

> centered on the page?

>

> Also is it possible to let the rows fill the complete page? I mean: if

> there is room for 40 rows, that there are automatically 40 rows.

Cecil,

Here's a stab. It uses a macro that Wolfgang wrote on getting the line count to automatically populate the page. However, there's one caveat, I could not start the table at the beginning of the page, I had to put a ".\par" in first. Other than that, it works.

\setupcolors[state=start]

\showframe

\def\TEntry#1#2#3#4#5#6{

\bTR

\bTD #1 \eTD

\bTD #2 \eTD

\bTD #3 \eTD

\bTD #4 \eTD

\bTD #5 \eTD

\bTD #6 \eTD

\eTR

}

\setupTABLE[c][each][align=middle,height=\lineheight]

\setupTABLE[r][1][background=color,backgroundcolor=darkyellow]

\setupTABLE[c][each][width=0.12\textwidth]

\setupTABLE[c][3,4][width=0.18\textwidth]

\starttext

.\par

\startalignment[middle]

\dontleavehmode

\bTABLE

\bTR

\bTD Verwerkt \eTD

\bTD Datum \eTD

\bTD Km-stand \eTD

\bTD Kilometers \eTD

\bTD c/l \eTD

\bTD Liter \eTD

\eTR

\getnoflines{\dimexpr\pagegoal-\pagetotal-3\lineheight\relax}%

\dorecurse{\noflines}{\TEntry{}{}{}{}{}{}}

\eTABLE

\stopalignment

\stoptext

Bart

--Boundary-00=_NbNeJbYTO49w9uu-- --===============0464412819== 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0464412819==--