From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97251 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Customize a table with Metafun Date: Tue, 14 Feb 2017 16:53:04 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0632158979440181652==" X-Trace: blaine.gmane.org 1487087635 22496 195.159.176.226 (14 Feb 2017 15:53:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2017 15:53:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 14 16:53:50 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 1cdfQM-0005TR-Be for gctc-ntg-context-518@m.gmane.org; Tue, 14 Feb 2017 16:53:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DD01A12A0221; Tue, 14 Feb 2017 16:53:21 +0100 (CET) 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 v0YvLPU8b8ue; Tue, 14 Feb 2017 16:53:19 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 921DF12A021C; Tue, 14 Feb 2017 16:53:19 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6A34412A021C for ; Tue, 14 Feb 2017 16:53:18 +0100 (CET) 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 Al85ylBTvmLY for ; Tue, 14 Feb 2017 16:53:17 +0100 (CET) Original-Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (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 1E60512A01B7 for ; Tue, 14 Feb 2017 16:53:07 +0100 (CET) Original-Received: by mail-it0-f46.google.com with SMTP id k200so18525397itb.1 for ; Tue, 14 Feb 2017 07:53:07 -0800 (PST) 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=HuBDUfQZJITVc0H+XQrQbcVaBQ63tdHrYtp0rFHQsLc=; b=uVmvbx1bs8bmapFii9GfpZGGMl5s2P1dHPbgqSdxVoCygJjOvvVoH6Y1VRuYHvY7lG /7iz8oz/Gva7TxvJbQB2ruMV9XD/pM9p1V9x7cLyA0LI4tH+kZUm/V2tNmha6XHsdUg4 xR5c29Ara1ac8VF8FS65YW6H1u77i5xrnS+DpPH1mJLZYGiaIDj04aDE8J9jddCzGx3Y pqu1AXI28VVaIophl/qpxrxziLaadgI+Ms+SdwqM/x/sSkQ7t57BUclzNeiE27bBAm/D OjcDlDJXnfyxHVHK+KaioSinv7eL3HJG50MiJtCuc4LRKJyWLy/v6VpvYat008BixlEs uyew== 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=HuBDUfQZJITVc0H+XQrQbcVaBQ63tdHrYtp0rFHQsLc=; b=cBPyNumsOqIviBIsaXUs0FwssFrhz4O2PYB4j6nYjefwZX3KEe4VbZFuTkJ6rjU1I+ qDUUGWnq5ThgAVV3Zwf8LtWtO3+dr3IpvLyF9oLq3/YQxqO9YSDl6whBHqhykbkKeai6 /sXQt3H73gtxH3IjrQ4rJJj2p43a5/vICCF4bKzjlOQnyyiFrQKJfnyWlXb3wqQhVeG2 10NP+k+oO1/z8D4A8aYpqCXWCmWlGDTvFS+ErnG0tdsDH76U91DNJ4l+ABjx73bILEBc N2pmZRFYzyUeRh3yB1QtUSs39Y+jRrLQEdwnyZvdKoEKuc4vj96oXWxEvEv3S/OnbVWV Bylw== X-Gm-Message-State: AMke39kRAdKyAwJM1h0cKnrvS1S0z8doYnJJ6s26Q1d5EOhtrQ6oxXTjgh6hyCbSvRxxEU6nLiTEMDtdlAASGg== X-Received: by 10.107.142.205 with SMTP id q196mr28990573iod.147.1487087585189; Tue, 14 Feb 2017 07:53:05 -0800 (PST) Original-Received: by 10.64.24.73 with HTTP; Tue, 14 Feb 2017 07:53:04 -0800 (PST) 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:97251 Archived-At: --===============0632158979440181652== Content-Type: multipart/alternative; boundary=94eb2c093c16443b7605487f8f7e --94eb2c093c16443b7605487f8f7e Content-Type: text/plain; charset=UTF-8 Hello, In the code below, the red vertical line extends beyond the edges of the cell. Thank you Fabrice \startuniqueMPgraphic{Vertical} linecap:=squared ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle withcolor \MPcolor{red}) ; draw .5[llcorner p, lrcorner p]--.5[ulcorner p, urcorner p] ; setbounds currentpicture to p ; \stopuniqueMPgraphic \defineoverlay[Vertical][\uniqueMPgraphic{Vertical}] \startsetups[table:initialize] \setupTABLE[start] [align={middle,lohi},offset=0.5ex,width=1.5cm, foregroundstyle={\switchtobodyfont[10pt]}] \setupTABLE[1][2][background=Vertical] \stopsetups \starttext \startlinecorrection[blank] \startmidaligned \bTABLE[setups=table:initialize] \bTR \bTD \math{\red 0 {\rm (A)}} \eTD \bTD \math{+\infty} \eTD \eTR \bTR \bTD \eTD \bTD \math{+\infty} \eTD \eTR \eTABLE \stopmidaligned \stoplinecorrection \stoptext --94eb2c093c16443b7605487f8f7e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,
In the code below, the red vertical line extends b= eyond the edges of the cell.
Thank you
Fabrice
<= br>\startuniqueMPgraphic{Vertical}

=C2=A0 linecap:=3Dsquared ;
= =C2=A0 path p ; p :=3D unitsquare xyscaled (OverlayWidth,OverlayHeight) ;=C2=A0 drawoptions (withpen pencircle withcolor \MPcolor{red}) ;
=C2= =A0 draw .5[llcorner p, lrcorner p]--.5[ulcorner p, urcorner p] ;
=C2=A0= setbounds currentpicture to p ;

\stopuniqueMPgraphic

\define= overlay[Vertical][\uniqueMPgraphic{Vertical}]

\startsetups[table:ini= tialize]

\setupTABLE[start]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 [align=3D{middle,lohi},offset=3D0.5ex,width=3D1.5c= m,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fo= regroundstyle=3D{\switchtobodyfont[10pt]}]
\setupTABLE[1][2][background= =3DVertical]

\stopsetups

\starttext
\startlinecorrection[b= lank]
=C2=A0 \startmidaligned
=C2=A0=C2=A0=C2=A0 \bTABLE[setups=3Dtab= le:initialize]
=C2=A0=C2=A0=C2=A0 \bTR
=C2=A0=C2=A0=C2=A0 \bTD \math{= \red 0 {\rm (A)}} \eTD
=C2=A0=C2=A0=C2=A0 \bTD \math{+\infty}=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \eTD
=C2=A0=C2=A0=C2=A0 \e= TR
=C2=A0=C2=A0=C2=A0 \bTR
=C2=A0=C2=A0=C2=A0 \bTD=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=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \eTD
=C2=A0=C2=A0=C2= =A0 \bTD=C2=A0 \math{+\infty}=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \eTD
=C2=A0=C2=A0=C2=A0 \eTR
=C2=A0=C2=A0=C2=A0 \eTABLE
=C2=A0= \stopmidaligned
\stoplinecorrection
\stoptext
--94eb2c093c16443b7605487f8f7e-- --===============0632158979440181652== 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 --===============0632158979440181652==--