Re: Ineraction between \startframedtext and \startcolumns?
Aditya Mahajan <[email protected]>
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 13 Apr 2026, Jim wrote:
> Hi,
>
> I have some small amounts of text inside
> \startcolumns ... \stopcolumns
> where I want the columns to be all on one page.
>
> I could use a \testpage (or something similar) in front of it, but that
> would require me knowing how much space to test for. I could probably put
> it in a vbox and test on the height+depth of the box, but I imagine ConTeXt
> has something that doesn't require that level of trickery.
>
> I see an example where someone put similarh material inside a frame, so I tried
> that. But in the example below, when I compile it there are three
> oddities:
>
> (1) The frame (which I would eventually make invisible with frame=off)
> does not include the entire width of the enclosed \startcolumns
> environment. (Not a major problem, but a bit mysterious to me.)
The default width of \startframedtext is 0.75\hsize. I typically use width=broad to get full width, though any other dimension will also work (width=local for nested frames, or \hsize, \localhsize, or \textwidth)
> (2) In the framed version, the line spacing of the lines on the right match
> those on the left, whereas in the non-framed example the line spacing
> on the text on the right is smaller.
Add \setupinterlinespace after \switchtobodyfont[small]
> (3) After the \stopframedtext, the textwidth is too small.
Did not test this.
> Q: Is putting
> \startcolumns ... \stopcolumns
> inside
> \startframedtext ... \stopframedtext
> a "forbidden configuration"?
In general, yes. \stratcolumns is an "outer" column mode. For columns inside frames etc, it is better to use \startsimplecolumns.
> If not, can someone tell me how to make oddities (2) and (3) go away?
\showgrid
\starttext
\startbuffer
Some text which will get set
between two lines. The bottom
line goes across the page.
\stopbuffer
% What I want to see looks like this:
\startcolumns[n=2,distance=0.75cm,separator=rule]
\typebuffer
\column
\switchtobodyfont[small]
\getbuffer
\stopcolumns
\smallskip\line{\hss M\hss}
\startframedtext[offset=none,width=broad] %, frame=off]
\startsimplecolumns[n=2,distance=0.5cm,separator=rule]
\typebuffer
\column
\switchtobodyfont[small]
\getbuffer
\stopsimplecolumns
\stopframedtext
\smallskip\line{\hss M\hss}
This is more text to see what happens next.
This is more text to see what happens next.
\stoptext
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________