From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/103079 Path: news.gmane.org!.POSTED!not-for-mail From: Henri Menke Newsgroups: gmane.comp.tex.context Subject: Re: textext with plain MetaFun Date: Mon, 21 Jan 2019 22:47:38 +1300 Message-ID: <4440874a-7c8f-3f02-447f-2cc09562fcf2@gmail.com> References: <455d0d0a-5a87-d2ce-05b0-ba3174f3f4d2@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: ciao.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------706352DA4918B8E3F266074B" X-Trace: ciao.gmane.org 1548064080 75846 195.159.176.228 (21 Jan 2019 09:48:00 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Mon, 21 Jan 2019 09:48:00 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 21 10:47:57 2019 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 ciao.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1glWBQ-000JgY-Ve for gctc-ntg-context-518@m.gmane.org; Mon, 21 Jan 2019 10:47:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CFB97D2813; Mon, 21 Jan 2019 10:47:52 +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 HHADcrA8u5nL; Mon, 21 Jan 2019 10:47:51 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E631DD281F; Mon, 21 Jan 2019 10:47:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F069ED281F for ; Mon, 21 Jan 2019 10:47:50 +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 Pat3LuWvB7iZ for ; Mon, 21 Jan 2019 10:47:50 +0100 (CET) Original-Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 9B443D2813 for ; Mon, 21 Jan 2019 10:47:49 +0100 (CET) Original-Received: by mail-pl1-f181.google.com with SMTP id g9so9585018plo.3 for ; Mon, 21 Jan 2019 01:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=V2fekF920RyZi38KQDlNRBMqtihzGSrkHM8cRoaRyE4=; b=moaXP9SmprhS4KjZISX2TVZgGmSGclpO5zLsm3aATp7vmu3P/ezY8xC/JSxJT1gsRc /qj29QuZdMvSW884ozaGyK2HLzAVW/Sy2JbQCA1r1d8GjQMAZx4jkAaeg2VvYKXS0Nm1 ZKwlcYcszhpJePRYoEkgB86D1vIGgv+cVx0neiy5xCb0jPFM0ZJ67HQ+EqZO9kZhwp7a wrAJdNPVmhe8EkLCxapY3K7brfRKtCmx344DsOq+pX+Okm8MRRAZ9Nmp4ZML4mJ8wlkC /R6DpiQBXJ8E2ihkjFC2QzAff/liuDCZTIqCVYxUfMidDq3/pElFOzLV3F7rbbXYLpTv 8zmg== 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=V2fekF920RyZi38KQDlNRBMqtihzGSrkHM8cRoaRyE4=; b=fOxmyw4xiPyBYrF3rvvh1m0HVGAXFc9GpTqmWdO+qkFPGaDr9TjKsBD2K5t4L3OSMY DywJdvvMI/XgjCk2vKf8SG6aCzXXGgU8VgoYF0wdArIMsXmQ5lVNbtA+sfYMgW97yv3y KdxpLrtIOFoXLziMJHIphtvp2ub/ASR9nmc0Q9+uZskNDdv7Le8C6l+4vxgR3FOrYdTb vxoSn1qYjBrWR57+MPKUylurYRDREZ8iQILG9XQaKtj0P+rfdNCB1wp/HNs1BtN4FY8Z Qh8KDiRvXsIFxhppDN2QXWwtncJVa5SISBC2O8yydiDu5nybK8A1gGbiAA30cHVrEpvC 17uA== X-Gm-Message-State: AJcUukeP6ApeTjUNGWCYDEmqjSFsK8Bn0m6qdGqdouVu88FtZoqsEcqO I80wv4QScDCJJfR8tmk3ffR1RR0W X-Google-Smtp-Source: ALg8bN54+uOQCJjey8HjULjnnTLcr54NF4kisLvN9f8PfDJS1rlowgocGA0kT5nk9/795qxrWxi0Jw== X-Received: by 2002:a17:902:3f81:: with SMTP id a1mr29275800pld.258.1548064067518; Mon, 21 Jan 2019 01:47:47 -0800 (PST) Original-Received: from ?IPv6:2406:e007:8196:ac01:1f82:42c7:3e65:8719? ([2406:e007:8196:ac01:1f82:42c7:3e65:8719]) by smtp.gmail.com with ESMTPSA id m3sm26127913pff.173.2019.01.21.01.47.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 01:47:46 -0800 (PST) In-Reply-To: Content-Language: de-DE 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:103079 Archived-At: This is a multi-part message in MIME format. --------------706352DA4918B8E3F266074B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 1/21/19 10:40 PM, luigi scarso wrote: > On Mon, Jan 21, 2019 at 8:57 AM Henri Menke wrote: > >> Dear list, >> >> When I process the short MetaFun example >> >> beginfig(1) >> draw textext("MetaFun") ; >> endfig; >> end >> >> with plain MetaFun, i.e. >> >> mpost '&metafun' test.mp >> >> > what does > $> mpost -mem=metafun '\relax; tracingall; input test.mp;' > say ? Log is attached. > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > --------------706352DA4918B8E3F266074B Content-Type: text/x-log; name="test.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test.log" This is MetaPost, version 2.00 (TeX Live 2018) (kpathsea version 6.3.0) 21 JAN 2019 22:45 **\relax; tracingall; input test.mp; (/usr/local/texlive/2018/texmf-dist/metapost/context/base/common/metafun.mp (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/metafun.mpii (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-base.mpii Preloading the plain mem file, version 1.004 for metafun ii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-tool.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-spec.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-core.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-page.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-text.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-txts.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-shap.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-butt.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-char.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-step.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-grph.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-figs.mpii) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-grid.mpii (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-form.mpii (/usr/local/texlive/2018/texmf-dist/metapost/base/string.mp) (/usr/local/texlive/2018/texmf-dist/metapost/base/marith.mp (/usr/local/texlive/2018/texmf-dist/metapost/base/string.mp)))) (/usr/local/texlive/2018/texmf-dist/metapost/context/base/mpii/mp-func.mpii))) {tracingtitles:=1} {tracingequations:=1} {tracingcapsules:=1} {tracingspecs:=2} {tracingchoices:=1} {tracinglostchars:=1} {tracingstats:=1} {tracingoutput:=1} {tracingmacros:=1} {tracingrestores:=1} {input} (./test.mp beginfig(EXPR0)->_fig_nesting_:=_fig_nesting_+1;if._fig_nesting_=1:begingroup.c harcode:=(EXPR0);resetfig;scantokens.extra_beginfig;fi; (EXPR0)<-1 {(0)+(1)} {_fig_nesting_:=1} ## _fig_nesting_=1 {if} {(1)=(1)} {true} {begingroup} {charcode:=1} resetfig->clearxy;clearit;clearpen;pickup.defaultpen;interim.linecap:=linecap;i nterim.linejoin:=linejoin;interim.miterlimit:=miterlimit;save._background_;colo r._background_;_background_:=background;save.background;color.background;backgr ound:=_background_;drawoptions(); clearxy->if.false.for$:=(TEXT0):or.true.endfor:forsuffixes$:=(TEXT0):x$:= whatever;y$:=whatever;endfor;else:save.x,y;fi (TEXT0)<- {if} {false} {for} {false} {save} {fi} clearit->currentpicture:=nullpicture {nullpicture} {currentpicture:=picture} clearpen->currentpen:=nullpen;pen_lft:=pen_rt:=pen_top:=pen_bot:=0;path.current pen_path; {nullpen} {currentpen:=pen} {pen_bot:=0} {pen_top:=0} {pen_rt:=0} {pen_lft:=0} {path} pickup->if.numeric(EXPR0):numeric_pickup_.else:pen_pickup_.fi(EXPR0) (EXPR0)<-1 {if} {numeric(1)} {true} numeric_pickup_->if.unknown.pen_[(EXPR0)]:errmessage"Unknown pen";clea rpen.else:currentpen:=pen_[(EXPR0)];pen_lft:=pen_lft_[(EXPR0)];pen_rt:=pen_rt_[ (EXPR0)];pen_top:=pen_top_[(EXPR0)];pen_bot:=pen_bot_[(EXPR0)];currentpen_path: =pen_path_[(EXPR0)]fi; {else} (EXPR0)<-1 {if} {unknown(pen)} {false} {currentpen:=pen} {pen_lft:=-0.25} {pen_rt:=0.25} {pen_top:=0.25} {pen_bot:=-0.25} {fi} {currentpen_path:=unknown path pen_path_1} {interim} {linecap:=1} {interim} {linejoin:=1} {interim} {miterlimit:=10} {save} {color} {_background_:=(1,1,1)} ## bluepart _background_=1 ## greenpart _background_=1 ## redpart _background_=1 {save} {color} {background:=(1,1,1)} ## bluepart background=1 ## greenpart background=1 ## redpart background=1 drawoptions(TEXT0)->def._op_=(TEXT0)enddef (TEXT0)<- {def} {scantokens} {true} {insidefigure:=true} reset_extra_specials->begingroup._local_specials_:="";endgroup (SUFFIX0)<- (SUFFIX1)<-reset_extra_specials {begingroup} {_local_specials_:=""} {endgroup} {truecorners:=0} {miterlimit:=10} {linejoin:=1} {linecap:=1} erasegraphictextfile->write.EOF.to.data_mpo_file;let.erasegraphictextfile=relax ; {write} data_mpo_file->job_name&"-mpgraph.mpo" job_name->jobname {("test")&("-mpgraph.mpo")} {let} {fi} draw->addto.currentpicture.if.picture(EXPR0):also(EXPR0)else:doublepath(E XPR0)withpen.currentpen.fi._op_ textext@#(EXPR3)->begingroup.save._s_;string._s_;interim.labeloffset:=textextof fset;noftexpictures:=noftexpictures+1;if.string(EXPR3):if.hobbiestextext:write. _s_&"btex "&(EXPR3)&" etex"to"mptextmp.mp";write.EOF.to"mptextmp.mp";scantokens "input mptextmp"else:write"% figure "&decimal.charcode&" : "&"texpictures["&dec imal.noftexpictures&"] := btex "&(EXPR3)&" etex ;"to.jobname&".mpt";if.unknown. texpictures[noftexpictures]:thelabel(SUFFIX2)("unknown",origin)else:thelabel(SU FFIX2)(texpictures[noftexpictures],origin)fi.fi.else:thelabel(SUFFIX2)((EXPR3), origin)fi.endgroup (SUFFIX0)<- (SUFFIX1)<-textext (SUFFIX2)<- (EXPR3)<-"MetaFun" {begingroup} {save} {string} {interim} {labeloffset:=0} {(0)+(1)} {noftexpictures:=1} ## noftexpictures=1 {if} {string("MetaFun")} {true} {if} {false} {write} {decimal(1)} {("% figure ")&("1")} {("% figure 1")&(" : ")} {("% figure 1 : ")&("texpictures[")} {decimal(1)} {("% figure 1 : texpictures[")&("1")} {("% figure 1 : texpictures[1")&("] := btex ")} {("% figure 1 : texpictures[1] := btex ")&("MetaFun")} {("% figure 1 : texpictures[1] := btex MetaFun")&(" etex ;")} {("test")&(".mpt")} {if} {unknown(unknown picture texpictures1)} {true} thelabel@#(EXPR3)(EXPR4)->begingroup.save.p;picture.p;p=(EXPR3)if.not.picture(E XPR3):infont.defaultfont.scaled.defaultscale.fi;(p.shifted((EXPR4)+labeloffset* laboff(SUFFIX2)-(labxf(SUFFIX2)*lrcorner.p+labyf(SUFFIX2)*ulcorner.p+(1-labxf(S UFFIX2)-labyf(SUFFIX2))*llcorner.p)))endgroup (SUFFIX0)<- (SUFFIX1)<-thelabel (SUFFIX2)<- (EXPR3)<-"unknown" (EXPR4)<-(0,0) {begingroup} {save} {picture} {if} {picture("unknown")} {not(false)} {true} {("unknown")infont("cmr10")} {fi} {(picture)scaled(1)} {(unknown picture p)=(picture)} {(0)*((0,0))} {((0,0))+((0,0))} {lrcorner(picture)} {(0.5)*((39.57397,0))} {ulcorner(picture)} {(0.5)*((0,6.9185))} {((19.78699,0))+((0,3.45926))} {(1)-(0.5)} {(0.5)-(0.5)} {llcorner(picture)} {(0)*((0,0))} {((19.78699,3.45926))+((0,0))} {((0,0))-((19.78699,3.45926))} {(picture)shifted((-19.78699,-3.45926))} {restoring p} {endgroup} {else} {fi} {else} {restoring labeloffset=3} {restoring _s_} {endgroup} (EXPR0)<-picture {addto} {if} {picture(picture)} {true} {else} _op_-> endfig->;if._fig_nesting_=1:scantokens.extra_endfig;shipit;endgroup;fi;_fig_nes ting_:=_fig_nesting_-1; {if} {(1)=(1)} {true} {scantokens} resetspotcolors->numeric.spotcolorhash[][]; {numeric} resetcmykcolors->numeric.cmykcolorhash[][][][]; {numeric} add_special_signal->begingroup.if(length._global_specials_<>0)or(length._local_ specials_<>0):special("%%MetaPostSpecials: 2.0 "&decimal._special_signal_&" "&d ecimal._special_div_);fi;endgroup (SUFFIX0)<- (SUFFIX1)<-add_special_signal {begingroup} {if} {length("")} {(0)<>(0)} {length("")} {(0)<>(0)} {(false)or(false)} {false} {endgroup} naturalizepaths->let.fill=normalfill;let.draw=normaldraw; {let} {let} mfun_apply_max_dimensions->if.bbwidth.currentpicture>maxdimensions:currentpictu re:=currentpicture.if.bbheight.currentpicture>bbwidth.currentpicture:ysized.els e:xsized.fi.maxdimensions;elseif.bbheight.currentpicture>maxdimensions:currentp icture:=currentpicture.ysized.maxdimensions;fi; {if} bbwidth->begingroup.if.unknown(EXPR2):0elseif.path(EXPR2)or.picture(EX PR2):xpart(lrcorner(EXPR2)-llcorner(EXPR2))else:0fi.endgroup (SUFFIX0)<- (SUFFIX1)<-bbwidth (EXPR2)<-picture {begingroup} {if} {unknown(picture)} {false} {path(picture)} {picture(picture)} {(false)or(true)} {true} {lrcorner(picture)} {llcorner(picture)} {((19.78699,-3.45926))-((-19.78699,-3.45926))} {else} {xpart((39.57397,0))} {endgroup} {(39.57397)>(14000)} {false} bbheight->begingroup.if.unknown(EXPR2):0elseif.path(EXPR2)or.picture(E XPR2):ypart(urcorner(EXPR2)-lrcorner(EXPR2))else:0fi.endgroup (SUFFIX0)<- (SUFFIX1)<-bbheight (EXPR2)<-picture {begingroup} {if} {unknown(picture)} {false} {path(picture)} {picture(picture)} {(false)or(true)} {true} {urcorner(picture)} {lrcorner(picture)} {((19.78699,3.45924))-((19.78699,-3.45926))} {else} {ypart((0,6.9185))} {endgroup} {(6.9185)>(14000)} {false} add_extra_specials->begingroup.scantokens._global_specials_;scantokens._local_s pecials_;endgroup (SUFFIX0)<- (SUFFIX1)<-add_extra_specials {begingroup} {scantokens} {scantokens} {endgroup} reset_extra_specials->begingroup._local_specials_:="";endgroup (SUFFIX0)<- (SUFFIX1)<-reset_extra_specials {begingroup} {_local_specials_:=""} {endgroup} {false} {insidefigure:=false} shipit->shipout.currentpicture {shipout} [1{psfonts.map}] Edge structure at line 3 (just shipped out): "unknown" infont "cmr10" transformed (-19.78699,-3.45926,1,0,0,1) End edges {restoring background} {restoring _background_} {restoring miterlimit=10} {restoring linejoin=1} {restoring linecap=1} {restoring y} {restoring x} {endgroup} {fi} {(1)-(1)} {_fig_nesting_:=0} ## _fig_nesting_=0 end->;message"";message.metafunversion;message"";normalend; {message} {message} metafun ii 2019-1-21 22:45 {message} ) Here is how much of MetaPost's memory you used: 223 strings using 5067 characters 3461584 bytes of node memory 1938 symbolic tokens 6i,94n,9p,835b,5f stack positions out of 16i,96n,33p,950b,6f 1 output file written: test.1 --------------706352DA4918B8E3F266074B 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 --------------706352DA4918B8E3F266074B--