ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* splitted xtable with repeating headers and placetable
@ 2020-04-04 14:46 Geert Dobbels
  2020-04-04 16:46 ` Pablo Rodriguez
  2020-04-04 19:44 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Geert Dobbels @ 2020-04-04 14:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3342 bytes --]

Hello,

Code below shows some behaviour I cannot explain (csv file attached):

- If I run the code below as is, I get what I want, except that the
header line of the table does not repeat at the top of each page.
- Changing "split=yes" to "split=repeat" in the setupxtable gives me
repeating headers, but the table starts at the second page, leaving the
first page with only the text line and all the rest as blank spaces.
- Placing the table in a float by activating the 3 commented lines gives
me an error ("extra } or forgotten endgroup") pointing to the external
figure in my page header overlay.  Replacing the \placefigure..... in
the page header by ordinary text makes the error go away, but is no
solution, since I need the company logo picture there, and even then
with no error, the headers do not repeat.
- With the table in a float, I manage to get repeating headers when I
change to "split=yes" and "headers=repeat" in the \setupxtable, but I
still get the abovementioned error as soon as I want to put my figure
back in the page header......

Any suggestions ?

Geert




\usemodule[handlecsv]

\opencsvfile{systaprov2.csv}

\setuppapersize[A4, landscape]

\setuplayout[location=middle, width=27.5cm, height=18cm,
backspace=1cm,header=4cm]

\setuppagenumbering[state=stop]

\setupcaptions[location=none]

\setupbackgrounds[header][text][background={Logos}, state=repeat]

\setupnumbering [location=]

\setupframed[offset=none]

\defineoverlay

[Logos][{

\framed[width=\textwidth,

height=3cm,

align=right,

strut=no,

offset=none,

frame=on,

frameoffset=0.1cm,

corner=round,

radius=0.15cm,

framecolor=darkgray,

background=color,

backgroundcolor=gray,

framecorner=round,

frameradius=0.15cm,

rulethickness=0.05cm]{

\framed[width=0.280\textwidth,

height=3cm,

align=right,

frame=off]

{\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} }

\framed[width=0.430\textwidth,

height=3cm,

align=middle,

frame=off]

{\crlf\tfa \crlf \bf Technical Report}

\framed[width=0.370\textwidth,

height=3cm,

align=middle,

frame=off]

{\tfx \crlf Annex T.2.3. \crlf \tfx Date of issue: \crlf \currentdate
\crlf page \pagenumber of \lastpage}

}

}]

%\setupfloat[table][default={force,split}]

\setupxtable[offset=0cm,

frame=off,

bottomframe=on,

framecolor=gray,

option=stretch,

split=yes,

header=repeat,

align=middle]

\setupxtable[head][background=color,

backgroundcolor=gray,

topframe=on,

bottomframe=on,

framecolor=black,

foregroundcolor=blue]

\setupxtable[left][align=right]

\starttext

Some lines of text. This text must come just before the table, but only
on the first page of the table

\startbuffer[loop]

\startxrow

\startxcell[left] \cA \stopxcell

\startxcell[left] \cB \stopxcell

\startxcell[left] \cC \stopxcell

\startxcell[left] \cD \stopxcell

\startxcell \cE \stopxcell

\startxcell[left] \cF \stopxcell

\startxcell \cG \stopxcell

\startxcell \cH \stopxcell

\doifdefined{cI}{\startxcell \cI \stopxcell}

\doifdefined{cJ}{\startxcell \cJ \stopxcell}

\doifdefined{cK}{\startxcell [left] \cK \stopxcell}

\stopxrow

\stopbuffer

%\startplacetable[]

\startxtable

\startxtablehead[head]

\doloopif{\lineno}{<}{2}{\getbuffer[loop]}

\stopxtablehead

\startxtablebody

\doloopif{\lineno}{>}{1}{\getbuffer[loop]}

\stopxtablebody

\stopxtable

%\stopplacetable

\stoptext


[-- Attachment #1.2: Type: text/html, Size: 16629 bytes --]

[-- Attachment #2: systaprov2.csv --]
[-- Type: text/csv, Size: 6374 bytes --]

Nº;Subject;Dirno;Tano; Date;Corr;VAVE; Stage; Remark
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;

[-- Attachment #3: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: splitted xtable with repeating headers and placetable
  2020-04-04 14:46 splitted xtable with repeating headers and placetable Geert Dobbels
@ 2020-04-04 16:46 ` Pablo Rodriguez
  2020-04-04 19:44 ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2020-04-04 16:46 UTC (permalink / raw)
  To: ntg-context

On 4/4/20 4:46 PM, Geert Dobbels wrote:
> Hello,
>
> Code below shows some behaviour I cannot explain (csv file attached):
>
> - If I run the code below as is, I get what I want, except that the
> header line of the table does not repeat at the top of each page.

