Hello,
Hans suggested a macro to draw the vectors . It works well but I find that
in some situations, the arrow is too big.
thank you,
Fabrice


https://mailman.ntg.nl/pipermail/ntg-context/2016/085828.html

\useMPlibrary[mat]

\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

$\overrightarrow  {i}$

\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to