Rendering with Computer Modern fonts
⇧Rendering with Computer Modern fonts (detail)

quick download

  • Latest version (source) [.tar.gz]
  • Debian package (lib) [.html]
  • Debian package (dev) [.html]
  • Debian package (bin) [.html]
[more download]

documentation

  • Questions & Answers.
  • Paper presented at GUADEC 2004
    [.pdf (proceedings), .pdf (slides)]
  • Architecture of an adaptable formatting engine for MathML
    [.ps.gz, .pdf]
  • The (out-of-date) reference manual for the GTK+ widget and the underlying C++ rendering engine is available with the distribution.
  • For online discussions you can occasionally find me on the #gtkmathview IRC channel on irc.gimp.org.
  • A mailing list is available for general discussions about the widget and applications using it. Note that posting to this mailing list is allowed to members only and that posts by non-members will be automatically discarded without notification.
  • There is a bugzilla module dedicated to GtkMathView. Please, submit bug reports here so that I don't lose track of them.

fonts

The GTK+ backend will work with fonts supported by Pango and also with Type 1 fonts if t1lib is installed. The SVG backend relies on the SVG renderer to find the appropriate fonts.

more download

0.8.x (sources)

0.7.x (sources)

0.7.x (Win32 binaries)

  • gtkmathview-0.7.6 [.zip]
  • gtkmathview-0.7.5 [.zip]
  • gtkmathview-0.7.4 [.zip]

0.6.x (sources)

0.5.x (sources)

GTK 1.2, gmetadom, editing (sources)

GTK 1.2, miniDOM, no editing, PS (sources)

OCaml bindings (sources)

miniDOM (obsolete)

OCaml Bindings for miniDOM (obsolete)

old OCaml bindings (obsolete)

  • for lablgtk_20001129 0.2.2 [.tar.gz]
  • for lablgtk_20000829 0.2.0 [.tar.gz]
  • for lablgtk_20000829 0.1.0 [.tar.gz]

[Contact: Luca Padovani]

GtkMathView logo

[documentation] [requirements] [SVN] [projects] [examples & screenshots] [fonts] [links]

GtkMathView is now LGPL software.

GtkMathView is a C++ rendering engine for MathML documents. It provides an interactive view that can be used for browsing and editing MathML markup.

GtkMathView reads MathML documents by means of a frontend whose purpose is to traverse the MathML document (or part of it) and to appropriately instantiate GtkMathView's internal data structures that are suitable for rendering it. Currently the following frontends are supported:

  • libxml2 frontend, in which the MathML document is represented as a tree and is navigated with the libxml2 tree API.
  • libxml2 reader frontend, in which the MathML document is not entirely loaded in memory and is navigated with the libxml2 reader API. This frontend is mostly useful for batch rendering of MathML documents.
  • GMetaDOM frontend, in which the MathML document is represented as a tree and is navigated with the DOM API provided by GMetaDOM, which in turn is a DOM-compliant wrapper for libxml2.
  • custom frontend, in which the MathML document is represented in some application-specific format and is navigated with application-provided callback functions.

GtkMathView renders MathML documents through a backend whose purpose is to provide an abstraction of the platform-specific capabilities (available fonts, drawing drawing primitives, and so on). Currently the following backends are provided:

  • GTK+ backend, for rendering MathML documents using Pango and/or t1lib in GTK+ applications.
  • GTK+ widget backend, which wraps GtkMathView in a GTK+ widget to be directly embedded in GTK+ applications.
  • PostScript backend, which renders MathML into PostScript.
  • SVG backend, which renders MathML into SVG.
  • AbiWord backend, which allows one to embed MathML documents into AbiWord by means of the AbiMathView plugin.

GtkMathView compiles under Linux (all backends), MacOSX (PostScript, SVG, and AbiWord backends), Win32 (PostScript, SVG, and AbiWord backends).

requirements

For compiling the source from the tarballs:

  • GCC ≥ 3.4 (some versions of GCC 3.3 are known to have problems compiling some of the classes in GtkMathView)
  • GLib ≥ 2.2.1
  • GTK+ ≥ 2.2.1 (required up to version 0.6.5, optional starting from 0.7.0 for the GTK+ backend)
  • GMetaDOM ≥ 0.1.8 (required for versions up to and including 0.6.1, optional starting from 0.6.2 for the GMetaDOM frontend)
  • libxml ≥ 2.6.7 (required for versions up to 0.6.2, then only if the libxml2 and libxml2 reader frontend)
  • t1lib ≥ 5 (required for the GTK+ backend if you plan to use Type 1 fonts and anti-aliasing). RPM packages for t1lib can be found at Didier's page for GtkMathView.
  • popt ≥ 1.7 (if not present, only the libraries will be built)
  • miniDOM is no longer supported and won't work with gtkmathview ≥ 0.4.x. As of now, the latest GMetaDOM version that works with gtkmathview 0.3.x is 0.0.3c.

For compiling a freshly checked out source tree from the GNOME SVN repository, you'll also need:

  • automake ≥ 1.7.6
  • autoconf ≥ 2.57
  • libxslt ≥ 1.0.32 (in particular the xsltproc utility)

NOTE: You may succeed compiling GtkMathView with older versions of the above libraries/tools.

SVN

The source code is available on the GNOME SVN repository, the module name is gtkmathview.

