Changes

Jump to navigation Jump to search
1,315 bytes added ,  16:58, 30 June 2022
m
< [[Graphics]] | [[Using_Graphics]] | [[MetaPost]] | [[File_Formats]] | [[Inkscape]] >
SVG (Scalable Vector Graphics, a [[XML]] based format) is not supported natively can be converted to the PDF format at runtime by ConTeXt. If you need a supported vector graphics format, try [[MetaPost]] MkIV (and [[MetaFun]]LuaTeX), provided you have Inkscape installed as below.
Supported vector graphics formats of MkII/MKIV are [[MetaPost]] (and [[MetaFun - MetaPost in ConTeXt|MetaFun]]). There is a workaround, though, using InkScape Inkscape to convert SVG to PDF. Inkscape must be installed and callable (i.e. in your PATH):
<texcode>
\usemodule[res-08] \setups[rl:manipulate]
 
\setupexternalfigures[location=local,directory=.,conversion=pdf] % lowres,prefix=lowres/]
\stoptext
</texcode>
 == ConTeXt and Inkscape == Inkscape changed its command line interface in version 1.0.As a consequence, if you use an old version of ConTeXt and you have Inkscape 1.0 or newer installed, the conversion from SVG to PDF fails. Newer versions of ConTeXt (Code snippet by Hans Hagen on NTGsince May 7th, 2020) will detect Inkscape's version and manage to convert SVG to PDF anyway.But it's a temporary workaround, until version 1.0 of Inkscape gets widespread, because version detection has a performance cost. == LMTX and SVG == LMTX uses MetaPost (MetaFun) to process SVG directly; a third-context ML at 2008party tool, such as Inkscape, is no longer needed. Using MetaPost to process SVG opens many opportunities. It's a work in progress and not every SVG feature is supported. If you encounter issues, send a question to the mailing list. See the LMTX distribution documentation, svg-06lmtx.pdf and luametafun.pdf, for more details. === Text Rendering === Pixel-30)perfect rendering of SVG text elements may not align as desired in all cases. To work around any layout issues, convert the text to a path. This can be accomplished in Inkscape as follows: # Open the SVG file.# Select all text elements.# Click '''Path > Object to Path'''.# Save the SVG file. Rebuild the document again, the text elements will now be placed correctly.
==General information on SVG:==
===Libraries and Tools===
* [http://inkscape.org/ InkScape Inkscape vector graphics editor]
* [http://xmlgraphics.apache.org/batik/ Batik Java SVG Toolkit] (by Apache)
* [http://cairographics.org Cairo graphics library]
419

edits

Navigation menu