Re: Ineraction between \startframedtext and \startcolumns?
Wolfgang Schuster <[email protected]>
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
Am 13.04.2026 um 22:18 schrieb Jim: > 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.) Use \startframedtext[width=max] or \startframedtext[width=tw] % width=\textwidth to to change the width of the framedtext block. > (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. > > (3) After the \stopframedtext, the textwidth is too small. > > > Q: Is putting > \startcolumns ... \stopcolumns > inside > \startframedtext ... \stopframedtext > a "forbidden configuration"? Putting columns in a framedtext block (or any other vertical box) is allowed but the columns environment switches to a different mode. > If not, can someone tell me how to make oddities (2) and (3) go away? > > If so, can someone tell me what the best practices are for keeping short > sections of multi-column text together? (Aside from floating it.) If you need two (or more) columns for code snippets and explanations etc. you should use a different mechanism, e.g. the paragraphs environments can be used for this. 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 ___________________________________________________________________________________