On Mon, May 18, 2009 at 8:45 PM, Alan Stone
<software.list.1e...@gmail.com>wrote:

> Hi,
> How do you make this work ?
>
> --- mpframed.tex ---
>
> %\def\myFrameAlternative{line}
> %\def\myFrameAlternative{dashes}
> \def\myFrameAlternative{dots}
>

The MetaPost User Manual brought the answer...

 %\def\myFrameAlternative{"line"}
%\def\myFrameAlternative{"dashes"}
\def\myFrameAlternative{"dots"}


>  \startuniqueMPgraphic{name}
>
> path p ;
>
> p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
>  show (\myFrameAlternative) ;
>
> if \myFrameAlternative = dashes :
>

if \myFrameAlternative = "dashes" :

Alan


>  % if (\myFrameAlternative) = dashes :
> draw p dashed evenly scaled 2 ;
> % elseif (\myFrameAlternative) = dots :
> elseif \myFrameAlternative = dots :
> draw p dashed withdots scaled 2 ;
> else :
> draw p ;
> fi ;
>  \stopuniqueMPgraphic
>
> \defineoverlay[myGraphic][\uniqueMPgraphic{name}]
>
> \starttext
>
> \framed[%
> offset=5mm,
> background=myGraphic,
> frame=off]
> {mp framed}
>
> \stoptext
>
> ---
>
> context.cmd mpframed
>
> --
> Alan
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to