On 28-5-2012 18:09, Aditya Mahajan wrote:
On Mon, 28 May 2012, Wolfgang Schuster wrote:
I made also a few modifications on Marcos code, maybe a few of them should be moved to the core.
It would be also a good idea to change the name of the module to meta-imp-frame.mkiv or something similar.
In that case, we also need to change local and tight to \v!local and \v!tight (and define a variable for tight).
possible extension (less graphics): \unprotect \startMPinitializations boolean LocalFrameDone ; LocalFrameDone := false ; \stopMPinitializations \startuseMPgraphic {frame_local_top} if not LocalFrameDone : draw topboundary OverlayBox leftenlarged (LeftFrameLinewidth-.5*TopFrameLinewidth) rightenlarged (RightFrameLinewidth-.5*TopFrameLinewidth) shifted (0, .5*TopFrameLinewidth) withpen pensquare scaled (TopFrameLinewidth) withcolor TopFrameColor ; setbounds currentpicture to OverlayBox ; fi ; \stopuseMPgraphic \defineoverlay[localframe][\useMPgraphic{localframe}] \startuseMPgraphic{localframe} \includeMPgraphic{frame_\framedparameter\c!topframe _top} \includeMPgraphic{frame_\framedparameter\c!leftframe _left} \includeMPgraphic{frame_\framedparameter\c!rightframe _right} \includeMPgraphic{frame_\framedparameter\c!bottomframe _bottom} LocalFrameDone := true ; \stopuseMPgraphic \protect \starttext \framed [background=localframe, framecolor=blue, frame=off, leftframe=local, topframe=tight, leftframecolor=red] {test} \stoptext it could permit some analysis and connection of pieces of frame but in that case one will use a dedicated background anyway Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------