Re: [NTG-context] Include SVG pictures with ConTeXt
On Thu, Jul 3, 2008 at 1:11 PM, Henning Hraban Ramm [EMAIL PROTECTED] wrote: Am 2008-06-29 um 21:46 schrieb Hans Hagen: \usemodule[res-08] \setups[rl:manipulate] \setupexternalfigures[location=local,directory=.,conversion=pdf] % lowres,prefix=lowres/] \starttext \externalfigure[svg/ausmap.svg][frame=on] \stoptext it assumes inkscape being present Just wikified that and added a lot of links to SVG resources: http://wiki.contextgarden.net/SVG Since Adobe Reader supports SVG graphics natively - perhaps we could just include them in the PDF? Here's a sample script in Perl: http://www.kevlindev.com/utilities/index.htm and Python: http://jan.kollhof.net/projects/svg/svgpdf/ I didn't look at them for I don't know the internals anyway, but I guess one could use this technique in Lua, too? It's just a wrapper to include the image in a pdf file a object stream (or whatever this is called) and creats links to the image but I was only able to display it on windows, on Mac I saw only the text svg into pdf. An other way would be Cairo graphics library (also used by Mozilla) to convert SVG: http://cairographics.org There's even a Lua binding for Cairo: http://www.dynaset.org/dogusanh/download.html#cairopad But I don't really understand if Cairo is suitable to convert SVG to other than pixel graphics for screen rendering. Apache's Batik library claims to support SVG to PDF conversion: http://xmlgraphics.apache.org/batik/ So perhaps someone more qualified than me could make SVG integration for ConTeXt... Wolfgang ___ 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] Include SVG pictures with ConTeXt
Henning Hraban Ramm wrote: Am 2008-06-29 um 21:46 schrieb Hans Hagen: \usemodule[res-08] \setups[rl:manipulate] \setupexternalfigures[location=local,directory=.,conversion=pdf] % lowres,prefix=lowres/] \starttext \externalfigure[svg/ausmap.svg][frame=on] \stoptext it assumes inkscape being present Just wikified that and added a lot of links to SVG resources: http://wiki.contextgarden.net/SVG Since Adobe Reader supports SVG graphics natively - perhaps we could just include them in the PDF? i remember testing that but there were (at that time) problems with scaling and boundingboxes Apache's Batik library claims to support SVG to PDF conversion: http://xmlgraphics.apache.org/batik/ inkscape is better - 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] Include SVG pictures with ConTeXt
On Sun, Jun 29, 2008 at 09:46:09PM +0200, Hans Hagen wrote: Taco Hoekwater wrote: TeXWorld wrote: TeXWorld a écrit : Hello, I wonder if it is possible to include SVG picture directly in ConTeXt without conversion. Thank you. Jack No answer. Does it mean that it's not possible ? Not that I know of, but I was hoping someone else did. \usemodule[res-08] \setups[rl:manipulate] \setupexternalfigures[location=local,directory=.,conversion=pdf] % lowres,prefix=lowres/] \starttext \externalfigure[svg/ausmap.svg][frame=on] \stoptext it assumes inkscape being present This doesn't work with luatex. It gives me some errors, see the log file. -- Khaled Hosny Arabic localizer and member of Arabeyes.org team (svg.tex ConTeXt ver: 2008.06.28 23:33 MKIV fmt: 2008.7.3 int: english/english language : language en is active system : cont-new loaded (/opt/context/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/opt/context/tex/texmf-context/tex/context/base/cont-new.mkiv lua: used config path - /opt/context/tex/texmf/web2c/texmf.cnf lua: used cache path - /opt/context/tex/texmf-cache/luatex-cache/context/9d2177de8a31df158f21be632b7742b7 ) (/opt/context/tex/texmf-context/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/opt/context/tex/texmf-context/tex/context/base/cont-old.tex loading: Context Old Macros ) system : cont-fil loaded (/opt/context/tex/texmf-context/tex/context/base/cont-fil.tex loading: Context File Synonyms ) system : cont-sys loaded (/opt/context/tex/texmf-context/tex/context/user/cont-sys.tex (/opt/context/tex/texmf-context/tex/context/base/type-tmf.tex) (/opt/context/tex/texmf-context/tex/context/base/type-siz.tex) (/opt/context/tex/texmf-context/tex/context/base/type-otf.tex)) bodyfont : 12pt rm is loaded specials : tex loaded system : svg.top loaded (svg.top specials : loading definition file tpd (/opt/context/tex/texmf-context/tex/context/base/spec-tpd.tex specials : loading definition file fdf (/opt/context/tex/texmf-context/tex/context/base/spec-fdf.tex (/opt/context/tex/texmf-context/tex/context/base/spec-fdf.mkiv)) specials : fdf loaded (/opt/context/tex/texmf-context/tex/context/base/spec-tpd.mkiv)) specials : fdf loaded ) system : module res-08 loaded (/opt/context/tex/texmf-context/tex/context/base/x-res-08.tex) (svg.tuo) (svg.tuo) systems: begin file svg at line 6 ! LuaTeX error ...text/tex/texmf-context/tex/context/base/core-inc.lua:375: attempt to call global 'exists' (a nil value) stack traceback: ...text/tex/texmf-context/tex/context/base/core-inc.lua:375: in function ...text/tex/texmf-context/tex/context/base/core-inc.lua:341 (tail call): ? ...text/tex/texmf-context/tex/context/base/core-inc.lua:543: in function 'identifier' ...text/tex/texmf-context/tex/context/base/core-inc.lua:559: in function 'identify' main ctx instance:1: in main chunk. \calculateexternalfigure ...a {figures.identify()} \ifconditional \testextern... argument ...\s!dummy ][sample.svg][][frame=on][] \calculateexternalscreenfi... \firstofoneargument #1-#1 \doexternalfigure ...value {\??ef \??ef #1}[#3]}}} \globallet \currentresourc... to be read again \par l.9 ? color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is local activated fonts : resetting map file list {/opt/context/tex/texmf-context/fonts/map/pdftex/context/original-empty.map} fonts : using map file: original-base {/opt/context/tex/texmf-context/fonts/map/pdftex/context/original-base.map} fonts : using map file: lm-math {/opt/context/tex/texmf/fonts/map/dvips/lm/lm-math.map} fonts : using map file: lm-rm {/opt/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map} fonts : using map file: original-ams-base {/opt/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-base.map} fonts : using map file: original-ams-euler {/opt/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-euler.map} fonts : using map file: original-public-lm {/opt/context/tex/texmf-context/fonts/map/pdftex/context/original-public-lm.map} [1.1] systems: end file svg at line 10 )/opt/context/tex/texmf/fonts/opentype/public/lm/lmmono8-regular.otf/opt/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf mkiv lua stats : used config path - /opt/context/tex/texmf/web2c/texmf.cnf mkiv lua stats : used cache path - /opt/context/tex/texmf-cache mkiv lua stats : modules/dumps/instances -
Re: [NTG-context] Include SVG pictures with ConTeXt
TeXWorld wrote: Hans Hagen a écrit : Taco Hoekwater wrote: TeXWorld wrote: TeXWorld a écrit : Hello, I wonder if it is possible to include SVG picture directly in ConTeXt without conversion. Thank you. Jack No answer. Does it mean that it's not possible ? Not that I know of, but I was hoping someone else did. \usemodule[res-08] \setups[rl:manipulate] \setupexternalfigures[location=local,directory=.,conversion=pdf] % lowres,prefix=lowres/] \starttext \externalfigure[svg/ausmap.svg][frame=on] \stoptext it assumes inkscape being present - 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 ___ Sorry but I've got problems to compile this code. Inkscape is present. Besides, with this solution, will Context format the labels of my SVG picture with the right font ? it just uses inkscape to convert the original to pdf (only when the file has changed) - 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] Include SVG pictures with ConTeXt
TeXWorld wrote: TeXWorld a écrit : Hello, I wonder if it is possible to include SVG picture directly in ConTeXt without conversion. Thank you. Jack No answer. Does it mean that it's not possible ? Not that I know of, but I was hoping someone else did. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Include SVG pictures with ConTeXt
Hans Hagen a écrit : Taco Hoekwater wrote: TeXWorld wrote: TeXWorld a écrit : Hello, I wonder if it is possible to include SVG picture directly in ConTeXt without conversion. Thank you. Jack No answer. Does it mean that it's not possible ? Not that I know of, but I was hoping someone else did. \usemodule[res-08] \setups[rl:manipulate] \setupexternalfigures[location=local,directory=.,conversion=pdf] % lowres,prefix=lowres/] \starttext \externalfigure[svg/ausmap.svg][frame=on] \stoptext it assumes inkscape being present - 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 ___ Sorry but I've got problems to compile this code. Inkscape is present. Besides, with this solution, will Context format the labels of my SVG picture with the right font ? Jack ___ 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] Include SVG pictures with ConTeXt
TeXWorld a écrit : Hello, I wonder if it is possible to include SVG picture directly in ConTeXt without conversion. Thank you. Jack ___ 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 ___ No answer. Does it mean that it's not possible ? ___ 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 ___