issue splitting tables and horizontal mode
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
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
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
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
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
participants (2)
-
Pablo Rodriguez
-
Wolfgang Schuster