From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6412 Path: main.gmane.org!not-for-mail From: Tobias Burnus Newsgroups: gmane.comp.tex.context Subject: Re: SVG with ConTeXt Date: Thu, 27 Dec 2001 22:20:20 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <3C2B9094.9696C4FE@net-b.de> References: <5.1.0.14.1.20011224121635.03f62c48@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------49110F130CDA293DE548AADC" X-Trace: main.gmane.org 1035396943 10400 80.91.224.250 (23 Oct 2002 18:15:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:15:43 +0000 (UTC) Cc: NTG-ConTeXt Original-To: Hans Hagen Xref: main.gmane.org gmane.comp.tex.context:6412 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6412 Dies ist eine mehrteilige Nachricht im MIME-Format. --------------49110F130CDA293DE548AADC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hallo Hans, hi all, > It should not be a big problem to convert this into a startMPdrawing etc > commands. The main job will be to interpret the style (quite messy, why not > use key=val pairs) and transform (looks like the only xml thing about svg > is the occasional use of <>). ;-) I agree that SVG is rather basic and the work is in the style part :-( This makes the .dtd short and the parsing difficult. :-( > If we can agree on a reasonable subset (with a clear definition of what > means what) i can try to implement it. Ok. What do we need? (first brainstorming as attachment) This SVG spec seems even worse than the MathML standard, but I think it will be adopted rather soon by graphics programs (which in turn will produce huge, illegible files with redundent data which hopefully at least validates against the DTD and can be loaded in the next version of the very same program...) Tobias -- This above all: To thine own self be true / And it must follow as the night the day / Thou canst not then be false to any man. --------------49110F130CDA293DE548AADC Content-Type: text/plain; charset=us-ascii; name="SVG-ConTeXt.draft" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="SVG-ConTeXt.draft" Scalable Vector Graphics (SVG) -- Supported subset by ConTeXt DRAFT [TB, Thu Dec 27 19:56:52 CET 2001] ConTeXt can handle XML directly and using MetaPost it is also possible to render SVG directly. The SVG is rather messy and relys havily on non-wellstructured styles. NOTE: Since ConTeXt's SVG is only a subset of the SVG standard ConTeXt is _not_ a conforming SVG interpreter/"viewer" as defined in the SVG standard. 0. Supported data types (excerpt) 0.0 %langSpaceAttr; Default attribute http://www.w3.org/TR/SVG/struct.html#LangSpaceAttrs Need to support xml:lang="de" etc. Nice would be xml:space="{default | preserve}" 0.1 length unit http://www.w3.org/TR/SVG/coords.html#UnitIdentifiers - Allowed units em, ex, px, pt, pc, cm, mm, in and '%' - No unit equals 'px' (the "user unit") - The extend of the user units are given by the ViewBox http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute 1. Supported elements (tags) This list _excludes_ the style elements. 1.1 SVG http://www.w3.org/TR/SVG/struct.html#SVGElement The embraceing element. The may be nested. Attributes: - width, height (type: 0.1 length unit) - ViewBox (no unit numbers sep. by ' ' or ',', see 0.1 length unit) 1.3 Title and description http://www.w3.org/TR/SVG/struct.html#DescElement This may only contain text and tags from other namespaces. Per default it should ignored. Almost element can contain those two, but for the outermost using it optionally as caption might be useful. 1.4 Grouping http://www.w3.org/TR/SVG/struct.html#GElement Attributes: - transform matrix http://www.w3.org/TR/SVG/coords.html#TransformAttribute It would be nice if all attributes were supported ... 1.5 Path http://www.w3.org/TR/SVG/paths.html#PathData Attributes: - d path data rather complex - fill - stroke - stroke-width fill and stroke: http://www.w3.org/TR/SVG/painting.html#SpecifyingPaint should support: none|currentColor| stroke-width: |inherit 1.6 some basic shapes: http://www.w3.org/TR/SVG/shapes.html - rectangles (rectangle, including optional rounded corners) - circles - ellipses - lines - polylines - polygons Those should be rather simple 1.7 Text , --------------49110F130CDA293DE548AADC--