From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/98077 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Package esvect and Context Date: Fri, 26 May 2017 12:53:42 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7744646591633429210==" X-Trace: blaine.gmane.org 1495796055 28251 195.159.176.226 (26 May 2017 10:54:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 26 May 2017 10:54:15 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 26 12:54:11 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dECsj-0007Dq-Q2 for gctc-ntg-context-518@m.gmane.org; Fri, 26 May 2017 12:54:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AB467EE1212; Fri, 26 May 2017 12:53:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vSl_E_BZvGSG; Fri, 26 May 2017 12:53:55 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 052E6EE279F; Fri, 26 May 2017 12:53:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0CB69EE279F for ; Fri, 26 May 2017 12:53:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JTknONxiY7-3 for ; Fri, 26 May 2017 12:53:53 +0200 (CEST) Original-Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 54663EE1212 for ; Fri, 26 May 2017 12:53:43 +0200 (CEST) Original-Received: by mail-wm0-f41.google.com with SMTP id b84so125460364wmh.0 for ; Fri, 26 May 2017 03:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=TlWb7x6F7R3KDBOdPRKx+tj6/8te560bzFVcJT7KAeM=; b=L67Vxw8cTpL44EZxlOlLMloD+TXdCcdwOr9DAldwB2f17cxfgstX4t/vxVwO+ESHRi Sfyr4/tkB22vPmCkqC0E6MB4YUsHMIi8CXm3/WDnU3dLlc5GafON+lNKSZEcvC3oSAM6 ZJPerCSito829qFIQIiFCfipmfwDSrJrIyIzcWPO8ie+J5G6FEHtIHZDZD/Bt6habkfK BBJzAsb8Mb9tOfTZJqCfye4TTxpxDN0qJ+Dz8lN5wWW91QGLmAiTKqvVLjNA5hnbsHX2 qrwGO+512zF0MrjhA0dPz6+emuJTYvzMZ6ik015HmzNz+gLYPK+zPANBTyLSAG+vJf3K QeMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TlWb7x6F7R3KDBOdPRKx+tj6/8te560bzFVcJT7KAeM=; b=HVz//a2dnMiZdpEPivzSrOSDemYLotMtLsDG1Jn9Rba5HQjUwmBcsvOIdr8sApvhbc Hvz2vzHaXPqbQDZj5kj3/Mx901vP3iO/82a8/9JYEIZsnEzslNPT3TJp+U34DgECseXF buyEfa063/pAxJnvn6MFX7lqnKLIrMyDvVW/orvQGVE+qoYyFldqCXjQvtYDcpvtl4Jo 2dZZ30rnj1CWVZJAFIU3xKMjpeaeM3z4swGmvaBML2epcGsS+uSBT/F/CR/DjjdUZvWL KpzuUi1GaEQYpGfXfLXSk9vXTyXM5WfVtYAQItcmqQpVi2KOLktYvFIoy+dK6edwRH7W jiJA== X-Gm-Message-State: AODbwcChAfS+v4srnHUhhDV3n+nDOUJrJf6HJdftwGWGPuYXjQJH8QuM iJlPNCOEkvsJBKwRyh/a9izTOzvY8Tx6 X-Received: by 10.80.131.5 with SMTP id 5mr1891380edh.134.1495796022771; Fri, 26 May 2017 03:53:42 -0700 (PDT) Original-Received: by 10.80.212.219 with HTTP; Fri, 26 May 2017 03:53:42 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:98077 Archived-At: --===============7744646591633429210== Content-Type: multipart/alternative; boundary="94eb2c0da72c98031905506b269e" --94eb2c0da72c98031905506b269e Content-Type: text/plain; charset="UTF-8" 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 --94eb2c0da72c98031905506b269e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
Hans suggested a= macro to draw the vectors . It works well bu= t I find that in some situations, the arrow is too big.
thank you,
Fabrice


https://mailman.ntg.nl/pipermail/ntg-context/2016/085828.htm= l

\useMPlibrary[mat]

\startMPextensions
=C2=A0=C2=A0= =C2=A0=C2=A0 vardef math_stacker_arrow_shape =3D
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 image (
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 drawarrow
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (O= verlayWidth,OverlayOffset) -- (0,OverlayOffset)
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 withcolor
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 OverlayLineColor ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 setbounds currentpicture to boundingbox curr= entpicture
bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/= 2) ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 )
=C2=A0=C2=A0= =C2=A0=C2=A0 enddef ;
=C2=A0=C2=A0=C2=A0=C2=A0 vardef math_stacker_lefta= rrow_shape =3D
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 math_sta= cker_arrow_shape
=C2=A0=C2=A0=C2=A0=C2=A0 enddef ;
=C2=A0=C2=A0=C2=A0= =C2=A0 vardef math_stacker_rightarrow_shape =3D
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 math_stacker_arrow_shape rotated 180
=C2=A0=C2= =A0=C2=A0=C2=A0 enddef ;
\stopMPextensions

\startuniqueMPgraphic{= math:stacker:\number"2190}
=C2=A0=C2=A0=C2=A0=C2=A0 math_stacker_dr= aw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgraphic

\startuni= queMPgraphic{math:stacker:\number"2192}
=C2=A0=C2=A0=C2=A0=C2=A0 ma= th_stacker_draw(math_stacker_rightarrow_shape) ;
\stopuniqueMPgraphic
% so far

\setupmathstackers
=C2=A0=C2=A0 [both] % vfenced]=C2=A0=C2=A0 [color=3Ddarkred,
=C2=A0=C2=A0=C2=A0 alternative=3Dmp]
\setupmathstackers
=C2=A0=C2=A0 [top]
=C2=A0=C2=A0 [color=3Ddark= red,
=C2=A0=C2=A0=C2=A0 alternative=3Dmp]

\setupmathstackers
= =C2=A0=C2=A0 [bottom]
=C2=A0=C2=A0 [color=3Ddarkred,
=C2=A0=C2=A0=C2= =A0 alternative=3Dmp]

\starttext

$\overrightarrow=C2=A0 {i}$<= br>
\stoptext
--94eb2c0da72c98031905506b269e-- --===============7744646591633429210== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============7744646591633429210==--