From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106276 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?SmFuLUVyaWsgSMOkZ2dsw7Zm?= Newsgroups: gmane.comp.tex.context Subject: Re: Label in externalfigures Date: Thu, 13 Feb 2020 10:35:02 +0100 Message-ID: <93C1165E-733F-4D68-A3B7-7E2911DB9B45@bahnhof.se> References: <31ABCCAF-E6D4-43E5-8959-8CCDA28A6E38@bahnhof.se> <20200212171654.b110370fd28801a09d28318e@gmail.com> <02701558-b8ed-0368-565a-53db3dbcaabc@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Content-Type: multipart/mixed; boundary="===============8504935361489752264==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="26340"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 13 10:44:00 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j2B2M-0006hn-IN for gctc-ntg-context-518@m.gmane-mx.org; Thu, 13 Feb 2020 10:43:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 07E10181C10; Thu, 13 Feb 2020 10:42:01 +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 Y29YzQB_wqfC; Thu, 13 Feb 2020 10:41:59 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 98693181BD1; Thu, 13 Feb 2020 10:41:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5D96E181BD1 for ; Thu, 13 Feb 2020 10:41:59 +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 KfpBjWtetscb for ; Thu, 13 Feb 2020 10:41:58 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.80.101.70; helo=ste-pvt-msa1.bahnhof.se; envelope-from=janerik.hagglof@bahnhof.se; receiver= X-Greylist: delayed 413 seconds by postgrey-1.36 at zapf.ntg.nl; Thu, 13 Feb 2020 10:41:58 CET Original-Received: from ste-pvt-msa1.bahnhof.se (ste-pvt-msa1.bahnhof.se [213.80.101.70]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 83C441808A3 for ; Thu, 13 Feb 2020 10:41:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 5535548719 for ; Thu, 13 Feb 2020 10:35:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Original-Received: from ste-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (ste-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HlJT6PDv7sBm for ; Thu, 13 Feb 2020 10:35:03 +0100 (CET) Original-Received: from jan-eriks-air.orebro.se (unknown [194.103.203.145]) (Authenticated sender: mb287648) by ste-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id 5F27C48718 for ; Thu, 13 Feb 2020 10:35:03 +0100 (CET) In-Reply-To: <02701558-b8ed-0368-565a-53db3dbcaabc@xs4all.nl> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:106276 Archived-At: --===============8504935361489752264== Content-Type: multipart/alternative; boundary="Apple-Mail=_BCCDE960-6E46-4A51-87B1-842D607C5313" --Apple-Mail=_BCCDE960-6E46-4A51-87B1-842D607C5313 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99ve tested this but it appears outside, not as an layer over = the picture. \startMPcode=20 draw lmt_svg [ filename =3D "steguppgift.svg", height =3D 5cm, width =3D 10cm, ] ; label(\sometxt{5,0m},(63.936298,129.563995)); label(\sometxt{37=C2=B0},(95.652702,27.367201));=09 \stopMPcode Thanks=20 /Janne > 12 feb. 2020 kl. 20:10 skrev Hans Hagen : >=20 > On 2/12/2020 6:01 PM, Jan-Erik H=C3=A4ggl=C3=B6f wrote: >> The expected output should be like this, see example in the link = below >> = https://drive.google.com/file/d/13pCuUvNeL7T_Hs7-qrKZclkadcJ7_jVV/view?usp= =3Dsharing >> So that I have a picture so I can change the label text inside = according to different needs e.g change from 37=C2=B0 to 41=C2=B0 = without reediting it in Inkscape. >> A similar properties like latex export picture.pdf_tex which is a = function in Inkscape >> I investigate the details manual tip you provided, thanks a lot. > you might want to peek into the luametafun manual as svg is discussed = there, including label stuff >=20 > what you can also try (with lmtx) is this (no real interface yet): >=20 > \starttext >=20 > \hbox\bgroup > \ctxlua{metapost.startsvghashing()}% > \includesvgfile[labels-004.svg]% > \ctxlua{metapost.stopsvghashing()}% > \egroup >=20 > \stoptext >=20 > which should turn your labels into tex, so you can typeset them as tex = (so $\\sin(x)$ comes out as math) it's no big deal to add a remap option = there but then i'd rather go for symbolic names >=20 > Hans >=20 > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- --Apple-Mail=_BCCDE960-6E46-4A51-87B1-842D607C5313 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I=E2=80=99ve tested this but it appears outside, not as an = layer over the picture.

\startMPcode 
draw lmt_svg [
filename =3D = "steguppgift.svg",
= height =3D 5cm,
= width =3D 10cm,
= ] ;
label(\sometxt{5,0m},(63.936298,129.563995));
label(\sometxt{37=C2=B0},(95.652702,27.367201)); =
\stopMPcode

Thanks 

/Janne
12 feb. 2020 kl. 20:10 skrev Hans Hagen = <j.hagen@xs4all.nl>:

On = 2/12/2020 6:01 PM, Jan-Erik H=C3=A4ggl=C3=B6f wrote:
The expected output = should be like this, see example in the link below
https://drive.google.com/file/d/13pCuUvNeL7T_Hs7-qrKZclkadcJ7_j= VV/view?usp=3Dsharing
So that I have a picture so I = can change the label text inside according to different needs e.g change = from 37=C2=B0 to 41=C2=B0 without reediting it in Inkscape.
A similar properties like latex export picture.pdf_tex which = is a function in Inkscape
I investigate the details manual = tip you provided, thanks a lot.
you might = want to peek into the luametafun manual as svg is discussed there, = including label stuff

what you can also try = (with lmtx) is this (no real interface yet):

\starttext

\hbox\bgroup
 \ctxlua{metapost.startsvghashing()}%
=  \includesvgfile[labels-004.svg]%
=  \ctxlua{metapost.stopsvghashing()}%
\egroup

\stoptext

which = should turn your labels into tex, so you can typeset them as tex (so = $\\sin(x)$ comes out as math) it's no big deal to add a remap option = there but then i'd rather go for symbolic names

Hans

---------------------------------------------------------------= --
=             &n= bsp;           &nbs= p;            =     Hans Hagen | PRAGMA ADE
=             &n= bsp;Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
=       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
---------------------------------------------------------------= --

= --Apple-Mail=_BCCDE960-6E46-4A51-87B1-842D607C5313-- --===============8504935361489752264== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8504935361489752264==--