Hi Geert,

this is the standard and intended behavior (documented on page 10 from
xtables-mkiv.pdf).

> - Changing "split=yes" to "split=repeat" in the setupxtable gives me
> repeating headers, but the table starts at the second page, leaving the
> first page with only the text line and all the rest as blank spaces.

This is a known bug, already reported at the devel mailing list
(https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html).

> - Placing the table in a float by activating the 3 commented lines gives
> me an error ("extra } or forgotten endgroup") pointing to the external
> figure in my page header overlay.  Replacing the \placefigure..... in
> the page header by ordinary text makes the error go away, but is no
> solution, since I need the company logo picture there, and even then
> with no error, the headers do not repeat.

Well, these are different issues.

> - With the table in a float, I manage to get repeating headers when I
> change to "split=yes" and "headers=repeat" in the \setupxtable, but I
> still get the abovementioned error as soon as I want to put my figure
> back in the page header......

My guess: an alternative approach would be to use layers (and adapting
the topspace to the layer on the top of the page).

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: splitted xtable with repeating headers and placetable
  2020-04-04 14:46 splitted xtable with repeating headers and placetable Geert Dobbels
  2020-04-04 16:46 ` Pablo Rodriguez
@ 2020-04-04 19:44 ` Wolfgang Schuster
  2020-04-04 22:30   ` Geert Dobbels
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2020-04-04 19:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Geert Dobbels

Geert Dobbels schrieb am 04.04.2020 um 16:46:
> Hello,
> 
> Code below shows some behaviour I cannot explain (csv file attached):
> 
> - If I run the code below as is, I get what I want, except that the 
> header line of the table does not repeat at the top of each page.
> - Changing "split=yes" to "split=repeat" in the setupxtable gives me 
> repeating headers, but the table starts at the second page, leaving the 
> first page with only the text line and all the rest as blank spaces.
> - Placing the table in a float by activating the 3 commented lines gives 
> me an error ("extra } or forgotten endgroup") pointing to the external 
> figure in my page header overlay.  Replacing the \placefigure..... in 
> the page header by ordinary text makes the error go away, but is no 
> solution, since I need the company logo picture there, and even then 
> with no error, the headers do not repeat.
> - With the table in a float, I manage to get repeating headers when I 
> change to "split=yes" and "headers=repeat" in the \setupxtable, but I 
> still get the abovementioned error as soon as I want to put my figure 
> back in the page header......
> 
> Any suggestions ?

Can you make your example simpler and reduce it to the bare minimum 
(replace your csv file which dummy content) which is required to show 
the error.

Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: splitted xtable with repeating headers and placetable
  2020-04-04 19:44 ` Wolfgang Schuster
@ 2020-04-04 22:30   ` Geert Dobbels
  2020-04-05  9:02     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Dobbels @ 2020-04-04 22:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users, wolfgang Schuster


[-- Attachment #1.1: Type: text/plain, Size: 2704 bytes --]

Wolfgang,

Below is what I think is the bare minimum to explain this question
(sorry for not doing it right from the beginning...)

As I said, with the code as it is below, the header is not repeated
after the first page, but the table is in the right place.

Replacing "split=yes" by "split=repeat" makes the header repeat
correctly but puts the beginning of the table on the next page, leaving
the first page nearly completely blank.

In both cases, the "header=repeat" setting has no influence at all on
the behaviour and can be omitted without changing the results.

As I read in some other posts, sometimes putting the table in a float
can help, so I tried this (by removing the 3 "%" in the code below), but
there seems to be a conflict with the figure in the page header, and it
stops with an error message.

However, replacing the figure in the page header by a normal text
suddenly solves the problem: putting "split" in the setupfloat and
"header=repeat" in the setupxtable gives me a table with repeated
headers that starts exactly where I want it to start. Apparently in this
case, the "headers=repeat" is necessary. Unfortunately, I need a company
logo up in the page header, which is what causes the error for which I
have no explanation.

btw: I am using context standalone version: 2020.01.30 14:13

=====================================================

\setuppapersize[A4, landscape]

\setuplayout[location=middle, width=27.5cm, height=18cm,
backspace=1cm,header=4cm]

\setupcaptions[location=none]

\setupbackgrounds[header][text][background={Logos}, state=repeat]

\defineoverlay

[Logos][{

\framed[width=\textwidth, height=3cm, align=right, strut=no, offset=none]{

\framed[width=0.280\textwidth,height=3cm,align=right,]

{\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} }

\framed[width=0.430\textwidth,height=3cm,align=middle] {sometext in the
middle}

\framed[width=0.270\textwidth, height=3cm, align=middle]{sometext on the
right}

}

}]

%\setupfloat[table][default={force,split}]

\setupxtable[ option=stretch,split=repeat,header=repeat,align=middle]

\setupxtable[head][background=color,backgroundcolor=gray,foregroundcolor=red]

\starttext

Some lines of text. This text must come just before the table, but only
on the first page of the table

\def\onerow{

\startxrow

\startxcell first \stopxcell

\startxcell second \stopxcell

\startxcell third \stopxcell

\startxcell fourth \stopxcell

\startxcell fifth \stopxcell

\startxcell sixth \stopxcell

\stopxrow}

%\startplacetable

\startxtable

\startxtablehead[head]

\onerow

\stopxtablehead

\startxtablebody

\dorecurse{40}{\onerow}

\stopxtablebody

\stopxtable

%\stopplacetable

\stoptext


[-- Attachment #1.2: Type: text/html, Size: 11168 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: splitted xtable with repeating headers and placetable
  2020-04-04 22:30   ` Geert Dobbels
