Changes

Jump to navigation Jump to search
1,272 bytes added ,  13:39, 23 February 2018
next try. columns stop working as soon as there’s \setupcolors involved
Column balancing fails in "lines" mode (e.g. for poetry).
 
 
Influencing the color of the separator rule is somewhat tricky:
 
<context source=yes>
\setuppapersize[A5]
\setupcolors[textcolor=blue]
 
\color[red] % rule color, but might influence also the color of other elements
\startcolumns[n=3,rule=on]
\input knuth
\stopcolumns
</context>
=Paragraphs=
<context source="yes">
\setuppapersize[A5]
\enableregime[utf]
\defineparagraphs[TwoThird][n=2]
</texcode>
Posting by Wolfgang to the mailing list(2016-11-27):
<texcode>
{\raise2\strutdp\outputstreambox[two]}
\stopoverlay
 
\stoptext
</texcode>
 
(Wolfgang continued:)
 
The mechanism to create pages/columns for the stream content is
missing.
You can save text and flush it afterwards but there is no command which
places the content side by side (or in columns). Below is a simple example
but I had to write the splitter myself.
 
<texcode>
\starttext
 
\startoutputstream[one]
\startcolor[red]
\dorecurse{10}{\input knuth\par}
\stopcolor
\stopoutputstream
 
\startoutputstream[two]
\startcolor[green]
\dorecurse{10}{\input zapf\par}
\stopcolor
\stopoutputstream
 
\synchronizestreams[one,two]
 
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
 
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchboxone to \textheight
\vbox to \vsize{\box\scratchboxfour\vss}%
\setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight
\vbox to \vsize{\box\scratchboxfive\vss}%
\fi}
\stoptext
This has some limitations, too. If you put a float at the top of a column and there is another float that spans more than a column over all, the grid will be broken, so you have to put it in another page, but you can put more than one float of the same type together, as seen above.
 
== See also ==
* {{cmd|definemixedcolumns}}
{{Columns navbox}}

Navigation menu