MicroPress Inc.
The Home Of Visual Tex


Features of MicroPress Products
Features of MicroPress Products
Mailing list
Products demo
Frequently Asked Questions
What's New
Order Now!
Ask Micropress

Announcing sVgTeX


Just like VTeX 6 and 7 introduced new output modes (respectively PDF and PS), VTeX 8 adds yet another: SVG. The Scalable Vector Graphics output is different from the more traditional modes: it is not intended for producing printed documents, but rather for Web pages and Presentations.

The SVG mode is similar to the PDF in supporting precise positioning and ability to embed fonts; it is greately superior to PDF in ability to add animation and interactivity to the output, making it the best mode for producing high quality presentations.

What is SVG?

SVG is the new graphics language developed by the World Wide Web Consortium (W3C). SVG is intended to create a unified graphics standard to replace the current proprietary implementations like MacroMedia Flash or Microsoft VGL.

W3C describes SVG as follows:

SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of graphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text. Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. Text can be in any XML namespace suitable to the application, which enhances searchability and accessibility of the SVG graphics. The feature set includes nested transformations, clipping paths, alph a masks, filter effects, template objects and extensibility.

SVG drawings can be dynamic and interactive. The Document Object Model (DOM) for SVG, which includes the full XML DOM, allows for straightforward and efficient vector graphics animation via scripting. A rich set of event handlers such as onmouseover and onclick can be assigned to any SVG graphical object. Because of its compatibility and leveraging of other Web standards, features like scripting can be done on SVG elements and other XML elements from different namespaces simultaneously within the same Web page.

SVG is similar to HTML in providing a Web language; just like HTML, SVG is XML-based. Just like HTML, SVG documents are ASCII markup, and as such can be manually edited. Full DOM support allows one to combine SVG code with JavaScript for interactive effects.

Unlike HTML, SVG also supports vector graphics, precise font specification and exact text positioning. This makes it possible for SVG to render mathematics, charts and graphs with PDF-like quality. Much better animation and scripting support in SVG makes the SVG format preferable to PDF in many cases.

While the intended use of SVG is Web graphics, an even more important initial application of SVG would be in presentations. SVG-based presentations provide the same rendering quality as PDF; but unlike the PDF presentations they can be spiced up with animation and scripting.

VTeX supports SVG transparently.

Majority of the existing documents can be recompiled in the SVG mode without any document changes; most of the existing packages are supported and will compile. Specifically,

  • SVG mode is supported for Plain TeX, LaTeX 2E, LaTeX 2.09 and AmSTeX.
  • All driver-independent and font-independent packages work without any changes (this category includes most of the existing LaTeX packages).
  • Graphics/Graphicx and related packages (like Psfig/Epsfig) are supported.
  • All file formats for included graphics that are supported in other modes are also supported in SVG mode (BMP, EPS, GIF, JPEG, PCX, PNG, TARGA, TIFF).
  • Pstricks/Psfrag are supported.
  • More generally, GeX (VTeX concurrent PS processor) is supported.
  • GeX extention packages (Visual Plot, Chart, Imaging plugins) are supported.
  • Hyperref is supported, including links and outline (see below for minor restrictions.).
  • Standard presentation packages (FoilTeX, PdfScreen, Seminar, Prosper) are supported (see below for SVG navigation packages). The existing presentations can be enhanced by adding animation and scripting elements.
  • All Type1-oriented font packages are supported; this includes common packages like PSNFSS as well as MicroPress premium presentation-oriented fonts such as HVMath and IFMath.

Adding animations in SVG mode

The animation and scripting facilities of the SVG mode are the main reason for using it.

The easiest way to add animation is to insert animated GIF images. This is supported via the standard graphics inclusion (graphicx); additionally, in SVG mode, VTeX provides an extended form of the !supportgifani \special which lets the user to control timing, or starting event of such animations, or reverse the sequence.

More interesting animations or scripting can be produced by emitting the code manually (\special{!direct...} to emit SVG code; \special{!js...} to emit JavaScript), possibly together with additional SVG-specific commands provided in the SVG mode of VTeX.

The latter include \special{!multireuse...} for producing animations by "pure" TeX means; \special{!nextpath ...} for assigning properties to SVG paths (including boxes) and others.

(See chapter 13 of the VTeX User guide and the example source for the actual syntax used.)


The examples shown here require an SVG supporting browser (MSIE recommended; but Mozilla can be used in some cases) and the Adobe SVG plugin, which you can download from the Adobe Web page. Please download and install the plugin before viewing the examples.

Preliminary example list

SVG-oriented packages

SVG development is new; it would take some time before many SVG-specific packages would appear. In our initial implementation of the SVG mode we provide two essential new packages: svginav and svgenav.

These packages provide two options for creation of navigating links for multipage SVG documents: the links are either internal (e.g. launched from a hotspot) or external (e.g. launched from an external HTML frame).

With packages like Prosper which do not provide their own navigation links, these packages are required to build a complete presentation. (These packages are not needed with PdfScreen which does its own navigation).

Current Limitations

While the SVG backend implementation is very complete, some features are not supported.

The font support in 8.0 is limited to Type1 and Type1-based OpenType; TrueType fonts and CJK/CID fonts are currently not supported; these features are expected to be supported in future versions.

Among the unsupported features which cannot be fully realized due to the limitations of the SVG viewer are the (obsolete) Type3 bitmapped fonts; Hyperref view specifications; and some rarely used PostScript features that may appear in embedded EPS and which either do not currently have SVG analogs.

Additionally, some less important Hyperref features (maximize browser, close browser) are not supported due to browser's limitations.

Last Updated: Aug 20, 2002.
(C) MicroPress Inc., 2002. All rights reserved.