[NTG-context] Partial \framed

Thomas Fehige thomas at fehige.de
Mon Jun 6 14:14:51 CEST 2016


Thank you Wolfgang, that is exactly what I was looking for.

I apologize for the incomplete example. I have no idea, however, how all 
the empty lines got in there. They weren't there when I clicked "send", 
only when I saw it in the list.

Thomas

Am 06.06.2016 um 12:32 schrieb Wolfgang Schuster:
> \startuseMPgraphic{leftbracket}
>     z[0] = (EmWidth,OverlayHeight) ;
>     z[1] = (0,OverlayHeight) ;
>     z[2] = (0,0) ;
>     z[3] = (EmWidth,0) ;
>     draw z[0]--z[1]--z[2]--z[3] withcolor \MPcolor{\overlaylinecolor} ;
> \stopuseMPgraphic
>
> \startuseMPgraphic{rightbracket}
>     z[0] = (-EmWidth,OverlayHeight) ;
>     z[1] = (0,OverlayHeight) ;
>     z[2] = (0,0) ;
>     z[3] = (-EmWidth,0) ;
>     draw z[0]--z[1]--z[2]--z[3] withcolor \MPcolor{\overlaylinecolor} ;
> \stopuseMPgraphic
>
> \installleftframerenderer {bracket}{\useMPgraphic {leftbracket}}
> \installrightframerenderer{bracket}{\useMPgraphic{rightbracket}}
>
> \defineframed
>   [bracketframed]
>   [frame=off,
>    offset=1ex,
>    leftframe=bracket,
>    rightframe=bracket,
>    framecolor=red,
>    foregroundstyle=\ssx,
>    foregroundcolor=darkgray,
>    align=normal,
>    width=max]
>
> \starttext
> \bracketframed{\input knuth }
> \stoptext



More information about the ntg-context mailing list