From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95587 Path: news.gmane.org!not-for-mail From: Jeong Dal Newsgroups: gmane.comp.tex.context Subject: Re: Optimize code to create a environnementt with Metafun ? Date: Thu, 28 Jul 2016 22:17:17 +0900 Message-ID: <59A277FC-973B-43DD-B7FB-3F48DDDE789B@me.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/mixed; boundary="===============6927679682835947212==" X-Trace: ger.gmane.org 1469711884 19915 80.91.229.3 (28 Jul 2016 13:18:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 13:18:04 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 28 15:17:52 2016 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 plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bSlCB-00027M-Hy for gctc-ntg-context-518@m.gmane.org; Thu, 28 Jul 2016 15:17:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 41A8013686; Thu, 28 Jul 2016 15:17:37 +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 i8wdgopSoOV6; Thu, 28 Jul 2016 15:17:36 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5E42313687; Thu, 28 Jul 2016 15:17:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E4CC813685 for ; Thu, 28 Jul 2016 15:17:35 +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 hkxD5OibIBG2 for ; Thu, 28 Jul 2016 15:17:34 +0200 (CEST) Original-Received: from pv33p03im-asmtp001.me.com (pv33p03im-asmtp001.me.com [17.143.180.10]) (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 9B55B13683 for ; Thu, 28 Jul 2016 15:17:24 +0200 (CEST) Original-Received: from process-dkim-sign-daemon.pv33p03im-asmtp001.me.com by pv33p03im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OB100C000RRKK00@pv33p03im-asmtp001.me.com> for ntg-context@ntg.nl; Thu, 28 Jul 2016 13:17:22 +0000 (GMT) Original-Received: from [192.168.40.251] (unknown [36.97.142.14]) by pv33p03im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OB100KWS0WUMA40@pv33p03im-asmtp001.me.com> for ntg-context@ntg.nl; Thu, 28 Jul 2016 13:17:21 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-28_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1607280135 In-reply-to: X-Mailer: Apple Mail (2.3124) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1469711842; bh=OpDY3jSy/3ztt8nJNXMbuVaN2nn43A1KYv9Pkl8C+D8=; h=From:Content-type:Message-id:MIME-version:Subject:Date:To; b=J6BTcHOorK86dttPOL3/0RuKeepaMBL3QJsWGluHGw9sYbbwtve2cf0ilkHJSQ3e8 0V9gVHuj7oykli5qFTm/VRNkg72JiuyDwD7eXH7zjGCAQwwytBi3dXc4eQEOdjavQT yitpvSuFZPuwwjIByT6k09omWHQEkSdLHJYZ9nPDedHlIqLd1rcysu6SbRqPiOn+or qDIrs5puDmXc7k/5Y5VJC4AL+xRBax9rcjSbTzKbnhUOwc7ur5d6VD7ahmVnvs5Cqm /+1rinyIcUnlgelu01a91CHh7rsYVzJltkKGbKenRm8pTB92Aws8FVWUPAze4M8SQX OrS+rcCgeXGyw== 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:95587 Archived-At: --===============6927679682835947212== Content-type: multipart/alternative; boundary="Apple-Mail=_81E2EF52-8960-497C-87AF-54739B0F3988" --Apple-Mail=_81E2EF52-8960-497C-87AF-54739B0F3988 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Dear Fabrice and Wolfgang, I tried the following code of yours, but I got =E2=80=9C! undefined = control sequence=E2=80=9D error. Would you please tell me where I should to correct? Thank you so much, Best regards, Dalyoung %%%%%%%%%%%%%%% \setupbodyfont[pagella,11pt] \setupcolors[state=3Dstart] \defineframedtext [MyFrame] [before=3D{\blank}, after=3D{\blank}, frame=3Doff, background=3DMyFrame, %width=3D\textwidth, width=3Dmax, height=3Dfit, style=3Ditalic] \definelabel [D=C3=A9finition] [headstyle=3D\bf\smallcaps] \startuseMPgraphic{MyFrame} path b; picture p; %p :=3D textext.rt("\white\D=C3=A9finition"); p :=3D textext.rt("\white\framedtextparamemter{Title}"); %p :=3D textext.rt("\white\getvariable{text}{text1}"); p :=3D p shifted (2BodyFontSize,OverlayHeight-ypart center = p+.25ExHeight); b :=3D boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth; fill OverlayBox withcolor lightgray; %\MPcolor{ fill b withcolor darkred; draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw p; setbounds currentpicture to boundingbox currentpicture enlarged 2mm; \stopuseMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \starttext \showframe \startMyFrame[Title=3DHans] \input knuth \stopMyFrame \startMyFrame[Title=3DHagen] \input knuth \stopMyFrame \stoptext =E2=80=A6.. tex error > tex error on line 52 in file = /Users/graph/Documents/TeXfiles/test.tex: ! Undefined control sequence ... p :=3D textext.rt("\white \framedtextparamemter=20 {Title}"); p :=3D p = shifted ... \meta_process_graphic ...currentMPformat }data {#1 ;}initializations = {\meta_f... \meta_handle_use_graphic ...a_process_graphic {#3} \endgroup=20 \meta_use_graphic ...me \??mpgraphic #1\endcsname=20 \empty = \meta_end_graphic_g... =20 \else=20 \executedefinedoverlay ...e \everyoverlay #2\else=20 \lower = \d_framed_target_dp... ... l.52 \stopMyFrame =20 42 =20 43 \defineoverlay 44 [MyFrame] 45 [\useMPgraphic{MyFrame}] 46 =20 47 \starttext 48 =20 49 \showframe 50 \startMyFrame[Title=3DHans] 51 \input knuth 52 >> \stopMyFrame 53 =20 54 \startMyFrame[Title=3DHagen] 55 \input knuth 56 \stopMyFrame 57 =20 58 \stoptext --Apple-Mail=_81E2EF52-8960-497C-87AF-54739B0F3988 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Dear Fabrice and Wolfgang,

I tried the following code of yours, = but I got =E2=80=9C! undefined control sequence=E2=80=9D = error.
Would you please tell me where I should to = correct?

Thank = you so much,

Best regards,

Dalyoung

%%%%%%%%%%%%%%%
\setupbodyfont[pagella,11pt]

\setupcolors[state=3Dstart]

\defineframedtext
 [MyFrame]
 [before=3D{\blank},
  = after=3D{\blank},
  frame=3Doff,
  background=3DMyFrame,
  = %width=3D\textwidth,
  width=3Dmax,
  height=3Dfit,
  = style=3Ditalic]

\definelabel
 [D=C3=A9finition]
=
 [headstyle=3D\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b;
picture p;
%p= :=3D textext.rt("\white\D=C3=A9finition");
p :=3D = textext.rt("\white\framedtextparamemter{Title}");
%p = :=3D textext.rt("\white\getvariable{text}{text1}");
p= :=3D p shifted (2BodyFontSize,OverlayHeight-ypart center = p+.25ExHeight);
b :=3D boundingbox p leftenlarged = .5EmWidth rightenlarged .5EmWidth;
fill OverlayBox = withcolor lightgray;  %\MPcolor{
fill b = withcolor darkred;
draw bottomboundary OverlayBox = withpen pencircle scaled 1pt  withcolor
darkred;
draw topboundary OverlayBox = withpen pencircle scaled 1pt  withcolor
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture = enlarged 2mm;
\stopuseMPgraphic

\defineoverlay
 [MyFrame]
 [\useMPgraphic{MyFrame}]

\starttext

\showframe
\startMyFrame[Title=3DHans]
\input = knuth
\stopMyFrame

\startMyFrame[Title=3DHagen]
\input knuth
\stopMyFrame

\stoptext

=E2=80=A6..

tex error   =     > tex error on line 52 in file = /Users/graph/Documents/TeXfiles/test.tex: ! Undefined control = sequence

<argument> = ... p :=3D textext.rt("\white \framedtextparamemter 
              =                     =                 {Title}"); p :=3D = p shifted ...
\meta_process_graphic= ...currentMPformat }data {#1
    =                     =                     =       ;}initializations {\meta_f...
\meta_handle_use_graphic ...a_process_graphic = {#3}
        =                     =                     =   \endgroup 
\meta_use_graphic = ...me \??mpgraphic #1\endcsname 
                =                     =               \empty = \meta_end_graphic_g...
<to be read = again> 
\else 
\executedefinedoverlay ...e = \everyoverlay #2\else 
    =                     =                     =       \lower \d_framed_target_dp...
...
l.52 = \stopMyFrame

    =            


42     
43 =     \defineoverlay
44  =     [MyFrame]
45    =   [\useMPgraphic{MyFrame}]
46     
47 =     \starttext
48  =    
49     = \showframe
50     = \startMyFrame[Title=3DHans]
51   =   \input knuth
52 >>  = \stopMyFrame
53    =  
54     = \startMyFrame[Title=3DHagen]
55   =   \input knuth
56     = \stopMyFrame
57    =  
58     = \stoptext


= --Apple-Mail=_81E2EF52-8960-497C-87AF-54739B0F3988-- --===============6927679682835947212== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============6927679682835947212==--