Re: [NTG-context] [Metapost] Using mkIV and metapost to produce SVG
On 5/5/2014 1:54 PM, ralf.waldvo...@pta.de wrote: Dear all, I would like to produce an svg file from a Metapost input file using some of ConTeXt's typesetting features (esp. using System OTF Fonts) using something like: \startbuffer[buffer:dummy] \start \startcolor[white] \framed[align=middle,width=28mm,frame=off] { \SansBodyBold % Font definition done earlier Test to \par rendered \par } \stopcolor \stop \stopbuffer % \startuniqueMPgraphic{mp:margin} picture text; text := btex \getbuffer[buffer:dummy] etex; draw text shifted(-11.8mm,-4.8mm ); % Some more fancy drawing her \stopuniqueMPgraphic Can I render that with MetaPost to SVG? no Is it possible to render text as paths not as referenced glyphs in MetaPost/ConTexT? no, unless you use the graphic text features Unfortunately I have to stick to SVG as the resulting output format. Converting from PDF to SVG is not an option at the moment due a) performance considerations and b) trouble with generated font names in the resulting ConTeXt PDF file (inkscape as well as pdf2svg produce real strange results). performance should not really be an issue as one can cache what strange results? - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost and mkiv
Alan BRASLAU wrote: On Friday 27 November 2009 14:54:53 Willi Egger wrote: Hi Alan, I run in this myself. A possible solution is: \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(textext(\color[red] decimal i ), (i, -1) scaled 1cm); endfor ; \stopuniqueMPgraphic \setupcolors[state=start] \starttext \uniqueMPgraphic{test} \stoptext KR Willi Yes, Thanks. I thought of this as a work-around, but the first is clearly a bug. iirc, Hans says this is an intentional difference between mkii and mkiv, but it is not yet on the wiki page because I am not sure what to write down. Best wishes, Taco ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost and mkiv
On Friday 27 November 2009 14:54:53 Willi Egger wrote: Hi Alan, I run in this myself. A possible solution is: \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(textext(\color[red] decimal i ), (i, -1) scaled 1cm); endfor ; \stopuniqueMPgraphic \setupcolors[state=start] \starttext \uniqueMPgraphic{test} \stoptext KR Willi Yes, Thanks. I thought of this as a work-around, but the first is clearly a bug. What actually works is: \setupcolors [state=start] \starttext \startuniqueMPgraphic{test} for i = 0 upto 10 : %draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ; draw thelabel(textext(\red decimal i ), (i, 0) scaled 1cm) ; endfor ; \stopuniqueMPgraphic \uniqueMPgraphic{test} \stoptext Now it is up to the experts to fix the bug in mkiv. Alan ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost and mkiv
Alan BRASLAU wrote: Is this a bug in mkiv metapost? Alan minimal example: \setupcolors [state=start] \starttext \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ; % red in mkii, black in mkiv? endfor ; \stopuniqueMPgraphic \uniqueMPgraphic{test} \stoptext you might try one of \chardef\MPcolormethod0 \chardef\MPcolormethod1 \chardef\MPcolormethod2 \chardef\MPcolormethod3 - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost and mkiv
Hi Alan, I run in this myself. A possible solution is: \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(textext(\color[red] decimal i ), (i, -1) scaled 1cm); endfor ; \stopuniqueMPgraphic \setupcolors[state=start] \starttext \uniqueMPgraphic{test} \stoptext KR Willi On Nov 27, 2009, at 10:31 AM, Alan BRASLAU wrote: Is this a bug in mkiv metapost? Alan minimal example: \setupcolors [state=start] \starttext \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ; % red in mkii, black in mkiv? endfor ; \stopuniqueMPgraphic \uniqueMPgraphic{test} \stoptext __ _ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net __ _ ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
On Tue, Nov 24, 2009 at 9:05 PM, Alan BRASLAU alan.bras...@cea.fr wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext It seems ok here # context --version MTXrun | main context file: /opt/luatex/minimals-beta/tex/texmf-context/tex/context/base/context.tex MTXrun | current version: 2009.11.24 10:13 r...@luigicasa-laptop:/opt/luatex/mkiv# luatex --version This is LuaTeX, Version beta-0.44.0-2009110210 # uname -a Linux luigicasa-laptop 2.6.24-25-generic #1 SMP Tue Oct 20 07:31:10 UTC 2009 i686 GNU/Linux Ububtu 8.04 LTS 32 bit -- luigi test-alan.pdf Description: Adobe PDF document ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext the problem was in the backend of one of the recent luatex binaries but has been solved already Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext the problem was in the backend of one of the recent luatex binaries but has been solved already May I bet that Alan is using linux for which I need Hans' build for which it might be polite of me to send him new building scripts since the current ones fail (the old version of svn on debian sarge doesn't recognize some of the options)? Sorry guys, but it's too late today. Mojca ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
On Tuesday 24 November 2009 21:20:05 luigi scarso wrote: On Tue, Nov 24, 2009 at 9:05 PM, Alan BRASLAU alan.bras...@cea.fr wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext It seems ok here # context --version MTXrun | main context file: /opt/luatex/minimals-beta/tex/texmf-context/tex/context/base/context.tex MTXrun | current version: 2009.11.24 10:13 r...@luigicasa-laptop:/opt/luatex/mkiv# luatex --version This is LuaTeX, Version beta-0.44.0-2009110210 Thanks. I checked, and it is broken on amd64: MTXrun | main context file: /home/local/context/tex/texmf- context/tex/context/base/context.tex MTXrun | current version: 2009.11.24 10:13 This is LuaTeX, Version beta-0.45.0-2009112119 But works on i686: MTXrun | main context file: /home/dell/local/context/tex/texmf- context/tex/context/base/context.tex MTXrun | current version: 2009.11.24 10:13 This is LuaTeX, Version beta-0.44.0-2009110210 So it is a luatex bug in Version beta-0.45.0-2009112119 Alan ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
Mojca Miklavec wrote: On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext the problem was in the backend of one of the recent luatex binaries but has been solved already May I bet that Alan is using linux for which I need Hans' build for which it might be polite of me to send him new building scripts since the current ones fail (the old version of svn on debian sarge doesn't recognize some of the options)? Sorry guys, but it's too late today. ok, i will do it tomorrow Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
On Tuesday 24 November 2009 21:49:06 Hans Hagen wrote: Mojca Miklavec wrote: On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext the problem was in the backend of one of the recent luatex binaries but has been solved already May I bet that Alan is using linux for which I need Hans' build for which it might be polite of me to send him new building scripts since the current ones fail (the old version of svn on debian sarge doesn't recognize some of the options)? Sorry guys, but it's too late today. ok, i will do it tomorrow Hans I rebuilt luatex from svn on Debian x86_64 and MP is fixed. Alan ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
On Tue, Nov 24, 2009 at 10:51 PM, Alan BRASLAU alan.bras...@cea.fr wrote: I rebuilt luatex from svn on Debian x86_64 and MP is fixed. hm. Can you also try with beta source http://foundry.supelec.fr/gf/download/frsrelease/359/1390/luatex-beta-0.45.0.tar.bz2 ? -- luigi ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost broken mkiv latest minimals
luigi scarso wrote: On Tue, Nov 24, 2009 at 10:51 PM, Alan BRASLAU alan.bras...@cea.fr wrote: I rebuilt luatex from svn on Debian x86_64 and MP is fixed. hm. Can you also try with beta source http://foundry.supelec.fr/gf/download/frsrelease/359/1390/luatex-beta-0.45.0.tar.bz2 That one is broken, sorry. New beta on thursday (probably). Best wishes, Taco ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost and mkiv
Otared Kavian wrote: Hi all, The following minimal example used to work with mkiv (until last May, I would guess…) but now it doesn't work with the latest ConTeXt version 2009.09.21 17:39 Can any one tell me please what am I doing wrong? shows ok here - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost and mkiv
On Tue, 22 Sep 2009, Hans Hagen wrote: Otared Kavian wrote: Hi all, The following minimal example used to work with mkiv (until last May, I would guess…) but now it doesn't work with the latest ConTeXt version 2009.09.21 17:39 Can any one tell me please what am I doing wrong? shows ok here It also works for me with 2009.09.18. Do normal MP figures work (those inside \startMPcode...\stopMPcode) Aditya___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___