ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xtable First row missing in document
@ 2018-11-23 15:14 Christopher Bock
  2018-11-24  9:59 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Bock @ 2018-11-23 15:14 UTC (permalink / raw)
  To: ntg-context


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

Hi all,

 

I think I found another bug in xtable (or placetable). 

 

The last table in the MWE is not showing the first row (the header row).

 

Thanks,

Chris


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

[-- Attachment #2: mwe.pdf --]
[-- Type: application/pdf, Size: 23682 bytes --]

[-- Attachment #3: mwe.tex --]
[-- Type: application/octet-stream, Size: 6551 bytes --]

\setupexternalfigures[location={local,global,default}]

\setuplayout
[edge=1mm,
edgedistance=1mm,
margin=15mm,
margindistance=1mm,
top=6mm,
topdistance=1mm,
header=17mm,
headerdistance=1mm,
footerdistance=6mm,
footer=15mm,
bottomdistance=1mm,
bottom=5mm,
%calculated
topspace=\dimexpr\topheight+\topdistance,
backspace=\dimexpr\leftedgewidth+\leftedgedistance+\leftmarginwidth+\leftmargindistance,
width=\dimexpr 210mm-\backspace*2 ,
height=\dimexpr 297mm-\topspace-\bottomdistance-\bottomheight,
textheight=\dimexpr\height-\headerheight-\headerdistance-\footerdistance-\footerheight]

\define[1]\docListBulleted
	{\startitemize[1][before={\blank[small]},after={\blank[big]},inbetween={\blank[small]}] #1 \stopitemize}
	
\define[1]\docListNumbered
	{\startitemize[n][before={\blank[small]},after={\blank[big]},inbetween={\blank[small]}] #1 \stopitemize}
	
\define[3]\docGraphic
	{\placefigure[force][#1]{#2}{\externalfigure[#3][scale=200, maxwidth=0.95\textwidth, maxheight=0.95\textheight]}}

\setupxtable
  [headerheader]
  [foregroundcolor=white,
   foregroundstyle=bold,
   background=color,
   backgroundcolor=black]
   
\setupxtable
  [blackrow]
  [foregroundcolor=black,
   background=color,
   backgroundcolor=black,
   width=0.5cm]
   
\setupxtable
  [cellheader]
  [foregroundcolor=black,
   foregroundstyle=bold,
   background=color,
   backgroundcolor=gray,
   width=\dimexpr\textwidth-0.5cm]
\setupxtable
  [cellbody]
  [foregroundcolor=black,
   background=color,
   backgroundcolor=white,
   width=\dimexpr\textwidth-0.5cm]


\starttext
dddd

\emptylines[25]

dddfdf

\startsection
  [
    reference={},
    title={text text text text}
  ]
texttexttext
\placetable[force,split]
   []
   {Tool: text}  {
\startxtable[split=yes]
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] Tool: text      \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Description:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
Tootextements. 
      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Impact:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
TI 2 (Impact) 
      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Input Artifacts:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item testext
  \item vptext
  \item vpltext
}

      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Otext text text text      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item dd
  \item dd)d
  \item vpladdanuadd
}

      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
\placetable[force,split]
   []
   {text}  {
\startxtable[split=yes]
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] text     \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Description:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
-None- 
      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Version:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
text 
      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
\startsubsection
  [
    reference={},
    title={Use Cases of text}
  ]
text text text text
\blank
text text text text
\docListNumbered{
  \item text text text text
  \item Extext text text text
  \item Imtext text text text
  \item Imtext text text text
}

\startsubsubsection
  [
    reference={DocSection_100031},
    title={text text text text}
  ]
text text text text
\placetable[force,split]
   []
   {text text text text}  {
\startxtable[split=yes]
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] text text text text     \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] text text text text    \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
text text text text
      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
This use case requires 2 features.  \in{Figure}[DocGraphic_100032] shows the dependencies between the use cases and features.
\docGraphic{DocGraphic_100032}{Dependencyddddd dsfdf}{cow}

The use case text features:
\docListBulleted{
  \item text text text text
  \item text text text text
}

text text text text


\placetable[force,split]
   []
   {text text text text}  {
\startxtable[split=yes]
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] This is the missing text    \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] text text text text     \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item text text text text 
}

      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] text text text text      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item text text text text
}

      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
