ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issue splitting tables and horizontal mode
@ 2019-10-18 14:23 Pablo Rodriguez
  2019-10-20  9:49 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2019-10-18 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have another issue related to extreme tables.

    \setupxtable[split=yes]
    \starttext
    \startmakeup[standard]
        \dontleavehmode
        \startxtable[align={middle,lohi},columndistance=0em]
            \startxrow
                \startxcell
                    \dontleavehmode
                    \externalfigure[cow.pdf]
                        [scale=500]
                \stopxcell
                \startxcell
                    \dontleavehmode
                    \externalfigure[cow.pdf]
                        [scale=500]
                \stopxcell
            \stopxrow
        \stopxtable
    \stopmakeup
    \stoptext

When splitting extreme tables, I cannot use \dontleavehmode.

Since this worked before, am I missing something or is this a bug?

Many thanks for your help,

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: issue splitting tables and horizontal mode
  2019-10-18 14:23 issue splitting tables and horizontal mode Pablo Rodriguez
@ 2019-10-20  9:49 ` Wolfgang Schuster
  2019-10-20 10:36   ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-10-20  9:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

Pablo Rodriguez schrieb am 18.10.2019 um 16:23:
> Dear list,
>
> I have another issue related to extreme tables.
>
>      \setupxtable[split=yes]
>      \starttext
>      \startmakeup[standard]
>          \dontleavehmode
>          \startxtable[align={middle,lohi},columndistance=0em]
>              \startxrow
>                  \startxcell
>                      \dontleavehmode
>                      \externalfigure[cow.pdf]
>                          [scale=500]
>                  \stopxcell
>                  \startxcell
>                      \dontleavehmode
>                      \externalfigure[cow.pdf]
>                          [scale=500]
>                  \stopxcell
>              \stopxrow
>          \stopxtable
>      \stopmakeup
>      \stoptext
>
> When splitting extreme tables, I cannot use \dontleavehmode.
1. What is the purpose of \dontleavehmode in your example?

2. Why do you try to split a table in a makup environment (which will 
never work)?
> Since this worked before, am I missing something or is this a bug?
It isn't a bug but a side effect of the way how split=yes works.

The normal splitters uses a simple placement method where each table row 
is placed below each other. To prevent unwanted white space between the 
lines \nointerlineskip is used but the command works only a vertical 
mode. With \dontleavehmode like in your example you force horizontal 
mode for the table which results in the error message.

You can reproduce the error with the following minimal example:

\starttext

\dontleavehmode
\vbox{}
\nointerlineskip
\vbox{}

\stoptext

The reason why this doens't happen when splitting is disabled or when 
the header or footer lines are repeated is that ConTeXt puts the 
collected lines for each table in a \vbox. When you flush the lines in 
the \vbox the are placed in vertical modes and your \dontleavehmode is 
only applied to the outer \vbox while the lines itself are placed in 
vertical mode.

\starttext

\dontleavehmode
\vbox
   {\vbox{}
    \nointerlineskip
    \vbox{}}

\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

* Re: issue splitting tables and horizontal mode
  2019-10-20  9:49 ` Wolfgang Schuster
@ 2019-10-20 10:36   ` Pablo Rodriguez
  2019-10-20 10:53     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2019-10-20 10:36 UTC (permalink / raw)
  To: ntg-context

On 10/20/19 11:49 AM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 18.10.2019 um 16:23:
>> [...]
>> When splitting extreme tables, I cannot use \dontleavehmode.
> 1. What is the purpose of \dontleavehmode in your example?

Sorry, Wolfgang, I forgot to mention.

\dontleavehmode is required to center the table when
\startmakeup[standard][align=center].

> 2. Why do you try to split a table in a makup environment (which will
> never work)?

\setupxtable[split=yes] is a general setup for the whole document.

I mean, I don’t want a table in the document to be stuck between pages.

Only sometimes I have makeups with tables. And this was my first issue
with the conflicting general setup.

As written in my previous message, there was no clash some time (well,
five years 😅) ago.

>> Since this worked before, am I missing something or is this a bug?
> It isn't a bug but a side effect of the way how split=yes works.
>
> The normal splitters uses a simple placement method where each table row
> is placed below each other. To prevent unwanted white space between the
> lines \nointerlineskip is used but the command works only a vertical
> mode. With \dontleavehmode like in your example you force horizontal
> mode for the table which results in the error message.

Many thanks for your explanation.

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: issue splitting tables and horizontal mode
  2019-10-20 10:36   ` Pablo Rodriguez
@ 2019-10-20 10:53     ` Wolfgang Schuster
  2019-10-20 17:38       ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-10-20 10:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

Pablo Rodriguez schrieb am 20.10.2019 um 12:36:
> On 10/20/19 11:49 AM, Wolfgang Schuster wrote:
>> Pablo Rodriguez schrieb am 18.10.2019 um 16:23:
>>> [...]
>>> When splitting extreme tables, I cannot use \dontleavehmode.
>> 1. What is the purpose of \dontleavehmode in your example?
> Sorry, Wolfgang, I forgot to mention.
>
> \dontleavehmode is required to center the table when
> \startmakeup[standard][align=center].

You can use the float environment and disable the counter.

\starttext

\startplacefigure [location={none,split}]
     \startxtable
         \dorecurse{100}
            {\startxrow
                 \startxcell xxx \stopxcell
                 \startxcell xxx \stopxcell
             \stopxrow}
     \stopxtable
\stopplacefigure

\stoptext


Another option is framedtext which can be centered.

\starttext

\startframedtext [location=middle,width=fit,frame=off]
     \startxtable
         \startxrow
             \startxcell xxx \stopxcell
             \startxcell xxx \stopxcell
         \stopxrow
     \stopxtable
\stopframedtext

\stoptext


>> 2. Why do you try to split a table in a makup environment (which will
>> never work)?
> \setupxtable[split=yes] is a general setup for the whole document.
>
> I mean, I don’t want a table in the document to be stuck between pages.
>
> Only sometimes I have makeups with tables. And this was my first issue
> with the conflicting general setup.

When you short table keeping them together can be better or do you want 
short tables with five rows to be split across pages.

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: issue splitting tables and horizontal mode
  2019-10-20 10:53     ` Wolfgang Schuster
@ 2019-10-20 17:38       ` Pablo Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2019-10-20 17:38 UTC (permalink / raw)
  To: ntg-context

On 10/20/19 12:53 PM, Wolfgang Schuster wrote:
> [...]
> You can use the float environment and disable the counter.
> [...]
> Another option is framedtext which can be centered.

Many thanks for your reply, Wolfgang.

framedtext seems easier to me.

> When you have a short table keeping them together can be better or do
> you want short tables with five rows to be split across pages.

In that case, I’d avoid the table split. But I don’t use many tables and
they tend to contain many rows.

Many thanks for your help,

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

end of thread, other threads:[~2019-10-20 17:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 14:23 issue splitting tables and horizontal mode Pablo Rodriguez
2019-10-20  9:49 ` Wolfgang Schuster
2019-10-20 10:36   ` Pablo Rodriguez
2019-10-20 10:53     ` Wolfgang Schuster
2019-10-20 17:38       ` Pablo Rodriguez

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