@ 2020-04-05  9:02     ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2020-04-05  9:02 UTC (permalink / raw)
  To: Geert Dobbels; +Cc: mailing list for ConTeXt users

Geert Dobbels schrieb am 05.04.2020 um 00:30:
> Wolfgang,
> 
> Below is what I think is the bare minimum to explain this question 
> (sorry for not doing it right from the beginning...)

Keep it up.

> As I said, with the code as it is below, the header is not repeated 
> after the first page, but the table is in the right place.
> 
> Replacing "split=yes" by "split=repeat" makes the header repeat 
> correctly but puts the beginning of the table on the next page, leaving 
> the first page nearly completely blank.

I already reported the problem on the dev-list. The reason is that
ConTeXt creates one big table and splits it afterwards in smaller
parts which fit on each page but when you use "split=repeat" the
part for the first page is too large to fit.

> In both cases, the "header=repeat" setting has no influence at all on 
> the behaviour and can be omitted without changing the results.
> 
> As I read in some other posts, sometimes putting the table in a float 
> can help, so I tried this (by removing the 3 "%" in the code below), but 
> there seems to be a conflict with the figure in the page header, and it 
> stops with an error message.

Don't use floats in the header or footer, they serve no purpose
and you can include images without it. Below is a solution
with nested frames but you can also use a table to create
the header layout.

> However, replacing the figure in the page header by a normal text 
> suddenly solves the problem: putting "split" in the setupfloat and 
> "header=repeat" in the setupxtable gives me a table with repeated 
> headers that starts exactly where I want it to start. Apparently in this 
> case, the "headers=repeat" is necessary. Unfortunately, I need a company 
> logo up in the page header, which is what causes the error for which I 
> have no explanation.

Here is a working version of your example but you have to a space
between the header and the page body (see headerdistance setting)
or reduce the height of the outer most frame (it uses at the moment
the height and width of the header area).

\setuppapersize[A4,landscape]

\setuplayout
   [location=middle,
    width=27.5cm,
    height=18cm,
    backspace=1cm,
    header=4cm,
    headerdistance=5mm]

\startsetups[header]
     \startframed[width=max,height=max,frame=off,offset=overlay]
         \startframed[height=1cm,width=max,frame=off]
             \userpagenumber
         \stopframed
         \par
         \startframed[height=3cm,width=max,offset=overlay]
             \startframed[width=0.25\hsize,height=max]
                 \externalfigure[dummy][height=1.9cm]
             \stopframed
             \startframed[width=0.50\hsize,height=max,] % 
frame=off,topframe=on,bottomframe=on
                 some text in the middle block
             \stopframed
             \startframed[width=0.25\hsize,height=max]
                 some text in the right block
             \stopframed
         \stopframed
     \stopframed
\stopsetups

\setupheadertexts[\directsetup{header}]

\startbuffer[tablerow]
     \startxrow
         \startxcell first \stopxcell
         \startxcell second \stopxcell
     \stopxrow
\stopbuffer

\startbuffer[table]
     \startxtable
         \startxtablehead[head]
             \getbuffer[tablerow]
         \stopxtablehead
         \startxtablebody
             \dorecurse{40}{\getbuffer[tablerow]}
         \stopxtablebody
     \stopxtable
\stopbuffer

\setupxtable
   [option=stretch,
    split=repeat,
    header=repeat,
    align=middle]

\setupxtable
   [head]
   [background=color,
    backgroundcolor=gray]

\starttext

\title{Table without float environment}

\samplefile{ward}

\getbuffer[table]

\title{Table with  float environment}

\samplefile{ward}

\startplacetable[location={none,split}]
     \getbuffer[table]
\stopplacetable

\stoptext

Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-05  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 14:46 splitted xtable with repeating headers and placetable Geert Dobbels
2020-04-04 16:46 ` Pablo Rodriguez
2020-04-04 19:44 ` Wolfgang Schuster
2020-04-04 22:30   ` Geert Dobbels
2020-04-05  9:02     ` Wolfgang Schuster

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).