ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] table float split behavior
@ 2024-06-17 16:36 Henning Hraban Ramm
  2024-07-07  9:51 ` [NTG-context] " Henning Hraban Ramm
  2024-07-10 20:27 ` Henning Hraban Ramm
  0 siblings, 2 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-06-17 16:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Table floats split in odd places, independent of top/page/here location.

There’s always a first part, then some not-float text, then the other parts.

Even if the table would fit on two pages (with location=page), it always 
gets split into three.

Can I influence this anyhow?

Hraban


\usemodule[visual]

\starttext

\samplefile{tufte}

\startplacetable[location={top,split},title=table split test]
\bTABLE%[setups=twoparamstable]
\bTABLEhead
\bTR\bTH One \eTH\bTH Two\eTH\bTH Three \eTH\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{60}{%
\bTR\bTD #1\eTD\bTD \fakewords{1}{10}\eTD\bTD \fakewords{1}{10}\eTD\eTR
}
\eTABLEbody
\eTABLE
\stopplacetable

\samplefile{knuth}

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-06-17 16:36 [NTG-context] table float split behavior Henning Hraban Ramm
@ 2024-07-07  9:51 ` Henning Hraban Ramm
  2024-07-07 18:22   ` Bruce Horrocks
  2024-07-10 20:27 ` Henning Hraban Ramm
  1 sibling, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-07-07  9:51 UTC (permalink / raw)
  To: ntg-context

This is a long-time open issue. Am I the only one affected by this?

Also, \bTABLEfoot doesn’t repeat – I’d like to use it e.g for a line (rule).

Also, is it possible to have different captions in first and other parts?

Hraban

Am 17.06.24 um 18:36 schrieb Henning Hraban Ramm:
> Table floats split in odd places, independent of top/page/here location.
> 
> There’s always a first part, then some not-float text, then the other 
> parts.
> 
> Even if the table would fit on two pages (with location=page), it always 
> gets split into three.
> 
> Can I influence this anyhow?
> 
> Hraban
> 
> 
> \usemodule[visual]
> 
> \starttext
> 
> \samplefile{tufte}
> 
> \startplacetable[location={top,split},title=table split test]
> \bTABLE%[setups=twoparamstable]
> \bTABLEhead
> \bTR\bTH One \eTH\bTH Two\eTH\bTH Three \eTH\eTR
> \eTABLEhead
> \bTABLEbody
> \dorecurse{60}{%
> \bTR\bTD #1\eTD\bTD \fakewords{1}{10}\eTD\bTD \fakewords{1}{10}\eTD\eTR
> }
> \eTABLEbody
> \eTABLE
> \stopplacetable
> 
> \samplefile{knuth}
> 
> \stoptext

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-07  9:51 ` [NTG-context] " Henning Hraban Ramm
@ 2024-07-07 18:22   ` Bruce Horrocks
  2024-07-07 18:34     ` Henning Hraban Ramm
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Horrocks @ 2024-07-07 18:22 UTC (permalink / raw)
  To: ntg-context mailing list



> On 7 Jul 2024, at 10:51, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> Also, is it possible to have different captions in first and other parts?


