From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/102305 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Construct a matrix with Metafun Date: Sun, 14 Oct 2018 12:30:02 +0200 Message-ID: <6ec97e91-4330-6c91-99c7-d167c9b64262@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0897442869382466989==" X-Trace: blaine.gmane.org 1539512908 22820 195.159.176.226 (14 Oct 2018 10:28:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2018 10:28:28 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 PostboxApp/6.1.4 To: mailing users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 14 12:28:24 2018 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 1gBddH-0005pk-Pa for gctc-ntg-context-518@m.gmane.org; Sun, 14 Oct 2018 12:28:23 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 59D6E7B898; Sun, 14 Oct 2018 12:30:16 +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 iusdDFNcN-0C; Sun, 14 Oct 2018 12:30:15 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A67917B88E; Sun, 14 Oct 2018 12:30:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6FF257B88D for ; Sun, 14 Oct 2018 12:30:15 +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 SRy0bZYE22Mt for ; Sun, 14 Oct 2018 12:30:14 +0200 (CEST) Original-Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.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 ECB087B88A for ; Sun, 14 Oct 2018 12:30:04 +0200 (CEST) Original-Received: by mail-ed1-f41.google.com with SMTP id w19-v6so15187302eds.1 for ; Sun, 14 Oct 2018 03:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=MAbBHeqlm0Mr5MPZg6WLDJ2pesu+3YmwQ/WBgvN5or4=; b=FucefUbJk44iJp1aKITegw97XlRt0otUSMjxikDP/sOKaYNDrIScqrbOLj31reaKv/ PReEEV9zPN2daY1UgzPXre3sZ2h3RnwvZew5g5CBOzzco+w9h+Oxt3S1h97DDQt1cqa8 AzWi9XPifLN57GTDJbOS8IsNcVDBoAKPrWRGs9qcr3+zmEPYy/O5FbzS/TKrYfCeec/z 3V0VkUM/FSrsxDgnNdQm+NPmFrNtmDWwcBktgmbTe1ZRCH8oIQQ78A8mG7FwLR+aT98w wummMWmALJCz1qkrFD1hqpbEupjUnRV7TZoQY3knLQu8a6wjwGNsgHIOXVVP5KKUQkkq MPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=MAbBHeqlm0Mr5MPZg6WLDJ2pesu+3YmwQ/WBgvN5or4=; b=jQHWqMkzaDXxmRia7ZeelK586CQluwqEkBfv7EG4zvDusvaoFaSwQgOVeASU7sbzIO rKc4Ti2CH9Ul6l18vpb6IYJ3pYigiae3dQcJV50OF6HOvZtlSzX23C9hDU37A0xT/8qI g3dnlXEDyIWvw/UsyPIusv6Qpsm/5Jko/i0l4LglhNn7a402jagxIb8evMeSW0CjOxse 7UFMdz5uOPbQQM0W+V/UkCJwLy97X0h9H6EunRteqg0kX0V84k0MzsLppGw6D3Dd9O9G 3qJlBXSCIfpTIvkkd8kS4KgVEC2vpsQfXwAL4zbJZ7S1/IISlz3LTs9feuV8QJeGJkCB 0/GQ== X-Gm-Message-State: ABuFfoiw0Ch0jabDIrPiiAy9H3cdaTHdPPXDg10eYX/x5jnrrhqOyW9w fw1elae1bmgxJ1VfwiSF+oU= X-Google-Smtp-Source: ACcGV61XhRQ0knk+jbItSmJMs7lE98JgVgBuk6NNVjpQitdGtCnUqL2fYCtl1SvAFHMg69/67omqHw== X-Received: by 2002:a50:9886:: with SMTP id j6-v6mr19170842edb.160.1539513004630; Sun, 14 Oct 2018 03:30:04 -0700 (PDT) Original-Received: from [192.168.1.9] (x5f7270a0.dyn.telefonica.de. [95.114.112.160]) by smtp.gmail.com with ESMTPSA id a40-v6sm2543178edd.61.2018.10.14.03.30.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Oct 2018 03:30:03 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.20 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:102305 Archived-At: This is a multi-part message in MIME format. --===============0897442869382466989== Content-Type: multipart/alternative; boundary="------------A0047DD2E97502BDA7326EE8" Content-Language: en-US This is a multi-part message in MIME format. --------------A0047DD2E97502BDA7326EE8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit It works for me when I add a space after each \MPcode{…} block. \math{\MATRIX{\MPcode{...} ;\MPcode{...} }} Wolfgang Fabrice Couvreur schrieb am 14.10.18 um 12:18: > Hi Wolfgang, > Thank you for your solution.The space came from copy-paste because if > I do this, it does not work : > > \definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX] > > \starttext > > \math{\MATRIX{\MPcode{draw (0,0) -- (1cm,0);} ;\MPcode{draw (0,0) -- > (1cm,0);}}} > > \stoptext > > Fabrice > > Le dim. 14 oct. 2018 à 11:08, Wolfgang Schuster > > a écrit : > > > > Fabrice Couvreur schrieb am 14.10.18 um 10:46: >> Hi, >> I tried to use Metafun and \definemathmatrix [pmatrix] [matrix: >> parentheses] [simplecommand = MATRIX] to create two matrices, but >> that does not work. > > 1. You have a space in [matrix: parentheses] > > 2. When you have only simple graphics like in your example you can > use framed. > > \starttext > > \startformula >   A\, >   \startmathmatrix[left=\left(,right=\right)] >   \NC \framed[width=1em,height=1em,frame=off,bottomframe=on]{} \NC > \framed[width=1em,height=1em,frame=off,bottomframe=on,leftframe=on]{} > \NR >   \NC \framed[width=1em,height=1em,frame=off,rightframe=on]{} \NC > \framed[width=1em,height=1em]{} \NR >   \stopmathmatrix > \stopformula > > \stoptext > > Wolfgang > --------------A0047DD2E97502BDA7326EE8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit It works for me when I add a space after each \MPcode{…} block.

\math{\MATRIX{\MPcode{...} ;\MPcode{...} }}

Wolfgang


Fabrice Couvreur schrieb am 14.10.18 um 12:18:
Hi Wolfgang,
Thank you for your solution.The space came from copy-paste because if I do this, it does not work :

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]

\starttext

\math{\MATRIX{\MPcode{draw (0,0) -- (1cm,0);} ;\MPcode{draw (0,0) -- (1cm,0);}}}

\stoptext

Fabrice

Le dim. 14 oct. 2018 à 11:08, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> a écrit :


Fabrice Couvreur schrieb am 14.10.18 um 10:46:
Hi,
I tried to use Metafun and \
definemathmatrix [pmatrix] [matrix: parentheses] [simplecommand = MATRIX] to create two matrices, but that does not work.

1. You have a space in [matrix: parentheses]

2. When you have only simple graphics like in your example you can use framed.

\starttext

\startformula
  A\,
  \startmathmatrix[left=\left(,right=\right)]
  \NC \framed[width=1em,height=1em,frame=off,bottomframe=on]{} \NC \framed[width=1em,height=1em,frame=off,bottomframe=on,leftframe=on]{} \NR
  \NC \framed[width=1em,height=1em,frame=off,rightframe=on]{} \NC \framed[width=1em,height=1em]{} \NR
  \stopmathmatrix
\stopformula

\stoptext

Wolfgang

--------------A0047DD2E97502BDA7326EE8-- --===============0897442869382466989== 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 --===============0897442869382466989==--