\stopsubsubsection
\stopsubsection
\stopsection
\stopchapter

\stoptext


[-- Attachment #4: Type: text/plain, Size: 492 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] 3+ messages in thread

* Re: xtable First row missing in document
  2018-11-23 15:14 xtable First row missing in document Christopher Bock
@ 2018-11-24  9:59 ` Wolfgang Schuster
  2018-11-24 16:36   ` Christopher Bock
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2018-11-24  9:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Christopher Bock


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

Christopher Bock schrieb am 23.11.18 um 16:14:
>
> Hi all,
>
> I think I found another bug in xtable (or placetable).
>
> The last table in the MWE is not showing the first row (the header row).
>

Remove the split setting (\startxtable[split=yes]) from the tables 
because the "split" keyword
(\placetable[split]) from the float is enough to beak your tables across 
pages.

What happens with \startxtable[split=yes] is that ConTeXt changes the 
number of lines
it reserves on the current page before the break which isn’t enough to 
fit the first line
of the table together with the caption and the header.

Wolfgang


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

[-- Attachment #2: Type: text/plain, Size: 492 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] 3+ messages in thread

* Re: xtable First row missing in document
  2018-11-24  9:59 ` Wolfgang Schuster
@ 2018-11-24 16:36   ` Christopher Bock
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Bock @ 2018-11-24 16:36 UTC (permalink / raw)
  To: 'Wolfgang Schuster', 'mailing list for ConTeXt users'


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

When I remove the split from the xtable the file is compiling anymore. 

See attached MWE.

 

I narrowed the problem down to the command "\setupinteraction[state=start]".
Without it, there is no error shown.

 

Error Log:       I have no idea what the error message means. 

----------------------------------------------------------------------------
------

Underfull \hbox (badness 10000) detected at line 1

[]

 

tex error       > tex error on line 1 in file Z:/asdf/mwe.tex: ! Missing
number, treated as zero

 

<to be read again>

{

\strc_floats_place_packaged_boxes_indeed ...bute {

                                                  \doifelsemainfloatbody
\cu...

\strc_floats_finish_placement ...e_packaged_boxes

                                                  \dotagregisterfloat
\asked...

\syst_boxes_with_next_box ...mand {\box \nextbox }

                                                  \egroup \ifconditional
\so...

\tabl_split_direct_loop_body ...splitafterresult }

                                                  \global \settrue
\usesamef...

\syst_helpers_loop_yes ...helpers_recurse_content

                                                  \endofloop

...

l.137 \stopxtable

 

 

1 >>  \setupexternalfigures[location={local,global,default}]

2

3     \setupinteraction[state=start]

4

5     \setuplayout

6     [edge=1mm,

7     edgedistance=1mm,

8     margin=15mm,

9     margindistance=1mm,

10     top=6mm,

11     topdistance=1mm,

 

 

? mtx-context     | fatal error: return code: 100

 

 

Thanks

Chris

 

Von: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> 
Gesendet: Samstag, 24. November 2018 10:59
An: mailing list for ConTeXt users <ntg-context@ntg.nl>; Christopher Bock
<mailinglist.context@christopher-bock.de>
Betreff: Re: [NTG-context] xtable First row missing in document

 

Christopher Bock schrieb am 23.11.18 um 16:14:



Hi all,

 

I think I found another bug in xtable (or placetable). 

 

The last table in the MWE is not showing the first row (the header row).


Remove the split setting (\startxtable[split=yes]) from the tables because
the "split" keyword
(\placetable[split]) from the float is enough to beak your tables across
pages.

What happens with \startxtable[split=yes] is that ConTeXt changes the number
of lines
it reserves on the current page before the break which isn't enough to fit
the first line
of the table together with the caption and the header.

Wolfgang


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

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

\setupexternalfigures[location={local,global,default}]

\setupinteraction[state=start]

\setuplayout
[edge=1mm,
edgedistance=1mm,
margin=15mm,
margindistance=1mm,
top=6mm,
topdistance=1mm,
header=17mm,
headerdistance=1mm,
footerdistance=6mm,
footer=15mm,
bottomdistance=1mm,
bottom=5mm,
%calculated
topspace=\dimexpr\topheight+\topdistance,
backspace=\dimexpr\leftedgewidth+\leftedgedistance+\leftmarginwidth+\leftmargindistance,
width=\dimexpr 210mm-\backspace*2 ,
height=\dimexpr 297mm-\topspace-\bottomdistance-\bottomheight,
textheight=\dimexpr\height-\headerheight-\headerdistance-\footerdistance-\footerheight]

\define[1]\docListBulleted
	{\startitemize[1][before={\blank[small]},after={\blank[big]},inbetween={\blank[small]}] #1 \stopitemize}
	
\define[1]\docListNumbered
	{\startitemize[n][before={\blank[small]},after={\blank[big]},inbetween={\blank[small]}] #1 \stopitemize}
	
\define[3]\docGraphic
	{\placefigure[here][#1]{#2}{\externalfigure[#3][scale=200, maxwidth=0.95\textwidth, maxheight=0.95\textheight]}}

\setupxtable
  [headerheader]
  [foregroundcolor=white,
   foregroundstyle=bold,
   background=color,
   backgroundcolor=black]
   
\setupxtable
  [blackrow]
  [foregroundcolor=black,
   background=color,
   backgroundcolor=black,
   width=0.5cm]
   
\setupxtable
  [cellheader]
  [foregroundcolor=black,
   foregroundstyle=bold,
   background=color,
   backgroundcolor=gray,
   width=\dimexpr\textwidth-0.5cm]
\setupxtable
  [cellbody]
  [foregroundcolor=black,
   background=color,
   backgroundcolor=white,
   width=\dimexpr\textwidth-0.5cm]


\starttext
dddd

\emptylines[25]

dddfdf

\startsection
  [
    reference={},
    title={text text text text}
  ]
texttexttext
\placetable[here,split]
   []
   {Tool: text}  {
\startxtable
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] Tool: text      \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Description:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
Tootextements. 
      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Impact:      \stopxcell
    \stopxrow
    \startxrow
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
TI 2 (Impact) 
      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow][samepage=after]  \stopxcell
      \startxcell[cellheader][samepage=after] Input Artifacts:      \stopxcell
    \stopxrow
    \startxrow
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item testext
  \item vptext
  \item vpltext
}

      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Otext text text text      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item dd
  \item dd)d
  \item vpladdanuadd
}

      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
\placetable[here,split]
   []
   {text}  {
\startxtable
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] text     \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Description:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
-None- 
      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] Version:      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
text 
      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
\startsubsection
  [
    reference={},
    title={Use Cases of text}
  ]
text text text text
\blank
text text text text
\docListNumbered{
  \item text text text text
  \item Extext text text text
  \item Imtext text text text
  \item Imtext text text text
}

\startsubsubsection
  [
    reference={DocSection_100031},
    title={text text text text}
  ]
text text text text
\placetable[here,split]
   []
   {text text text text}  {
\startxtable
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] text text text text     \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] text text text text    \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
text text text text
      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
This use case requires 2 features.  \in{Figure}[DocGraphic_100032] shows the dependencies between the use cases and features.
\docGraphic{DocGraphic_100032}{Dependencyddddd dsfdf}{cow}

The use case text features:
\docListBulleted{
  \item text text text text
  \item text text text text
}

text text text text


\placetable[here,split]
   []
   {text text text text}  {
\startxtable
  \startxtablehead
    \startxrow
      \startxcell[headerheader][nx=2] text text text text     \stopxcell
    \stopxrow
  \stopxtablehead
  \startxtablebody
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] text text text text     \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item text text text text 
}

      \stopxcell
    \stopxrow
    \startxrow[samepage=after]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellheader] text text text text      \stopxcell
    \stopxrow
    \startxrow[samepage=before]
      \startxcell[blackrow]  \stopxcell
      \startxcell[cellbody] 
\docListBulleted{
  \item text text text text
}

      \stopxcell
    \stopxrow
  \stopxtablebody
\stopxtable
}
\stopsubsubsection
\stopsubsection
\stopsection
\stopchapter

\stoptext


[-- Attachment #3: Type: text/plain, Size: 492 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] 3+ messages in thread

end of thread, other threads:[~2018-11-24 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-23 15:14 xtable First row missing in document Christopher Bock
2018-11-24  9:59 ` Wolfgang Schuster
2018-11-24 16:36   ` Christopher Bock

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