This previous thread might help.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-07 18:22   ` Bruce Horrocks
@ 2024-07-07 18:34     ` Henning Hraban Ramm
  2024-07-08 12:39       ` Bruce Horrocks
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-07-07 18:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 07.07.24 um 20:22 schrieb Bruce Horrocks:
> 
> 
>> On 7 Jul 2024, at 10:51, Henning Hraban Ramm <texml@fiee.net> wrote:
>>
>> Also, is it possible to have different captions in first and other parts?
> 
> 
> This previous thread might help.
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>

Thank you, but that doesn’t fit my use case: In my ConTeXt book, there 
are many long tables of parameters. The caption says “Parameters of 
\setupsomething”, but I’d also give hints like “You can also use the 
parameters of \setupframed, see p.123.”. I’d like to have these hints 
only in the first caption, and they’re different for each table.

It’s not that important, I can move the text somewhere else, but often 
enough in ConTeXt there are obscure features for advanced stuff.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-07 18:34     ` Henning Hraban Ramm
@ 2024-07-08 12:39       ` Bruce Horrocks
  2024-07-08 13:48         ` vm via ntg-context
  2024-07-08 14:22         ` Henning Hraban Ramm
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Horrocks @ 2024-07-08 12:39 UTC (permalink / raw)
  To: ntg-context mailing list



> On 7 Jul 2024, at 19:34, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> Am 07.07.24 um 20:22 schrieb Bruce Horrocks:
>>> On 7 Jul 2024, at 10:51, Henning Hraban Ramm <texml@fiee.net> wrote:
>>> 
>>> Also, is it possible to have different captions in first and other parts?
>> This previous thread might help.
>> <https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>
> 
> Thank you, but that doesn’t fit my use case: In my ConTeXt book, there are many long tables of parameters. The caption says “Parameters of \setupsomething”, but I’d also give hints like “You can also use the parameters of \setupframed, see p.123.”. I’d like to have these hints only in the first caption, and they’re different for each table.
> 
> It’s not that important, I can move the text somewhere else, but often enough in ConTeXt there are obscure features for advanced stuff.

If I understand you correctly then this does what you want. It's a bit of a hack though.

\defineselector [caption] [max=2]

\starttext

\setupfloatsplitting [inbetween={\setupselector[caption][n=2]}]

\setupselector[caption][n=1]
\placetable[split]
  {\select{caption}
    {Parameters of \type{\setupsomething}. You can also use the parameters of \type{\setupframes}, see page. 123}
    {Parameters of \type{\setupsomething}.}
  }
  {\bTABLE
   \dorecurse{100}{
   \bTR \bTD One \eTD \bTD two \eTD \eTR
   \bTR \bTD One \eTD \bTD two \eTD \eTR
}
\eTABLE}

\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-08 12:39       ` Bruce Horrocks
@ 2024-07-08 13:48         ` vm via ntg-context
  2024-07-08 14:25           ` Henning Hraban Ramm
  2024-07-08 14:22         ` Henning Hraban Ramm
  1 sibling, 1 reply; 10+ messages in thread
From: vm via ntg-context @ 2024-07-08 13:48 UTC (permalink / raw)
  To: ntg-context; +Cc: vm



On 08/07/2024 14:39, Bruce Horrocks wrote:
> \defineselector [caption] [max=2]
> 
> \starttext
> 
> \setupfloatsplitting [inbetween={\setupselector[caption][n=2]}]
> 
> \setupselector[caption][n=1]
> \placetable[split]
>    {\select{caption}
>      {Parameters of \type{\setupsomething}. You can also use the parameters of \type{\setupframes}, see page. 123}
>      {Parameters of \type{\setupsomething}.}
>    }
>    {\bTABLE
>     \dorecurse{100}{
>     \bTR \bTD One \eTD \bTD two \eTD \eTR
>     \bTR \bTD One \eTD \bTD two \eTD \eTR
> }
> \eTABLE}
> 
> \stoptext


There is a reason that the \recurselevel do not work in this context;
all \recurselevel show up as zero


   {\bTABLE
    \dorecurse{100}{
    \bTR \bTD \recurselevel \eTD \bTD one \eTD \eTR
    \bTR \bTD two \eTD \bTD \recurselevel \eTD \eTR
    }
    \eTABLE}


Any hint?

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-08 12:39       ` Bruce Horrocks
  2024-07-08 13:48         ` vm via ntg-context
@ 2024-07-08 14:22         ` Henning Hraban Ramm
  1 sibling, 0 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-07-08 14:22 UTC (permalink / raw)
  To: ntg-context