command user
svn co http://svn.gnome.org/svn/gtkmathview/trunk gtkmathview anonymous
svn co svn+ssh://login@svn.gnome.org/svn/gtkmathview/trunk gtkmathview registered

You can also browse the content of the repository online here (ViewVC).

projects

The following are known projects and/or people using (or going to use) GtkMathView or the applications coming along the source package. If you're not listed here, please e-mail me!

  • Sylpheed-Claws provides a plugin for MathML that uses GtkMathView. Check out the features section.
  • gNumerator uses ideas and technology from GtkMathView.
  • The HELM Project, uses GtkMathView for rendering mathematical proofs.
  • MathShield, a GTK-Perl Math Interface
  • Citrus, a number/unit conversion utility
  • John Wiley & Sons, Inc. publisher, uses GtkMathView for rendering MathML to bitmap images in the Encyclopedia of Polymer Science and Technology as well as in several other encyclopedias and textbooks.
  • mathmlrender, an extension for PHP4 allowing a PHP script to read a MathML document and render it as an image in a standard format. Formats currently supported are PNG and JPEG.

examples & screenshots

  • rotated SVG output of MathML as rendered by Sodipodi [.png]
  • support for Computer Modern fonts, support for ligatures. There is no Sans Serif Bold Italic font, the screenshot shows the best-match algorithm of GtkMathView in action. [.png]
  • tentative SVG logo for MathML to SVG converter [.png]
  • AbiMathView plugin rendering a MathML fragment embedded in AbiWord documents) [.png]
  • AbiMathView plugin rendering a MathML fragment created with the LaTeX dialog in AbiWord on MacOSX (courtesy of Francis James Franklin) [.png]
  • Type 1 shaper in GTK+ windows with the t1lib library [.png]
  • Pango shaper in GTK+ windows [.png]
  • test1.xml, old screenshot with X fonts [.png]
  • test4.xml, old screenshot with X fonts [.png]
  • test5.xml, old screenshot with X fonts [.png]

Warning: you may notice some differences between the rendering of GtkMathView and the screenshots above. This is primarily due to the actual fonts installed on your system. Note also that some fonts are buggy, that is they have wrong/strange metrics for some symbols. In particular, the symbol font (75dpi) usually shipped with Unix/Linux has a buggy vertical bar for the integral sign, so that large integrals have the middle part misaligned.

MathML rendered to SVG
⇧MathML rendered to SVG

⇩AbiMathView plugin at work
AbiMathView plugin at work

news

Oct 15, 2007
Release of version 0.8.0. Nicola Rossi has implemented high-quality support for accents and other diacritical marks, following TeX typesetting engine. Starting from this version, GtkMathView is released under the terms of the GNU Lesser General Public License (version 3).
May 08, 2007
Release of version 0.7.8 (tag v0_7_8). Restored PostScript backend.
Aug 05, 2006
Release of version 0.7.7 (tag v0_7_7bis). Bug fix release.
Dec 06, 2005
Release of version 0.7.6 (tag v0_7_6). Some bugs have been fixed, added support for MSAM and MSBM fonts (from AMS).
Sep 23, 2005
I have prepared a simple CGI script that allows everyone to submit MathML code and have it rendered into a PNG by GtkMathView. Try it here!
Sep 14, 2005
Ryan Pavlik has released Win32 binaries of GtkMathView to be used by AbiWord (and possibly other Win32 applications). Check out his builds section. Kudos for Ryan.
Sep 12, 2005
Release of version 0.7.4 (tag v0_7_4). Header files fixed for correct creation of Win32 DLLs, small patches to the operator dictionaries.
Aug 14, 2005
Release of version 0.7.3 (tag v0_7_3). This is a maintenance release that improves the configure script and fixes the dependencies so that GtkMathView can be compiled under MacOSX and Win32.
Aug 6, 2005
GtkMathView compiles and runs under MacOSX! See the README.MacOSX file in CVS for more information.
Aug 2, 2005
Added a Questions & Answers page.
Jul 31, 2005
Release of version 0.7.2 (tag v0_7_2). This is a bug fix release with some code cleanup and patches so as to achieve better looking layout. Internally a lot of work has gone into rewriting BoxML formatting. A new kind of area has been added for giving areas both entry and exit baselines. This work will come handly for implementing linebreaking of MathML markup.
Jul 8, 2005
Release of version 0.7.1 (tag v0_7_1). This fixes some bugs related to Computer Modern fonts. The Gtk backend now supports True Type Computer Modern fonts and it is possible to remap the default fonts. This permits for example to choose the default fonts so that they are uniform across different views in the same application.
Jun 4, 2005
Complete restyling of this page, added screenshots.
May 31, 2005
Release of version 0.7.0 (tag v0_7_0). This is a major release with many new features, including support for SVG output, improved support for Computer Modern fonts, high-quality rendering, TrueType fonts, and much more. Check the mailing list archives for the full announcement, and make sure to have a look at the screenshots at the top of this page.
Apr 22, 2005
Release of version 0.6.5 (tag v0_6_5). Support for MathML tables has been partially restored. Labeled rows and alignment don't work, but the current implementation should cover most of the common table usages. Support for Computer Modern Type 1 fonts using t1lib is also being developed, although it is still unstable and hence disabled by default.

[older news]