Open main menu

Changes

m
Created page with "The following code provides a simple example usage for {{cmd|definemixedcolumns}}: <pre> \setupcolors[state=start] \startuseMPgraphic{StyleVerticalRule} draw OverlayBox; \sto..."
The following code provides a simple example usage for {{cmd|definemixedcolumns}}:

<pre>
\setupcolors[state=start]

\startuseMPgraphic{StyleVerticalRule}
draw OverlayBox;
\stopuseMPgraphic

\defineoverlay[StyleVerticalRule][\useMPgraphic{StyleVerticalRule}]

\definemixedcolumns
[sectioncolumns]
[
n=2,
separator=rule,
rulecolor=red,
rulethickness=6.5pt,
balance=yes,
]

% Horizontal line below the section header.
\defineframed[sectionframed]
[
frame=off,
bottomframe=on,
framecolor=pink,
rulethickness=1.0pt,
width=local,
align=normal, % to get a vbox
]

\define[2]\StyleSection{\sectionframed{#2}}

\setuphead
[section]
[
command=\StyleSection,
after={\startsectioncolumns},
aftersection={\stopsectioncolumns},
]

\starttext
\startchapter[title={Chapter}, reference=sec:my-chapter,]
\startsection[title={Section}, reference=sec:my-section,]
\startsubsection[title={Equipment},reference=sec:my-equipment,]
\input knuth
\input knuth
\stopsubsection
\stopsection
\stopchapter

\stoptext
</pre>
419

edits