Henning Hraban Ramm <mailto:te...@fiee.net>
23. Februar 2018 um 14:38
I tried to add the example to the garden, but at least there it
doesn’t work:
http://wiki.contextgarden.net/Columns
As soon as I use \setupcolors, I get only a single column or the
example doesn’t compile at all. Strange.
The garden uses MkIV where \color expects a argument (i.e.
\color[<name>]{<argument>}).
Below is a example how you can add a colored rule to \startcolumns but
the better solution
is to switch to MkIV and and use mixedcolumns environment which has a
option to change
the color of the rule between the columns.
\enableregime[utf-8]
\mainlanguage[fr]
\setupcolors[state=start]
% \unexpanded\def\ColumnsRule
% {\bgroup
% \hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax
% \color[red]{\vrule width\linewidth}%
% \hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax
% \egroup}
\definemeasure[columndistance][2em]
\setupcolumns[distance=\measure{columndistance}]
\unexpanded\def\ColumnsRule
{\bgroup
\hskip\dimexpr(\measure{columndistance}+\linewidth)/2\relax
\color[red]{\vrule width\linewidth}%
\hskip\dimexpr(\measure{columndistance}+\linewidth)/2\relax
\egroup}
\setupcolumns[rule=\ColumnsRule]
\starttext
\startcolumns
\input tufte
\stopcolumns
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________