Difference between revisions of "Command/definemixedcolumns"
< Command
Jump to navigation
Jump to search
m (Created page with "The following code provides a simple example usage for {{cmd|definemixedcolumns}}: <pre> \setupcolors[state=start] \startuseMPgraphic{StyleVerticalRule} draw OverlayBox; \sto...") |
(Edited slightly for readability and updated for newer mkiv. Colors didn't work as expected either.) |
||
Line 2: | Line 2: | ||
<pre> | <pre> | ||
− | \setupcolors[state=start] | + | %\setupcolors[state=start] % only necessary in older ConTeXt mkii |
+ | \hyphenation{sig-ni-fi-cant-ly} % for correct line formatting | ||
\startuseMPgraphic{StyleVerticalRule} | \startuseMPgraphic{StyleVerticalRule} | ||
Line 15: | Line 16: | ||
n=2, | n=2, | ||
separator=rule, | separator=rule, | ||
− | rulecolor= | + | rulecolor=darkblue, |
− | rulethickness= | + | rulethickness=3pt, |
balance=yes, | balance=yes, | ||
] | ] | ||
Line 25: | Line 26: | ||
frame=off, | frame=off, | ||
bottomframe=on, | bottomframe=on, | ||
− | framecolor= | + | framecolor=darkgreen, |
− | rulethickness= | + | rulethickness=1pt, |
width=local, | width=local, | ||
align=normal, % to get a vbox | align=normal, % to get a vbox | ||
Line 44: | Line 45: | ||
\startchapter[title={Chapter}, reference=sec:my-chapter,] | \startchapter[title={Chapter}, reference=sec:my-chapter,] | ||
\startsection[title={Section}, reference=sec:my-section,] | \startsection[title={Section}, reference=sec:my-section,] | ||
− | \startsubsection[title={Equipment},reference=sec:my- | + | \startsubsection[title={Equipment},reference=sec:my-equip,] |
\input knuth | \input knuth | ||
\input knuth | \input knuth |
Revision as of 21:23, 30 December 2017
The following code provides a simple example usage for \definemixedcolumns:
%\setupcolors[state=start] % only necessary in older ConTeXt mkii \hyphenation{sig-ni-fi-cant-ly} % for correct line formatting \startuseMPgraphic{StyleVerticalRule} draw OverlayBox; \stopuseMPgraphic \defineoverlay[StyleVerticalRule][\useMPgraphic{StyleVerticalRule}] \definemixedcolumns [sectioncolumns] [ n=2, separator=rule, rulecolor=darkblue, rulethickness=3pt, balance=yes, ] % Horizontal line below the section header. \defineframed[sectionframed] [ frame=off, bottomframe=on, framecolor=darkgreen, rulethickness=1pt, 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-equip,] \input knuth \input knuth \stopsubsection \stopsection \stopchapter \stoptext