ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Vertically stretched split table
@ 2014-04-07 12:56 Joshua Krämer
  2014-04-07 21:18 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua Krämer @ 2014-04-07 12:56 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

Dear list,

if I specify "option=height" with an xtable, a single-page
table is stretched vertically to fill the whole textheight.  However, I
need this feature with a multipage table.  In the following example,
the table on the first page should be stretched, but isn't:

\showframe
\starttext
\startxtable [option=height, split=yes]
  \startxrow
    \startxcell \input knuth \stopxcell
    \startxcell \input ward \stopxcell
  \stopxrow
  \startxrow
    \startxcell \input zapf \stopxcell
    \startxcell \input ward \stopxcell
  \stopxrow
  \startxrow
    \startxcell \input knuth \stopxcell
    \startxcell \input ward \stopxcell
  \stopxrow
\stopxtable
\stoptext

The table parts on all the pages but the last page should be stretched
vertically.  If this isn't possible with xtable, is it possible in
another way?  I hope it is possible without splitting the table by
hand, because it is a big project with several hundred table pages,
and splitting by hand would make changes (additional rows) really hard.

Thanks for your help and kind regards,
Joshua Krämer


___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Vertically stretched split table
  2014-04-07 12:56 Vertically stretched split table Joshua Krämer
@ 2014-04-07 21:18 ` Hans Hagen
  2014-04-07 23:52   ` Joshua Krämer
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2014-04-07 21:18 UTC (permalink / raw)
  To: ntg-context

On 4/7/2014 2:56 PM, Joshua Krämer wrote:
> Dear list,
>
> if I specify "option=height" with an xtable, a single-page
> table is stretched vertically to fill the whole textheight.  However, I
> need this feature with a multipage table.  In the following example,
> the table on the first page should be stretched, but isn't:
>
> \showframe
> \starttext
> \startxtable [option=height, split=yes]
>    \startxrow
>      \startxcell \input knuth \stopxcell
>      \startxcell \input ward \stopxcell
>    \stopxrow
>    \startxrow
>      \startxcell \input zapf \stopxcell
>      \startxcell \input ward \stopxcell
>    \stopxrow
>    \startxrow
>      \startxcell \input knuth \stopxcell
>      \startxcell \input ward \stopxcell
>    \stopxrow
> \stopxtable
> \stoptext
>
> The table parts on all the pages but the last page should be stretched
> vertically.  If this isn't possible with xtable, is it possible in
> another way?  I hope it is possible without splitting the table by

the height stretch is a special case and not interfaced with the 
splitter (would demand multipass whihc in turn could lead to oscillation)

> hand, because it is a big project with several hundred table pages,
> and splitting by hand would make changes (additional rows) really hard.

just do that in the final version only


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Vertically stretched split table
  2014-04-07 21:18 ` Hans Hagen
@ 2014-04-07 23:52   ` Joshua Krämer
  2014-04-08 12:36     ` frames, hrule, vfill and pagebreaks (was: Vertically stretched split table) Joshua Krämer
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua Krämer @ 2014-04-07 23:52 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

On 2014-04-07, 23:18, Hans Hagen wrote:

> the height stretch is a special case and not interfaced with the 
> splitter (would demand multipass whihc in turn could lead to
> oscillation)

Thanks for the information, I've already feared it would be like that.
I have thus created a custom solution using frames, hrules and
vfills in between.  So far, it works well.  (A small problem is wrong
hrule spacing at the beginning of the page, and
start/stoplinecorrection leads to wrong vfill-spacing.  If I can't sort
it out, I'll write another message.)

Kind regards
Joshua Krämer


___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* frames, hrule, vfill and pagebreaks (was: Vertically stretched split table)
  2014-04-07 23:52   ` Joshua Krämer
@ 2014-04-08 12:36     ` Joshua Krämer
  2014-04-14 13:24       ` Joshua Krämer
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua Krämer @ 2014-04-08 12:36 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

Dear list,

at first, I thought the following code (simplified) with frames,
hrules and vfills between them would work to typeset my table.  However,
I have now realized that sometimes a pagebreak occurs before the final
(invisible) hrule, and then there's no vfill at the bottom of the page.
See this example:

\setuplayout [backspace=10mm, width=middle, topspace=10mm,
height=middle, header=0mm, headerdistance=0mm, footer=1mm,
footerdistance=0mm]
\setupframed[frame=on,framecolor=green,location=middle,align=right]
\define [2] \Tabline {

	\hrule
	\page[no]
	\vfill
	\dontleavehmode\framed[width=60mm]{#1}\framed[width=100mm]{#2}
	\vfill
	\hrule height 0pt
	\par\page[bigpreference]
}

\setupbackgrounds[footer][text][topframe=on]

\starttext
\Tabline{\dorecurse{100}{word }}{\dorecurse{150}{word }}
\Tabline{\dorecurse{170}{word }}{\dorecurse{100}{word }}
\stoptext

How can I make sure a pagebreak occurs only between the Tablines?
The Tabline on the 1st page should appear centered, too.  "\page[no]"
before "\hrule height 0pt" has no effect.

Thank you and kind regards
Joshua Krämer


___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: frames, hrule, vfill and pagebreaks (was: Vertically stretched split table)
  2014-04-08 12:36     ` frames, hrule, vfill and pagebreaks (was: Vertically stretched split table) Joshua Krämer
@ 2014-04-14 13:24       ` Joshua Krämer
  0 siblings, 0 replies; 5+ messages in thread
From: Joshua Krämer @ 2014-04-14 13:24 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

Dear list, if somebody cares, the following solution works for me:

    \hrule
    \penalty10000
    \vfill
    \penalty10000
    \dontleavehmode\framed{...}
    \penalty10000
    \vfill
    \penalty10000
    \hrule height 0pt
    \par\penalty-5000

Joshua

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context-wvrSQK3plZs@public.gmane.org / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2014-04-14 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 12:56 Vertically stretched split table Joshua Krämer
2014-04-07 21:18 ` Hans Hagen
2014-04-07 23:52   ` Joshua Krämer
2014-04-08 12:36     ` frames, hrule, vfill and pagebreaks (was: Vertically stretched split table) Joshua Krämer
2014-04-14 13:24       ` Joshua Krämer

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