[NTG-context] Re: Question about xtables and grid typesetting
Thank you, Hans,
My sincere commendation on your work on ConTeXt.
Wouldn't \linecorrection prevent tables from splitting to the next page?
Also, I must ask you: is there any way to have tables that split onto
the next page with columnsets, without \clearpage initialization?
As it seems now, in a two-column page layout, table splitting across
pages is possible only when the table is placed in a single-column
page layout and with regular columns or with \mixedcolumns. Is this
correct?
Thanks!
On Tue, Mar 10, 2026 at 12:11 AM Hans Hagen via ntg-context
wrote:
>
> On 3/9/2026 8:13 PM, Milan Fst wrote:
> > Thank you!
> > This is what I needed to keep me going.
> > I am a beginner, but I like ConTeXt very much.
>
> for boxed blobs often linecorrection give a bit better results
>
> \startlinecorrection
> \bTABLE
> \bTR \bTD test \eTD \eTR
> \bTR \bTD test \eTD \eTR
> \bTR \bTD test \eTD \eTR
> \eTABLE
> \stoplinecorrection
>
>
> > Milan
> >
> > On Mon, Mar 9, 2026 at 8:02 PM Wolfgang Schuster
> > wrote:
> >>
> >> Am 09.03.2026 um 19:41 schrieb Milan:
> >>> Sorry!
> >>> This is a complete example, math and itemize and the whole first page are
> >>> not on the grid.
> >>>
> >>> [...]
> >>
> >> The style for \section contains the following setting to put some space
> >> after the title
> >>
> >> \setuphead
> >> [section,subject]
> >> [before={\bigskip\bigskip}]
> >>
> >> This causes the text following \section to go off-grid, the correct way
> >> to set the space is to use the \blank command which takes care to insert
> >> the correct space.
> >>
> >> \setuphead
> >> [section,subject]
> >> [before={\blank[2*big]}]
> >>
> >> Youz should also avoid "small", "medium" or "big" for \blank when you
> >> use grid-mode and stick to values based in the line height like
> >> "quarterline", "halfline" or "line".
> >>
> >> Wolfgang
> >>
> >> ___
> >> If your question is of interest to others as well, please add an entry to
> >> the Wiki!
> >>
> >> maillist : [email protected] /
> >> 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
> >> ___
> > ___
> > If your question is of interest to others as well, please add an entry to
> > the Wiki!
> >
> > maillist : [email protected] /
> > 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
> > ___
>
>
> --
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the
> Wiki!
>
> maillist : [email protected] /
> 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
> ___
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
On 3/9/2026 8:13 PM, Milan Fst wrote:
Thank you!
This is what I needed to keep me going.
I am a beginner, but I like ConTeXt very much.
for boxed blobs often linecorrection give a bit better results
\startlinecorrection
\bTABLE
\bTR \bTD test \eTD \eTR
\bTR \bTD test \eTD \eTR
\bTR \bTD test \eTD \eTR
\eTABLE
\stoplinecorrection
Milan
On Mon, Mar 9, 2026 at 8:02 PM Wolfgang Schuster
wrote:
Am 09.03.2026 um 19:41 schrieb Milan:
Sorry!
This is a complete example, math and itemize and the whole first page are not
on the grid.
[...]
The style for \section contains the following setting to put some space
after the title
\setuphead
[section,subject]
[before={\bigskip\bigskip}]
This causes the text following \section to go off-grid, the correct way
to set the space is to use the \blank command which takes care to insert
the correct space.
\setuphead
[section,subject]
[before={\blank[2*big]}]
Youz should also avoid "small", "medium" or "big" for \blank when you
use grid-mode and stick to values based in the line height like
"quarterline", "halfline" or "line".
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
--
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Thank you!
This is what I needed to keep me going.
I am a beginner, but I like ConTeXt very much.
Milan
On Mon, Mar 9, 2026 at 8:02 PM Wolfgang Schuster
wrote:
>
> Am 09.03.2026 um 19:41 schrieb Milan:
> > Sorry!
> > This is a complete example, math and itemize and the whole first page are
> > not on the grid.
> >
> > [...]
>
> The style for \section contains the following setting to put some space
> after the title
>
> \setuphead
>[section,subject]
>[before={\bigskip\bigskip}]
>
> This causes the text following \section to go off-grid, the correct way
> to set the space is to use the \blank command which takes care to insert
> the correct space.
>
> \setuphead
>[section,subject]
>[before={\blank[2*big]}]
>
> Youz should also avoid "small", "medium" or "big" for \blank when you
> use grid-mode and stick to values based in the line height like
> "quarterline", "halfline" or "line".
>
> Wolfgang
>
> ___
> If your question is of interest to others as well, please add an entry to the
> Wiki!
>
> maillist : [email protected] /
> 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
> ___
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Am 09.03.2026 um 19:41 schrieb Milan:
Sorry!
This is a complete example, math and itemize and the whole first page are not
on the grid.
[...]
The style for \section contains the following setting to put some space
after the title
\setuphead
[section,subject]
[before={\bigskip\bigskip}]
This causes the text following \section to go off-grid, the correct way
to set the space is to use the \blank command which takes care to insert
the correct space.
\setuphead
[section,subject]
[before={\blank[2*big]}]
Youz should also avoid "small", "medium" or "big" for \blank when you
use grid-mode and stick to values based in the line height like
"quarterline", "halfline" or "line".
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Sorry!
This is a complete example, math and itemize and the whole first page are not
on the grid.
% "Hello world!" document for the ConTeXt typesetting system
%
% === History ===
% 2006-12-29 Sanjoy Mahajan
% * Created
% This document is in the public domain (no copyright).
\setupcolors[state=start] % otherwise you get greyscale
\definecolor[headingcolor][r=1,b=0.4]
% for the document info/catalog (reported by 'pdfinfo', for example)
\setupinteraction[state=start, % make hyperlinks active, etc.
title={Hello world!},
subtitle={A ConTeXt template},
author={Sanjoy Mahajan},
keyword={template}]
% useful urls
\useURL[author-email][mailto:[email protected]][][[email protected]]
\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]
\useURL[sanjoy][mailto:[email protected]][][[email protected]]
% for US paper; the sensible default is [A4][A4] (A4 typesetting,
% printed on A4 paper)
\setuppapersize[letter][letter]
\setuplayout[topspace=0.5in, backspace=1in, header=24pt, footer=36pt,
height=middle, width=middle]
% uncomment the next line to see the layout
% \showframe
\setuplayout[grid=yes]
% headers and footers
\setupfooter[style=\it]
\setupfootertexts[\date\hfill \ConTeXt\ template]
\setuppagenumbering[location={header,right}, style=bold]
\setupbodyfont[11pt]
\definefontfeature [default] [default] [protrusion=quality, expansion=quality]
\setupalign[hz,hanging]
\setupbodyfont[pagella] % Or your preferred font % default is 12pt
\setuphead[section,chapter,subject][color=headingcolor]
\setuphead[section,subject][style={\ss\bfa},
before={\bigskip\bigskip}, after={}]
\setuphead[chapter][style={\ss\bfd}]
\setuphead[title][style={\ss\bfd},
before={\begingroup\setupbodyfont[14.4pt]},
after={\leftline{\ss\tfa A. U. Thor $\langle$\from[author-email]$\rangle$}
\bigskip\bigskip\endgroup}]
\setupitemize[inbetween={}, style=bold]
% set inter-paragraph spacing
\setupwhitespace[medium]
% comment the next line to not indent paragraphs
\setupindenting[medium, yes]
\setupcolumns[n=2]
%\showgrid
\starttext
\title{Hello, world!}
Here is a hello-world template document to illustrate a few \ConTeXt\
features.
\blank[2*line]
\startcolumns
\subject{Math}
An equation can be typeset inline like $e^{\pi i}+1=0$, or as a
displayed formula:
\startformula
\int_0^\infty t^4 e^{-t}\,dt = 24.
\stopformula
\subject{A list}
Here is an example of a list.
\startitemize[a]% tags are lowercase letters
\item first
\item second
\item third
\stopitemize
% don't use $$...$$ (the plain TeX equivalent)
\dorecurse{2}{\samplefile{lorem}}
\stopcolumns
\startplacetable[location={none,split}]
\startxtable[width=.5tw]
\dorecurse{20}{\startxrow \startxcell Row #1 \stopxcell \stopxrow}
\stopxtable
\stopplacetable
\startcolumns
\dorecurse{2}{\samplefile{lorem}}
\stopcolumns
\stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Am 09.03.2026 um 19:20 schrieb Milan Fst: I am noticing that the text slips out from the grid when I add itemize and equations, like this Unless you show a complete example your snippet isn't very helpful. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___
[NTG-context] Re: Question about xtables and grid typesetting
I am noticing that the text slips out from the grid when I add itemize
and equations, like this
\subject{Math}
An equation can be typeset inline like $e^{\pi i}+1=0$, or as a
displayed formula:
\startformula
\int_0^\infty t^4 e^{-t}\,dt = 24.
\stopformula
\subject{A list}
Here is an example of a list.
\startitemize[a] % tags are lowercase letters
\item first
\item second
\item third
\stopitemize
On Mon, Mar 9, 2026 at 6:16 PM Wolfgang Schuster
wrote:
>
> Am 09.03.2026 um 15:37 schrieb Milan:
> > Does anyone else have any idea what to do?
>
> If you don't use xtables in a columns block you can wrap the table in
> float element, this keeps the table together and ensures the following
> text stays on the grid.
>
> \setuplayout[grid=yes]
>
> %\showgrid
>
> \starttext
>
> \startcolumns
> \dorecurse{2}{\samplefile{lorem}}
> \stopcolumns
>
> \startplacetable[location={none,split}]
> \startxtable[width=.5tw]
> \dorecurse{20}{\startxrow \startxcell Row #1 \stopxcell \stopxrow}
> \stopxtable
> \stopplacetable
>
> \startcolumns
> \dorecurse{2}{\samplefile{lorem}}
> \stopcolumns
>
> \stoptext
>
> Wolfgang
>
> ___
> If your question is of interest to others as well, please add an entry to the
> Wiki!
>
> maillist : [email protected] /
> 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
> ___
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
This works!
Thanks
Should I do similar wraping with lists or equations so that text stay on the
grid after them?
9 Mar 2026 18:16:43 Wolfgang Schuster :
> Am 09.03.2026 um 15:37 schrieb Milan:
>> Does anyone else have any idea what to do?
>
> If you don't use xtables in a columns block you can wrap the table in float
> element, this keeps the table together and ensures the following text stays
> on the grid.
>
> \setuplayout[grid=yes]
>
> %\showgrid
>
> \starttext
>
> \startcolumns
> \dorecurse{2}{\samplefile{lorem}}
> \stopcolumns
>
> \startplacetable[location={none,split}]
> \startxtable[width=.5tw]
> \dorecurse{20}{\startxrow \startxcell Row #1 \stopxcell \stopxrow}
> \stopxtable
> \stopplacetable
>
> \startcolumns
> \dorecurse{2}{\samplefile{lorem}}
> \stopcolumns
>
> \stoptext
>
> Wolfgang
>
> ___
> If your question is of interest to others as well, please add an entry to the
> Wiki!
>
> maillist : [email protected] /
> 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
> ___
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Am 09.03.2026 um 15:37 schrieb Milan:
Does anyone else have any idea what to do?
If you don't use xtables in a columns block you can wrap the table in
float element, this keeps the table together and ensures the following
text stays on the grid.
\setuplayout[grid=yes]
%\showgrid
\starttext
\startcolumns
\dorecurse{2}{\samplefile{lorem}}
\stopcolumns
\startplacetable[location={none,split}]
\startxtable[width=.5tw]
\dorecurse{20}{\startxrow \startxcell Row #1 \stopxcell \stopxrow}
\stopxtable
\stopplacetable
\startcolumns
\dorecurse{2}{\samplefile{lorem}}
\stopcolumns
\stoptext
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Does anyone else have any idea what to do? 8 Mar 2026 13:48:07 [email protected]: > Hello everyone, > This is my first message here, glad to be here. > I've been playing with ConTeXt on the web > (contextgarden.net/context-on-the-web) and wanted to thank you for it. > It is a great option for beginners like me. I am a complete beginner. I'm > really enjoying ConTeXt. > > I came to it after using LaTeX and Typst, realizing that ConTeXt supports > grid typesetting, tables that can span pages in a two-column layout, and it > is easy to customize the document's appearance. > > I'm currently working through the example documents from ConTeXt Garden, and > I've added an xtable that should split across two pages. I'm using > \setupcolumns[n=2], but I've also tried \startmixedcolumns[n=2]. Everything > works well until I activate grid typesetting with \setuplayout[grid=yes]. > > Once the grid is enabled, the table gets additional spacing between rows, > gaps of white space. > What is the way to protect xtables (or tables in general) from this behavior > when \setuplayout[grid=yes] for used in typesetting on the grid? > > Thanks! > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : [email protected] / > 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 > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___
[NTG-context] Re: Question about xtables and grid typesetting
On 3/8/26 18:56, Milan Fst wrote:
> Hi Pablo,
>
> Thank you for your comment and for sharing the sample.
> As a newcomer here, I was hesitant to include a full-length example. I
> am adding it below.
Hi Milan,
the sample is described as minimal and working for a reason.
Your full sample doesn’t even follow the grid on the first paragraph
(displayed once `\showframe\showgrid` is added to the source).
I’m afraid I cannot fix all the different samples you may send (when I
already provided a shorter one).
> I also tried your sample, but I noticed that the gaps between rows are
> still present. I am using https://www.context-on-web.eu/
I see now. I was using `frame=off` for most of the time and with
`\showframe\showgrid` I didn’t noticed the mess before.
If you need lines for your tables (`frame=on` is the default), I’m
afraid that I cannot help here.
> Could there be something else in the environment or styling that might
> be causing this?
None I can think of.
> You also used \getbuffer commands. Is that recommended before xtable?
> What is the specific functionality of \getbuffer?
Getting a previously defined buffer (as many times as you want)?
\starttext
\startbuffer[great]
\ConTeXt\ is great!
\stopbuffer
\dorecurse{5}
{\getbuffer[great] (\recurselevel)\par}
\stoptext
There is nothing specific to `xtables`. I just used it to have columns
and xtables (more than once).
I hope it helps,
Pablo
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
Hi Pablo,
Thank you for your comment and for sharing the sample.
As a newcomer here, I was hesitant to include a full-length example. I
am adding it below.
I also tried your sample, but I noticed that the gaps between rows are
still present. I am using https://www.context-on-web.eu/
Could there be something else in the environment or styling that might
be causing this?
You also used \getbuffer commands. Is that recommended before xtable?
What is the specific functionality of \getbuffer?
My full source is below:
% "Hello world!" document for the ConTeXt typesetting system
%
% === History ===
% 2006-12-29 Sanjoy Mahajan
% * Created
%
% This document is in the public domain (no copyright).
\setupcolors[state=start] % otherwise you get greyscale
\definecolor[headingcolor][r=1,b=0.4]
% for the document info/catalog (reported by 'pdfinfo', for example)
\setupinteraction[state=start, % make hyperlinks active, etc.
title={Hello world!},
subtitle={A ConTeXt template},
author={Sanjoy Mahajan},
keyword={template}]
% useful urls
\useURL[author-email][mailto:[email protected]][][[email protected]]
\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]
\useURL[sanjoy][mailto:[email protected]][][[email protected]]
% for US paper; the sensible default is [A4][A4] (A4 typesetting,
% printed on A4 paper)
\setuppapersize[letter][letter]
\setuplayout[topspace=0.5in, backspace=1in, header=24pt, footer=36pt,
height=middle, width=middle]
% uncomment the next line to see the layout
% \showframe
% headers and footers
\setupfooter[style=\it]
\setupfootertexts[\date\hfill \ConTeXt\ template]
\setuppagenumbering[location={header,right}, style=bold]
\setupbodyfont[11pt] % default is 12pt
%\definefontfeature [default] [default] [protrusion=quality, expansion=quality]
%\setupalign[hz,hanging]
%\setupbodyfont[pagella] % Or your preferred font
\setuplayout[grid=yes]
\setuphead[section,chapter,subject][color=headingcolor]
\setuphead[section,subject][style={\ss\bfa},
before={\bigskip\bigskip}, after={}]
\setuphead[chapter][style={\ss\bfd}]
\setuphead[title][style={\ss\bfd},
before={\begingroup\setupbodyfont[14.4pt]},
after={\leftline{\ss\tfa A. U. Thor $\langle$\from[author-email]$\rangle$}
\bigskip\bigskip\endgroup}]
\setupitemize[inbetween={}, style=bold]
% set inter-paragraph spacing
\setupwhitespace[medium]
% comment the next line to not indent paragraphs
\setupindenting[medium, yes]
\setupcolumns[n=2]
\starttext
\title{Hello, world!}
Here is a hello-world template document to illustrate a few \ConTeXt\
features. Have fun. You can find a lot more information at
\from[wiki]; the preceding text should be colored and clickable, and
clicking it should take you to the wiki.
\startcolumns[]
\subject{A list}
Here is an example of a list.
\startitemize[a]% tags are lowercase letters
\item first
\item second
\item third
\stopitemize
\subject{Math}
An equation can be typeset inline like $e^{\pi i}+1=0$, or as a
displayed formula:
\startformula
\int_0^\infty t^4 e^{-t}\,dt = 24.
\stopformula
% don't use $$...$$ (the plain TeX equivalent)
You can also have numbered equations:
\placeformula[eq:factorial-example]\startformula
\int_0^\infty t^5 e^{-t}\,dt = 120.
\stopformula
And you can refer to them by name. I called the previous equation {\tt
factorial-example}, and it is equation \in[eq:factorial-example].
\ConTeXt\ figures out the number for you. And with interaction turned
on, you can click on the equation number to get to the equation.
\input knuth\par
\stopcolumns
\blank[1*line]
\startxtable[
split=yes,
option={stretch,width},
textwidth=\textwidth,
% 1. Handle external page grid (spacing before/after)
%before={\blank[line]},
%after={\blank[line]},
% 2. STOP internal grid snapping (The fix for "too apart")
%grid=no,
]
\startxtablehead
\startxrow
\startxcell[style=bold] Column 1 \stopxcell
\startxcell[style=bold] Column 2 \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\dorecurse{10}{
\startxrow
\startxcell Full width data #1 \stopxcell
\startxcell More full width data \stopxcell
\stopxrow
}
\stopxtablebody
\stopxtable
%\startpostponing[1]
\startplacefigure[title=Jdjdjsjs,marking=F]
\externalfigure[dummy][height=100pt]
\stopplacefigure
%\stoppostponing
\startcolumns[]
\subject{Text with figures}
Now text with a few figures. The first figure goes on the right, with
the paragraph flowing around it.
\placefigure[right,none]{}{\externalfigure[dummy]}
\input tufte
The next figure will go inline, like a displayed formula:
\placefigure[here,none]{}{\externalfigure[dummy]}
\input tufte
Here's another reference to the numbered equation -- equation
\in[eq:factorial-example] on \at{page}[eq:factorial-example], so that
you can test clicking on it or on the page reference.
\stopcolumns
% most plain TeX commands work
\vfill
\noindent
\framed[corner=rou
[NTG-context] Re: Question about xtables and grid typesetting
On 3/8/26 17:48, [email protected] wrote: > Here is a minimal sample, Hi Milan, I forgot to mention that the sample should be working (with just copy and paste). This makes it easier to start testing and avoids different results due to different ways of getting the complete sample (I already experienced that). > If there are no tables on multiple pages, your previous advice with > \startlinecorrection … \stoplinecorrection works, but I would like > to know whether grid typesetting is also possible when we have tables > on multiple pages. This is the closest I can get to grid typesetting (but it isn’t real grid typesetting): `offset=overlay` in your xtable setup. With minimal additions to your sample, this is what you seem to get (although someone more experienced could get full grid typesetting): \showframe\showgrid \setuplayout[grid=yes] \setupcolumns[n=2] \starttext \startbuffer[cols] \startcolumns %just before \subject{A list} \dorecurse{3}{\input knuth\par} \stopcolumns \stopbuffer \getbuffer[cols] \blank[2st] \startbuffer[xtab] \startxtable[ split=yes, option={stretch,width}, textwidth=1tw, % 1. Handle external page grid (spacing before/after) %~ before={\blank[line]\begstrut}, %~ after={\endstrut\blank[line]}, offset=none, frame=on, %after={\blank[line]}, % 2. STOP internal grid snapping (The fix for "too apart") %grid=no, ] \startxtablehead \startxrow \startxcell[style=bold] Column 1 \stopxcell \startxcell[style=bold] Column 2 \stopxcell \stopxrow \stopxtablehead \startxtablebody \dorecurse{20}{ \startxrow \startxcell Full width data #1 \stopxcell \startxcell More full width data \stopxcell \stopxrow } \stopxtablebody \stopxtable \stopbuffer \getbuffer[xtab] \getbuffer[cols] \blank[2st] \getbuffer[xtab] \stoptext I hope it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___
[NTG-context] Re: Question about xtables and grid typesetting
Here is a minimal sample,
I used an example from here
https://wiki.contextgarden.net/Introduction/Quick_Start and just added the
following two setups
\setuplayout[grid=yes]
\setupcolumns[n=2]
=
In the body, I add
\startcolumns[] %just before
\subject{A list}
And I added some text to approach the end of the first page, where I added the
following table
\stopcolumns
%\stopmixedcolumns
\blank[2*line]
\startxtable[
split=yes,
option={stretch,width},
textwidth=\textwidth,
% 1. Handle external page grid (spacing before/after)
%before={\blank[line]},
%after={\blank[line]},
% 2. STOP internal grid snapping (The fix for "too apart")
%grid=no,
]
\startxtablehead
\startxrow
\startxcell[style=bold] Column 1 \stopxcell
\startxcell[style=bold] Column 2 \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\dorecurse{10}{
\startxrow
\startxcell Full width data #1 \stopxcell
\startxcell More full width data \stopxcell
\stopxrow
}
\stopxtablebody
\stopxtable
\startcolumns[]
The rest of the example source remains unchanged till the end. xtable starts on
page 1 and splits to page 2, which is perfect.
The problem is white gaps between table rows.
If there are no tables on multiple pages, your previous advice with
\startlinecorrection … \stoplinecorrection works, but I would like to know
whether gridtypesetting is also possible when we have tables on multiple pages.
Thanks!
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___
[NTG-context] Re: Question about xtables and grid typesetting
This works when tables does not split across pages but I have a xtable that starts on the page 1 and continues on the page 2. I would like to have it that way. Is it possible to have an xtable that splits across pages and do typesetting on a grid? I will provide the minimal example as soon I am back home with laptop. Thanks! 8 Mar 2026 14:26:10 Pablo Rodriguez via ntg-context : > On 3/8/26 13:43, [email protected] wrote: >> […] >> What is the way to protect xtables (or tables in general) from this >> behavior when \setuplayout[grid=yes] for used in typesetting on the >> grid? > > Hi, > > probably using line correction may fix this (but I have never used that > myself, since I don’t use grid unless forced to): > > \startlinecorrection … \stoplinecorrection > > If this doesn’t help, please provide a minimal sample. > > Pablo > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : [email protected] / > 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 > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___
[NTG-context] Re: Question about xtables and grid typesetting
On 3/8/26 13:43, [email protected] wrote: > […] > What is the way to protect xtables (or tables in general) from this > behavior when \setuplayout[grid=yes] for used in typesetting on the > grid? Hi, probably using line correction may fix this (but I have never used that myself, since I don’t use grid unless forced to): \startlinecorrection … \stoplinecorrection If this doesn’t help, please provide a minimal sample. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___
