I have the following table: \starttable[|cp(.12\textwidth)|cp(.12\textwidth)|cp(.18\textwidth)|cp(.18\textwidth)|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 Westerhof
2009/1/22 Cecil Westerhof
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
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 On Jan 22, 2009, at 10:43 AM, Cecil Westerhof wrote:
2009/1/22 Cecil Westerhof
: 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
___________________________________________________ ________________________________ 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 ______________________________________________________________________ _____________
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
Am 22.01.2009 um 21:27 schrieb Bart C. Wise:
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.
\starttext .\par
Use the following to remove the gap at the top of the page. \dontleavehmode\vskip-\dimexpr\lineheight+\topskip\relax\par Wolfgang
participants (4)
-
Bart C. Wise
-
Cecil Westerhof
-
Willi Egger
-
Wolfgang Schuster