ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Macro to write a vector with Metafun (again)
@ 2018-12-04 15:38 Fabrice Couvreur
  2018-12-04 15:57 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Couvreur @ 2018-12-04 15:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1803 bytes --]

Hello Hans,The macro to draw a vector does not work even with the
latest version of context standalone.
Thank you
Fabrice

\useMPlibrary[mat]

% will be in meta-imp-mat.mkiv

\startMPextensions
     vardef math_stacker_arrow_shape =
         image (
             drawarrow
                 (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
             withcolor
                 OverlayLineColor ;
             setbounds currentpicture to boundingbox currentpicture
bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ;
         )
     enddef ;
     vardef math_stacker_leftarrow_shape =
         math_stacker_arrow_shape
     enddef ;
     vardef math_stacker_rightarrow_shape =
         math_stacker_arrow_shape rotated 180
     enddef ;
\stopMPextensions

\startuniqueMPgraphic{math:stacker:\number"2190}
     math_stacker_draw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{math:stacker:\number"2192}
     math_stacker_draw(math_stacker_rightarrow_shape) ;
\stopuniqueMPgraphic

% so far

\setupmathstackers
   [both] % vfenced]
   [color=darkred,
    alternative=mp]

\setupmathstackers
   [top]
   [color=darkred,
    alternative=mp]

\setupmathstackers
   [bottom]
   [color=darkred,
    alternative=mp]

\starttext

$\overbracket   {a+b+c+d} \quad \underbracket    {a+b+c+d} \quad
\doublebracket{a+b+c+d}$ \blank
$\overparent    {a+b+c+d} \quad \underparent     {a+b+c+d} \quad
\doubleparent {a+b+c+d}$ \blank
$\overbrace     {a+b+c+d} \quad \underbrace      {a+b+c+d} \quad
\doublebrace  {a+b+c+d}$ \blank
$\overbar       {a+b+c+d} \quad \underbar        {a+b+c+d} \quad
\doublebar    {a+b+c+d}$ \blank

$\overleftarrow  {a+b+c+d} \quad \overrightarrow  {a+b+c+d} $ \blank
$\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 2002 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Macro to write a vector with Metafun (again)
  2018-12-04 15:38 Macro to write a vector with Metafun (again) Fabrice Couvreur
@ 2018-12-04 15:57 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2018-12-04 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Fabrice Couvreur

On 12/4/2018 4:38 PM, Fabrice Couvreur wrote:
> Hello Hans,
> The macro to draw a vector does not work even with the latest version of 
> context standalone.
> Thank you
> Fabrice
> 
> \useMPlibrary[mat]
> 
> % will be in meta-imp-mat.mkiv
just watch in there .. we redid these stackers with more control (and 
they also live in their own instance now) ...

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-04 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 15:38 Macro to write a vector with Metafun (again) Fabrice Couvreur
2018-12-04 15:57 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).