Re: Columnsetspan rendered with and without color
Jean-Pierre Delange via ntg-context <[email protected]> Thu, 11 Jun 2026 11:50:26 +0200
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
Hi Chen Wang !
I also tested the colour variant. It works, but the same effect is obtained
without colour by wrapping the contents of the first span in an explicit
group:
\startcolumnsetspan[wide]
\start
\samplefile{ward}
\stop
\stopcolumnsetspan
So the colour command seems to be a trigger rather than the real cause. It
probably changes grouping or the internal node list. The cleaner workaround
is therefore to group the contents explicitly rather than to add a colour
only to make the span appear.
See below files without and with colors:
File 01
% MWE: first columnsetspan at the beginning of a columnset
% Colour and explicit grouping compared.
%
% Both variants make the first columnsetspan render. This suggests
% that colour itself is probably not the essential factor; the decisive
% point may be that the contents of the first span are wrapped in an
% additional structure.
\definecolor
[regiontop]
[b=.8]
\definecolumnset
[main]
[n=2,
balance=yes,
distance=10mm]
\definecolumnsetspan
[wide]
[n=2]
\starttext
\startsubject[title={Variant 1: coloured first columnsetspan}]
\startcolumnset[main]
\startcolumnsetspan[wide]
\startcolor[regiontop]
\samplefile{ward}
\stopcolor
\stopcolumnsetspan
\samplefile{knuth}
\samplefile{tufte}
\samplefile{douglas}
\stopcolumnset
\stopsubject
\page
\startsubject[title={Variant 2: grouped first columnsetspan}]
\startcolumnset[main]
\startcolumnsetspan[wide]
\start
\samplefile{ward}
\stop
\stopcolumnsetspan
\samplefile{knuth}
\samplefile{tufte}
\samplefile{douglas}
\stopcolumnset
\stopsubject
\stoptext
File 02 :
% Wang Chen Test Colors
% Test 03-colours
% Hypothesis: colour is not the real cause; grouping may be enough
% to change how the first columnsetspan is handled.
%
% This variant keeps the Test 02 structure, but adds several colour
% definitions and applies them to different parts of the document.
% The first columnsetspan is still explicitly grouped with \start ... \stop.
% --- colour definitions ---
\definecolor[regiontop] [r=.10,g=.25,b=.80] % first wide span
\definecolor[regiontexta] [r=.00,g=.45,b=.20] % first column text
\definecolor[regiontextb] [r=.65,g=.20,b=.10] % second column text
\definecolor[regiontable] [r=.45,g=.10,b=.60] % table span
\definecolor[regionlast] [r=.20,g=.20,b=.20] % final text
% --- table rules kept (head rule + bottom rule) and float placement ---
\setupfloat[table][default={here,tblr,nonumber}]
\setupxtable[frame=off]
\setupxtable[head][topframe=on,bodyfont=bf]
\setupxtable[lastrow][bottomframe=on]
% --- columnset definitions ---
\definecolumnset[main][n=2,balance=yes,distance=10mm]
\definecolumnsetspan[wide][n=2]
\starttext
\startcolumnset[main]
% First wide span: explicit group + colour.
% This tests whether colour still works when combined with the explicit
% grouping that already made Test 02 succeed.
\startcolumnsetspan[wide]
\start
\startcolor[regiontop]
\samplefile{ward}
\stopcolor
\stop
\stopcolumnsetspan
\startcolor[regiontexta]
\samplefile{knuth}
\stopcolor
\startcolor[regiontextb]
\samplefile{tufte}
\stopcolor
\startcolumnsetspan[wide]
\startcolor[regiontable]
\startplacetable[title={Table 1 \emdash{} Lorem ipsum dolor sit amet
consectetur.}]
\startxtable
\startxtablehead[head]
\startxrowgroup[lastrow]
\startxrow
\startxcell[align=right] Stage \stopxcell
\startxcell[align=right] Step \stopxcell
\startxcell[align=right] Temperature~/~°C \stopxcell
\startxcell[align=right] Time~/~minutes \stopxcell
\startxcell[align=right] Number of Cycles \stopxcell
\stopxrow
\stopxrowgroup
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[align=right] Holding \stopxcell
\startxcell[align=right] UDG Activation \stopxcell
\startxcell[align=right] 50 \stopxcell
\startxcell[align=right] 2 \stopxcell
\startxcell[align=right] 1 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Holding \stopxcell
\startxcell[align=right] Dual-Lock DNA Polymerase Activation \stopxcell
\startxcell[align=right] 95 \stopxcell
\startxcell[align=right] 10 \stopxcell
\startxcell[align=right] 1 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right,nr=2] PCR Cycling \stopxcell
\startxcell[align=right] Denaturation \stopxcell
\startxcell[align=right] 95 \stopxcell
\startxcell[align=right] 0.25 \stopxcell
\startxcell[align=right,nr=2] 35 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Annealing \stopxcell
\startxcell[align=right] 60 \stopxcell
\startxcell[align=right] 0.75 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right,nr=3] Melt Curve (Continuous) \stopxcell
\startxcell[align=right] Denaturation \stopxcell
\startxcell[align=right] 95 \stopxcell
\startxcell[align=right] 0.25 \stopxcell
\startxcell[align=right,nr=3] 1 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Annealing \stopxcell
\startxcell[align=right] 60 \stopxcell
\startxcell[align=right] 1 \stopxcell
\stopxrow
\startxrowgroup[lastrow]
\startxrow
\startxcell[align=right] Denaturation \stopxcell
\startxcell[align=right] 95 \stopxcell
\startxcell[align=right] Continuous \stopxcell
\stopxrow
\stopxrowgroup
\stopxtablebody
\startxtablefoot[foot]
\stopxtablefoot
\stopxtable
\stopplacetable
\stopcolor
\stopcolumnsetspan
\startcolor[regionlast]
\samplefile{douglas}
\stopcolor
\stopcolumnset
\stoptext
Please, fill the documentation (ConTeXt Garden:
https://wiki.contextgarden.net/Color/Tutorials) if needed in order to
help understanding this issue.
Best//JP
Le 11/06/2026 à 04:26, Chen Wang a écrit :
> Dear All,
>
> I am using the latest version of ConTeXt. In "main.tex", the top
> section is not rendered. All I did was add some colouring and now the
> top section gets rendered in "main copy.tex" in blue colour.
>
> How do I make the stuff render properly? I do not understand why the
> top columnsetspan is not being rendered and why trying to colour it
> makes it render.
>
> Any ConTeXt wizards please help me.
>
> Yours sincerely,
> Wang Chen
>
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________