Am 08.07.24 um 14:39 schrieb Bruce Horrocks:
> 
> 
>> On 7 Jul 2024, at 19:34, Henning Hraban Ramm <texml@fiee.net> wrote:
>>
>> Am 07.07.24 um 20:22 schrieb Bruce Horrocks:
>>>> On 7 Jul 2024, at 10:51, Henning Hraban Ramm <texml@fiee.net> wrote:
>>>>
>>>> Also, is it possible to have different captions in first and other parts?
>>> This previous thread might help.
>>> <https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>
>>
>> Thank you, but that doesn’t fit my use case: In my ConTeXt book, there are many long tables of parameters. The caption says “Parameters of \setupsomething”, but I’d also give hints like “You can also use the parameters of \setupframed, see p.123.”. I’d like to have these hints only in the first caption, and they’re different for each table.
>>
>> It’s not that important, I can move the text somewhere else, but often enough in ConTeXt there are obscure features for advanced stuff.
> 
> If I understand you correctly then this does what you want. It's a bit of a hack though.
> 
> \defineselector [caption] [max=2]
> 
> \starttext
> 
> \setupfloatsplitting [inbetween={\setupselector[caption][n=2]}]
> 
> \setupselector[caption][n=1]
> \placetable[split]
>    {\select{caption}
>      {Parameters of \type{\setupsomething}. You can also use the parameters of \type{\setupframes}, see page. 123}
>      {Parameters of \type{\setupsomething}.}
>    }
>    {\bTABLE
>     \dorecurse{100}{
>     \bTR \bTD One \eTD \bTD two \eTD \eTR
>     \bTR \bTD One \eTD \bTD two \eTD \eTR
> }
> \eTABLE}
> 
> \stoptext

Thank you, that’s a good idea. (Another mechanism in ConTeXt that I 
didn’t know and need to document…)

Hraban

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-08 13:48         ` vm via ntg-context
@ 2024-07-08 14:25           ` Henning Hraban Ramm
  2024-07-08 16:06             ` vm via ntg-context
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-07-08 14:25 UTC (permalink / raw)
  To: vm via ntg-context

Am 08.07.24 um 15:48 schrieb vm via ntg-context:
> There is a reason that the \recurselevel do not work in this context;
> all \recurselevel show up as zero
> 
> 
>    {\bTABLE
>     \dorecurse{100}{
>     \bTR \bTD \recurselevel \eTD \bTD one \eTD \eTR
>     \bTR \bTD two \eTD \bTD \recurselevel \eTD \eTR
>     }
>     \eTABLE}
> 
> 
> Any hint?

Something about expansion and maybe buffers.

Try #1, it often works where \recurselevel fails.

Hraban

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-07-08 14:25           ` Henning Hraban Ramm
@ 2024-07-08 16:06             ` vm via ntg-context
  0 siblings, 0 replies; 10+ messages in thread
From: vm via ntg-context @ 2024-07-08 16:06 UTC (permalink / raw)
  To: ntg-context; +Cc: vm



On 08/07/2024 16:25, Henning Hraban Ramm wrote:
> Try #1, it often works where \recurselevel fails.

That gives the intended numbers.
Thank you

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: table float split behavior
  2024-06-17 16:36 [NTG-context] table float split behavior Henning Hraban Ramm
  2024-07-07  9:51 ` [NTG-context] " Henning Hraban Ramm
@ 2024-07-10 20:27 ` Henning Hraban Ramm
  1 sibling, 0 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-07-10 20:27 UTC (permalink / raw)
  To: ntg-context

Am 17.06.24 um 18:36 schrieb Henning Hraban Ramm:
> Table floats split in odd places, independent of top/page/here location.
> 
> There’s always a first part, then some not-float text, then the other 
> parts.
> 
> Even if the table would fit on two pages (with location=page), it always 
> gets split into three.
> 
> Can I influence this anyhow?

Hans explained in today’s online meeting:

The float location "split" cannot be combined with other locations 
(here, top, bottom, page). "split" alone is like "here"; for "page", use

\startpostponing
\startplacetable[location=split]
\bTABLE
% long table
\eTABLE
\stopplacetable
\stoppostponing

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-07-10 20:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 16:36 [NTG-context] table float split behavior Henning Hraban Ramm
2024-07-07  9:51 ` [NTG-context] " Henning Hraban Ramm
2024-07-07 18:22   ` Bruce Horrocks
2024-07-07 18:34     ` Henning Hraban Ramm
2024-07-08 12:39       ` Bruce Horrocks
2024-07-08 13:48         ` vm via ntg-context
2024-07-08 14:25           ` Henning Hraban Ramm
2024-07-08 16:06             ` vm via ntg-context
2024-07-08 14:22         ` Henning Hraban Ramm
2024-07-10 20:27 ` Henning Hraban Ramm

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