David Arnold wrote:
Hans (please CC Jacob), here is the whole environment file. My student did this for me, but if you'd like to make some changes, that would be ok.
He has in another environment file:
\def\indetvskiponeem{\vskip 1em plus 1em minus 1em}
Then he has:
\def\startboxcode{\indetvskiponeem\hbox\bgroup\hskip 0.1\makeupwidth} \def\stopboxcode{\hskip 0.1\makeupwidth\egroup\indetvskiponeem} \def\keyprefix{\bigstar\hskip 1em} \def\tipprefix{\checkmark\hskip 1em} \def\summaryprefix{\bigstar\hskip 1em} \def\boxwidth{0.8\makeupwidth} \def\warningprefix{\bgroup\tfa\bold{!}\egroup\hskip 1em}
\defineenumeration [summary] [location=serried, width=broad, text=\summaryprefix Summary, style=slanted, number=no, inbetween=\blank, before={\startboxcode\startframedtext[width=\boxwidth, background=color,backgroundcolor=tingedblue,frame=no]}, after={\stopframedtext\stopboxcode}]
\defineenumeration [keyresult] [location=serried, width=broad, text=\keyprefix, style=slanted, number=no, inbetween=\blank, before={\startboxcode\startframedtext[width=\boxwidth, background=color,backgroundcolor=tingedblue,frame=no]}, after={\stopframedtext\stopboxcode}]
\defineenumeration [tip] [location=serried, width=broad, text=\tipprefix, style=slanted, number=no, inbetween=\blank, before={\startboxcode\startframedtext[width=\boxwidth, background=color,backgroundcolor=icicle,frame=no]}, after={\stopframedtext\stopboxcode}]
\defineblock[insummary] \def\placesectionsummary{\unnumberedsubsection{Section Summary}\bgroup \tfx\selectblocks[insummary]\egroup}
\defineenumeration [example] [location=serried, width=broad, text={\color[heavygreen]\bgroup\bold{Example}}, stopper={.\egroup}, style=slanted, inbetween=\blank, after=\blank]
\defineenumeration [warning] [location=serried, width=broad, text=\warningprefix, style=slanted, number=no, inbetween=\blank, before={\startboxcode\startframedtext[width=\boxwidth, background=color,backgroundcolor=lightred,frame=no]}, after={\stopframedtext\stopboxcode}]
\defineenumeration [definition] [location=serried, width=broad, text={\color[darklavender]\bgroup\bold{Definition}}, stopper={.\egroup}, style=slanted, inbetween=\blank, before={\startboxcode\startframedtext[width=\boxwidth, background=color,backgroundcolor=lavender,frame=no]}, after={\stopframedtext\stopboxcode}]
less tricky, cleaner, etc \defineframedtext[MyBox] \setuplabeltext[definition=Definition] \setuplabeltext [example=Example] \setuplabeltext [warning={\tfb !}] \setuplabeltext [key=\bigstar] \setuplabeltext [tip=\checkmark] \setuplabeltext [summary=\bigstar\quad Summary] \definemeasure[BoxWidth][.8\textwidth] \defineblank[BoxBlank][1em plus 1em minus 1em] \setupframedtexts [MyBox] [width=\measure{BoxWidth}, before={\blank[BoxBlank]}, after={\blank[BoxBlank]}, background=color, frame=no, location=middle] \defineenumeration [summary] [location=serried, width=broad, text=\labeltext{summary}, style=slanted, number=no, inbetween=\blank, before={\startMyBox[backgroundcolor=blue]}, after=\stopMyBox] \defineenumeration [keyresult] [location=serried, width=broad, text=\labeltext{key}, style=slanted, number=no, inbetween=\blank, before={\startMyBox[backgroundcolor=blue]}, after=\stopMyBox] \defineenumeration [tip] [location=serried, width=broad, distance=1em, text=\labeltext{tip}, style=slanted, number=no, inbetween=\blank, before={\startMyBox[backgroundcolor=blue]}, after=\stopMyBox] \defineenumeration [example] [location=serried, width=broad, distance=1em, headcolor=heavygreen, headstyle=bold, text=\labeltext{example}, stopper=., style=slanted, inbetween=\blank, after=\blank] \defineenumeration [warning] [location=serried, width=broad, distance=1em, text=\labeltext{warning}, style=slanted, number=no, inbetween=\blank, before={\startMyBox[backgroundcolor=red]}, after=\stopMyBox] \defineenumeration [definition] [location=serried, width=broad, distance=1em, headcolor=darklavender, headstyle=bold, text=\labeltext{definition}, stopper=., style=slanted, inbetween=\blank, before={\startMyBox[backgroundcolor=green]}, after=\stopMyBox] \setupcolors[state=start] \starttext \input tufte \startdefinition \input tufte \stopdefinition \stoptext no more time today -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------