ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <w.egger@boede.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Questions about tables
Date: Thu, 22 Jan 2009 20:33:22 +0100	[thread overview]
Message-ID: <3EB8E1DB-F34F-42D1-B63D-3AF666F7579B@boede.nl> (raw)
In-Reply-To: <bb8b59590901220143naa682b2v227981e640fe1c69@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

Hi Cecil,

You could use \showframe before starttext, then you will see the  
relations of the areas. Here I do not see that the placement of the  
table is incorrect.

I tried to use \doerecurse with the table-environment and I also did  
not get a result.

A possibility is to use another table environment:

\bTABLE
	\bTR
		\bTD  ... \eTD
	\eTR
\eTABLE

This environment has more possibilities than \starttable. Herein  
\dorecurse does work. Moreover support for colouring is more  
advanced. Look for details in the enattab.pdf

I suggest you to use buffers for the content that the loops typeset.

A sample is in your fuel.tex

Willi

[-- Attachment #2: fuel.tex --]
[-- Type: application/octet-stream, Size: 3395 bytes --]

\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\setuplayout
  [backspace=20mm,footer=5mm,header=5mm,height=middle,margin=1cm,topspace=0mm,width=middle,location=middle]
\setupindenting[yes,none]
\enableregime[utf-8]
\setupcolors[state=start]
\mainlanguage[nl]
\setupbodyfont[roman,7pt]
\setuppagenumbering[location=] 
\setupoutput[pdf]
% \gdef\@colorHeader{darkyellow}
% \gdef\@colorHighlightRow{lightgray}


% \startbuffer[Table]
%   \starttable[|Bcp(.10\textwidth)|Bcp(.10\textwidth)|Bcp(.15\textwidth)|Bcp(.15\textwidth)|Bcp(.10\textwidth)|Bcp(.10\textwidth)|Bcp(.10\textwidth)|]
%   \HL
%   \CL\yellow\SR
%   \VL Verwerkt \VL Datum \VL Km-stand \VL Kilometers \VL c/l \VL Liter \VL Prijs \VL \AR
%   \HL                                                                                 
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL                                                                                 
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL                                                                                 
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL                                                                                 
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL
%   \CL\screen\LR
% \stoptable
% \stopbuffer

% \startbuffer[Rows]
% \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%  \HL
%  \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%  \HL
%  \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%  \HL
%  \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%  \HL
%  \CL\screen \AR
% \stopbuffer

\startbuffer[Rows]
\bTR
	\bTD \strut \eTD
	\bTD \strut \eTD
	\bTD \strut \eTD
	\bTD \strut \eTD
	\bTD \strut \eTD
	\bTD \strut \eTD
	\bTD \strut \eTD
\eTR
\stopbuffer
\showframe
\starttext

% \dorecurse{4}{
% \starttable[|Bcp(.10\textwidth)|Bcp(.10\textwidth)|Bcp(.15\textwidth)|Bcp(.15\textwidth)|Bcp(.10\textwidth)|Bcp(.10\textwidth)|Bcp(.10\textwidth)|]
%   \HL
%   \VL Verwerkt \VL Datum \VL Km-stand \VL Kilometers \VL c/l \VL Liter \VL Prijs \VL \FR
%   \HL
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL                                                                                
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL                                                                                
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL                                                                                
%   \VL          \VL       \VL          \VL            \VL     \VL       \VL       \VL \AR
%   \HL
% % \dorecurse{4}{\getbuffer[Rows]}
% \stoptable
% \page}

\setupTABLE[r][each][width=.14\textwidth,align=middle]
\dorecurse{4}
{\bTABLE
	\bTR
		\bTD Verwerkt 	\eTD
		\bTD Datum		\eTD
		\bTD Km-stand 	\eTD
		\bTD Kilometers \eTD
		\bTD c/l        \eTD
		\bTD Liter      \eTD
		\bTD Prijs      \eTD
	\eTR
	\dorecurse{4}{\getbuffer[Rows]}	
\eTABLE
\page}
\stoptext

[-- Attachment #3: Type: text/plain, Size: 2230 bytes --]



On Jan 22, 2009, at 10:43 AM, Cecil Westerhof wrote:

> 2009/1/22 Cecil Westerhof <cldwesterhof@gmail.com>:
>> 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?
>
> That is only on screen. When printed, it is there.
>
>
>> - The table is on the right side of the paper. How can I get it
>> centered on the page?
>
> With a lot of experimenting, I am a lot further further. See the  
> atached file.
>
>
>> 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.
>
> There is even room for 43 rows. I do need to place them all by hand? I
> tried \dorecurse, but that did not work.
> Especially when the highlight is changed (now every five rows) this
> would be a lot of work.
>
> It is a little strange. The second page is reasonably placed. But the
> first page not. Why is the layout of the first page different?
>
> Tips to get the tables better in the middle and use more of the
> available space are welcome.
>
> I have a strange problem. When printing the first page, or the second
> page, there is no problem. Put when I try to print the complete
> document. The printer is busy a long time. At a certain point the
> printer is 'ready', but does not have printed the document. Anybody
> knows what could be happening?
> I am working with openSUSE and a HP Color LaserJet 1600.
>
> I also tried to make the document singlesided. But when I then placed
> two tables, they got on different pages instead of beside eachother.
> How would I place two tables beside eachother on singlesided paper?
>
> -- 
> Cecil  
> Westerhof<fuel.tex>___________________________________________________ 
> ________________________________
> 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
> ______________________________________________________________________ 
> _____________


[-- Attachment #4: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2009-01-22 19:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22  1:16 Cecil Westerhof
2009-01-22  9:43 ` Cecil Westerhof
2009-01-22 19:33   ` Willi Egger [this message]
2009-01-22 20:27 ` Bart C. Wise
2009-01-22 20:58   ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EB8E1DB-F34F-42D1-B63D-3AF666F7579B@boede.nl \
    --to=w.egger@boede.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).