[goffice] New math equations component plugin.



commit 9e5ec319ba558230244932a8325341b9fcbf08a6
Author: Jean Brefort <jean brefort normalesup org>
Date:   Wed Feb 19 15:32:33 2014 +0100

    New math equations component plugin.

 ChangeLog                              |   30 +
 Makefile.am                            |    2 +-
 NEWS                                   |    3 +
 configure.ac                           |   23 +-
 goffice/Makefile.am                    |    8 +-
 goffice/component/go-component.c       |   15 +-
 goffice/graph/gog-axis-color-map.c     |    2 +-
 goffice/graph/gog-color-scale.c        |    4 +-
 goffice/graph/gog-equation.c           |   38 +-
 goffice/gtk/go-font-sel.c              |    6 +
 goffice/gtk/go-font-sel.h              |    1 +
 goffice/gtk/go-math-editor.c           |  165 +++++
 goffice/gtk/go-math-editor.h           |   46 ++
 goffice/gtk/go-optionmenu.c            |    4 +-
 goffice/gtk/go-rotation-sel.c          |    4 +-
 goffice/gtk/goffice-gtk.h              |    1 +
 goffice/math/go-quad.c                 |    2 +-
 goffice/math/go-regression.c           |    2 +-
 goffice/utils/go-glib-extras.c         |    2 +-
 goffice/utils/go-mml-to-itex.c         |  106 +++
 goffice/utils/go-mml-to-itex.h         |   30 +
 goffice/utils/goffice-utils.h          |    1 +
 mmlitex/Makefile.am                    |   12 +
 mmlitex/README                         |  109 ++++
 mmlitex/cmarkup.xsl                    | 1113 ++++++++++++++++++++++++++++++++
 mmlitex/entities.xsl                   |  901 ++++++++++++++++++++++++++
 mmlitex/glayout.xsl                    |  228 +++++++
 mmlitex/mmlitex.xsl                    |   36 +
 mmlitex/scripts.xsl                    |  375 +++++++++++
 mmlitex/tables.xsl                     |  218 +++++++
 mmlitex/tokens.xsl                     |  342 ++++++++++
 plugins/Makefile.am                    |    5 +
 plugins/lasem/Makefile.am              |   19 +
 plugins/lasem/component.c              |  471 ++++++++++++++
 plugins/lasem/plugin.xml.in            |   23 +
 plugins/plot_barcol/gog-line.c         |    4 +-
 plugins/plot_surface/gog-xyz-surface.c |    4 +-
 po/POTFILES.in                         |    1 +
 38 files changed, 4308 insertions(+), 48 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f304e9b..4ff60c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2014-02-19  Jean Brefort  <jean brefort normalesup org>
+
+       * Makefile.am: add new mmlitex subdir.
+       * configure.ac: need libxslt.
+       * goffice/Makefile.am: add new files.
+       * goffice/component/go-component.c: fix data cleaning issues.
+       * goffice/graph/gog-equation.c: use the new GoMathEditor widget.
+       * goffice/gtk/go-font-sel.c: add go_font_sel_get_color().
+       * goffice/gtk/go-font-sel.h: ditto.
+       * goffice/gtk/go-math-editor.c: new math editor widget.
+       * goffice/gtk/go-math-editor.h: ditto.
+       * goffice/gtk/go-rotation-sel.c: use GtkGrid as parent.
+       * goffice/gtk/goffice-gtk.h: add the new GoMathEditor widget.
+       * goffice/utils/go-mml-to-itex.c: new MathML to ITEX convertor.
+       * goffice/utils/go-mml-to-itex.h: ditto.
+       * goffice/utils/goffice-utils.h: ditto.
+       * mmlitex/Makefile.am: ditto.
+       * mmlitex/README: ditto.
+       * mmlitex/cmarkup.xsl: ditto.
+       * mmlitex/entities.xsl: ditto.
+       * mmlitex/glayout.xsl: ditto.
+       * mmlitex/mmlitex.xsl: ditto.
+       * mmlitex/scripts.xsl: ditto.
+       * mmlitex/tables.xsl: ditto.
+       * mmlitex/tokens.xsl: ditto.
+       * plugins/Makefile.am: new math equations component.
+       * plugins/lasem/Makefile.am: ditto.
+       * plugins/lasem/component.c: ditto.
+       * plugins/lasem/plugin.xml.in: ditto.
+
 2014-02-16  Morten Welinder <terra gnome org>
 
        * configure.ac: Post-release bump.
diff --git a/Makefile.am b/Makefile.am
index f1c8c16..8e3018f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile.am for goffice
 
-SUBDIRS = goffice tests plugins po docs tools
+SUBDIRS = goffice tests plugins mmlitex po docs tools
 
 EXTRA_DIST = README NEWS BUGS MAINTAINERS AUTHORS \
        COPYING-gpl2 COPYING-gpl3 \
diff --git a/NEWS b/NEWS
index 49d35df..63a47c7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 goffice 0.10.12:
 
+Jean:
+       * New math equations component plugin.
+
 --------------------------------------------------------------------------
 goffice 0.10.11:
 
diff --git a/configure.ac b/configure.ac
index 54ad5b3..77b72fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,6 +124,7 @@ goffice_reqs="
        cairo                   >= 1.10.0
        librsvg-2.0             >= 2.22.0
        gdk-pixbuf-2.0  >= 2.22.0
+       libxslt
 "
 
 goffice_gtk_reqs="
@@ -145,6 +146,18 @@ dnl Should we use lasem ?
 dnl ***********************
 
 goffice_with_lasem=false
+lasem=
+for ver in 0.6 0.4 ; do
+  if test "x$lasem" = x; then
+    if pkg-config --exists lasem-$ver; then
+      lasem=lasem-$ver
+    fi
+  fi
+done
+if test "x$lasem" = x; then
+  # Not important.  Things will fail below.
+  lasem=lasem-0.4
+fi
 AC_ARG_WITH(lasem,
        AS_HELP_STRING([--with-lasem[=@<:@no/auto/yes@:>@]],
                          [Build with lasem use (default=auto)]),
@@ -153,17 +166,17 @@ AC_ARG_WITH(lasem,
 AS_CASE([$with_lasem],
        [no],[found_lasem="disabled by request"],
        [auto], [
-       PKG_CHECK_MODULES(Lasem, lasem-0.4 >= 0.4.1,
+       PKG_CHECK_MODULES(Lasem, $lasem >= 0.4.1,
        [found_lasem="yes";goffice_with_lasem=true], [found_lasem="no, missing or too old lasem library"])
        ],
        [yes],[found_lasem="yes";
-       PKG_CHECK_MODULES(Lasem, lasem-0.4 >= 0.4.1);
+       PKG_CHECK_MODULES(Lasem, $lasem >= 0.4.1);
        goffice_with_lasem=true
        ],[AC_MSG_ERROR([invalid argument passed to --with-lasem, should be one of @<:@no/auto/yes@:>@])])
 if test "x$goffice_with_lasem" = "xtrue" ; then
        AC_DEFINE(GOFFICE_WITH_LASEM, 1, [Define if Lasem is used])
-       goffice_reqs="$goffice_reqs lasem-0.4 >= 0.4.1 "
-       EXTRA_DEPS="$EXTRA_DEPS lasem-0.4"
+       goffice_reqs="$goffice_reqs $lasem >= 0.4.1 "
+       EXTRA_DEPS="$EXTRA_DEPS $lasem"
 fi
 
 AM_CONDITIONAL(GOFFICE_WITH_LASEM, $goffice_with_lasem)
@@ -811,6 +824,8 @@ plugins/plot_distrib/Makefile
 plugins/reg_linear/Makefile
 plugins/reg_logfit/Makefile
 plugins/smoothing/Makefile
+plugins/lasem/Makefile
+mmlitex/Makefile
 po/Makefile.in
 tests/Makefile
 tools/Makefile
diff --git a/goffice/Makefile.am b/goffice/Makefile.am
index 7d38e94..e4865eb 100644
--- a/goffice/Makefile.am
+++ b/goffice/Makefile.am
@@ -293,7 +293,8 @@ gtk_SOURCES =                                       \
        gtk/go-pattern-selector.c               \
                                                \
        gtk/go-graph-widget.c                   \
-       gtk/go-image-sel.c
+       gtk/go-image-sel.c                              \
+       gtk/go-math-editor.c
 
 gtkdir = $(goffice_include_dir)/gtk
 gtk_HEADERS =                                  \
@@ -329,7 +330,8 @@ gtk_HEADERS =                                       \
        gtk/go-pattern-selector.h               \
                                                \
        gtk/go-graph-widget.h                   \
-       gtk/go-image-sel.h
+       gtk/go-image-sel.h                              \
+       gtk/go-math-editor.h
 
 #####################################
 # maths directory files
@@ -384,6 +386,7 @@ utils_SOURCES =                                     \
        utils/go-line.c                         \
        utils/go-locale.c                       \
        utils/go-marker.c                       \
+       utils/go-mml-to-itex.c          \
        utils/go-path.c                         \
        utils/go-pattern.c                      \
        utils/go-geometry.c                     \
@@ -421,6 +424,7 @@ utils_HEADERS =                                     \
        utils/go-line.h                         \
        utils/go-locale.h                       \
        utils/go-marker.h                       \
+       utils/go-mml-to-itex.h          \
        utils/go-path.h                         \
        utils/go-pattern.h                      \
        utils/go-units.h                        \
diff --git a/goffice/component/go-component.c b/goffice/component/go-component.c
index 2b64711..e7975fd 100644
--- a/goffice/component/go-component.c
+++ b/goffice/component/go-component.c
@@ -190,7 +190,9 @@ go_component_finalize (GObject *obj)
        g_free (component->mime_type);
 
        if (component->destroy_notify != NULL) {
-               component->destroy_notify (component->destroy_data);
+               component->destroy_notify ((component->destroy_data)?
+                                                                       component->destroy_data:
+                                                                       (void *) component->data);
                component->destroy_notify = NULL;
        }
        if (component->cc) {
@@ -542,6 +544,16 @@ go_component_emit_changed (GOComponent *component)
        g_free (component->snapshot_data);
        component->snapshot_data = NULL;
        component->snapshot_length = 0;
+       /* invalidate the old data if any */
+       if (component->destroy_notify != NULL) {
+               component->destroy_notify ((component->destroy_data)?
+                                                                       component->destroy_data:
+                                                                       (void *) component->data);
+               component->destroy_notify = NULL;
+               component->destroy_data = NULL;
+       }
+       component->data = NULL;
+       component->length = 0;
 
        g_signal_emit (G_OBJECT (component),
                go_component_signals [CHANGED], 0);
@@ -857,6 +869,7 @@ go_component_new_from_uri (char const *uri)
        gsf_input_read (input, length, data);
        go_component_set_data (component, data, length);
        component->destroy_notify = g_free;
+       component->destroy_data = data;
        return component;
 }
 
diff --git a/goffice/graph/gog-axis-color-map.c b/goffice/graph/gog-axis-color-map.c
index 075b55b..3855723 100644
--- a/goffice/graph/gog-axis-color-map.c
+++ b/goffice/graph/gog-axis-color-map.c
@@ -538,7 +538,7 @@ gog_axis_color_map_get_snapshot (GogAxisColorMap const *map,
  * @width: the rectangle width.
  * @height: the rectangle height.
  *
- * When @discrete is larger than 1, it will be interpreted as the number of 
+ * When @discrete is larger than 1, it will be interpreted as the number of
  * major ticks used. The number of colors will then be @discrete − 1.
  * Draws a snapshot of the color map inside the rectangle.
  **/
diff --git a/goffice/graph/gog-color-scale.c b/goffice/graph/gog-color-scale.c
index deb700e..717376d 100644
--- a/goffice/graph/gog-color-scale.c
+++ b/goffice/graph/gog-color-scale.c
@@ -720,7 +720,7 @@ gog_color_scale_view_render (GogView *view, GogViewAllocation const *bbox)
                        /* Only major ticks are displayed, at least for now */
                        if (ticks[i].type == GOG_AXIS_TICK_MAJOR) {
                                pos = gog_axis_map_to_view (map, ticks[i].position);
-                               if (is_line_visible) { 
+                               if (is_line_visible) {
                                        path = go_path_new ();
                                        go_path_move_to (path, pos, start);
                                        go_path_line_to (path, pos, stop);
@@ -758,7 +758,7 @@ gog_color_scale_view_render (GogView *view, GogViewAllocation const *bbox)
                        /* Only major ticks are displayed, at least for now */
                        if (ticks[i].type == GOG_AXIS_TICK_MAJOR) {
                                pos = gog_axis_map_to_view (map, ticks[i].position);
-                               if (is_line_visible) { 
+                               if (is_line_visible) {
                                        path = go_path_new ();
                                        go_path_move_to (path, start, pos);
                                        go_path_line_to (path, stop, pos);
diff --git a/goffice/graph/gog-equation.c b/goffice/graph/gog-equation.c
index 1dbbec4..e468d7f 100644
--- a/goffice/graph/gog-equation.c
+++ b/goffice/graph/gog-equation.c
@@ -57,18 +57,15 @@ GType gog_equation_view_get_type (void);
 #ifdef GOFFICE_WITH_GTK
 
 static void
-cb_equation_buffer_changed (GtkTextBuffer *buffer, GogEquation *equation)
+cb_equation_buffer_changed (GoMathEditor *gme, GogEquation *equation)
 {
-       GtkTextIter start;
-       GtkTextIter end;
-
-       gtk_text_buffer_get_bounds (buffer, &start, &end);
-       g_object_set (G_OBJECT (equation), "itex", gtk_text_buffer_get_text (buffer, &start, &end, FALSE), 
NULL);
+       g_object_set (G_OBJECT (equation), "itex", go_math_editor_get_itex (gme), NULL);
 }
+
 static void
-cb_inline_mode_check_toggled (GtkToggleButton *button, GogEquation *equation)
+cb_inline_mode_check_toggled (GoMathEditor *gme, GogEquation *equation)
 {
-       g_object_set (G_OBJECT (equation), "inline-mode", gtk_toggle_button_get_active (button), NULL);
+       g_object_set (G_OBJECT (equation), "inline-mode", go_math_editor_get_inline (gme), NULL);
 }
 
 static void
@@ -78,28 +75,15 @@ gog_equation_populate_editor (GogObject *obj,
                              GOCmdContext *cc)
 {
        GogEquation *equation = GOG_EQUATION (obj);
-       GtkBuilder *gui;
        GtkWidget *widget;
-       GtkTextBuffer *buffer;
        static guint equation_pref_page = 0;
 
-       gui = go_gtk_builder_load_internal ("res:go:graph/gog-equation-prefs.ui", GETTEXT_PACKAGE, cc);
-       g_return_if_fail (gui != NULL);
-
-       widget = go_gtk_builder_get_widget (gui, "equation_text");
-       buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
-       gtk_text_buffer_set_text (GTK_TEXT_BUFFER (buffer), equation->itex != NULL ? equation->itex: "", -1);
-       g_signal_connect (G_OBJECT (buffer), "changed", G_CALLBACK (cb_equation_buffer_changed), obj);
-
-       widget = go_gtk_builder_get_widget (gui, "compact_mode_check");
-       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), equation->inline_mode);
-       g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (cb_inline_mode_check_toggled), obj);
-
-
-       widget = go_gtk_builder_get_widget (gui, "gog_equation_prefs");
-
+       widget = go_math_editor_new ();
+       go_math_editor_set_itex (GO_MATH_EDITOR (widget), equation->itex != NULL ? equation->itex: "");
+       go_math_editor_set_inline (GO_MATH_EDITOR (widget), equation->inline_mode);
+       g_signal_connect (G_OBJECT (widget), "itex-changed", G_CALLBACK (cb_equation_buffer_changed), obj);
+       g_signal_connect (G_OBJECT (widget), "inline-changed", G_CALLBACK (cb_inline_mode_check_toggled), 
obj);
        go_editor_add_page (editor, widget, _("Equation"));
-       g_object_unref (gui);
 
        (GOG_OBJECT_CLASS(equation_parent_klass)->populate_editor) (obj, editor, dalloc, cc);
 
@@ -148,6 +132,8 @@ _update_equation_style (GogEquation *equation, const GOStyle *style)
        }
 }
 
+char *itex2MML_parse(char const*str, unsigned longlength);
+
 static void
 gog_equation_update (GogObject *obj)
 {
diff --git a/goffice/gtk/go-font-sel.c b/goffice/gtk/go-font-sel.c
index 3ba451a..0339905 100644
--- a/goffice/gtk/go-font-sel.c
+++ b/goffice/gtk/go-font-sel.c
@@ -1554,6 +1554,12 @@ go_font_sel_set_color (GOFontSel *gfs, GOColor c, gboolean is_default)
                go_combo_color_set_color (cc, c);
 }
 
+GOColor
+go_font_sel_get_color (GOFontSel *gfs) {
+       g_return_val_if_fail (GO_IS_FONT_SEL (gfs), 0);
+       return go_combo_color_get_color (GO_COMBO_COLOR (gfs->color_picker), NULL);
+}
+
 void
 go_font_sel_set_font_desc (GOFontSel *fs, PangoFontDescription *desc)
 {
diff --git a/goffice/gtk/go-font-sel.h b/goffice/gtk/go-font-sel.h
index a0db48a..cc6a888 100644
--- a/goffice/gtk/go-font-sel.h
+++ b/goffice/gtk/go-font-sel.h
@@ -47,6 +47,7 @@ void go_font_sel_set_style         (GOFontSel *fs,
 void go_font_sel_set_strikethrough (GOFontSel *fs, gboolean strikethrough);
 void go_font_sel_set_color         (GOFontSel *gfs, GOColor c,
                                    gboolean is_default);
+GOColor go_font_sel_get_color     (GOFontSel *gfs);
 void go_font_sel_set_script        (GOFontSel *fs, GOFontScript script);
 
 void go_font_sel_set_font_desc     (GOFontSel *fs, PangoFontDescription *desc);
diff --git a/goffice/gtk/go-math-editor.c b/goffice/gtk/go-math-editor.c
new file mode 100644
index 0000000..70bfb6f
--- /dev/null
+++ b/goffice/gtk/go-math-editor.c
@@ -0,0 +1,165 @@
+/*
+ * A math editor widget.
+ *
+ * Copyright 2014 by Jean Brefort (jean brefort normalesup org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) version 3.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA.
+ */
+
+#include <goffice/goffice-config.h>
+#include <goffice/goffice.h>
+
+#include <glib/gi18n-lib.h>
+
+struct _GoMathEditor {
+       GtkBin          base;
+       GtkTextBuffer *itex;
+       GtkDrawingArea *preview;
+       GtkToggleButton *inline_btn;
+};
+
+typedef struct {
+       GtkBinClass base;
+
+       /* signals */
+       void (* itex_changed) (GoMathEditor *gme);
+       void (* inline_changed) (GoMathEditor *gme);
+} GoMathEditorClass;
+
+enum {
+       ITEX_CHANGED,
+       INLINE_CHANGED,
+       LAST_SIGNAL
+};
+
+static guint gme_signals[LAST_SIGNAL] = { 0 };
+
+static void
+go_math_editor_class_init (GtkWidgetClass *klass)
+{
+
+       gme_signals[ITEX_CHANGED] =
+               g_signal_new (
+                       "itex-changed",
+                       G_OBJECT_CLASS_TYPE (klass),
+                       G_SIGNAL_RUN_LAST,
+                       G_STRUCT_OFFSET (GoMathEditorClass, itex_changed),
+                       NULL, NULL,
+                       g_cclosure_marshal_VOID__POINTER,
+                       G_TYPE_NONE, 0);
+       gme_signals[INLINE_CHANGED] =
+               g_signal_new (
+                       "inline-changed",
+                       G_OBJECT_CLASS_TYPE (klass),
+                       G_SIGNAL_RUN_LAST,
+                       G_STRUCT_OFFSET (GoMathEditorClass, inline_changed),
+                       NULL, NULL,
+                       g_cclosure_marshal_VOID__POINTER,
+                       G_TYPE_NONE, 0);
+}
+
+static void
+inline_toggled_cb (G_GNUC_UNUSED GtkToggleButton *button, GoMathEditor *gme)
+{
+       g_signal_emit (gme, gme_signals[INLINE_CHANGED], 0);
+}
+
+static void
+itex_changed_cb (G_GNUC_UNUSED GtkTextBuffer *buffer, GoMathEditor *gme)
+{
+       g_signal_emit (gme, gme_signals[ITEX_CHANGED], 0);
+}
+
+static void
+go_math_editor_init (GoMathEditor *gme)
+{
+       GtkWidget *w, *scroll;
+       GtkGrid *grid = GTK_GRID (gtk_grid_new ());
+       gtk_container_add (GTK_CONTAINER (gme), (GtkWidget *) grid);
+       g_object_set ((GObject *) grid, "border-width", 12, "row-spacing", 6, "column-spacing", 12, NULL);
+       w = gtk_text_view_new ();
+       gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (w), GTK_WRAP_WORD_CHAR);
+       gme->itex = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w));
+       g_signal_connect (gme->itex, "changed", G_CALLBACK (itex_changed_cb), gme);
+       scroll = gtk_scrolled_window_new (NULL, NULL);
+       g_object_set (scroll,
+                     "shadow_type", GTK_SHADOW_ETCHED_IN,
+                     "hscrollbar_policy", GTK_POLICY_AUTOMATIC,
+                     "vscrollbar_policy", GTK_POLICY_AUTOMATIC,
+                     "expand", TRUE,
+                     NULL);
+       gtk_container_add (GTK_CONTAINER (scroll), w);
+       gtk_grid_attach (grid, scroll, 0, 0, 1, 1);
+       w = gtk_check_button_new_with_mnemonic (_("_Compact mode"));
+       gme->inline_btn = GTK_TOGGLE_BUTTON (w);
+       gtk_grid_attach (grid, w, 0, 2, 1, 1);
+       g_signal_connect (w, "toggled", G_CALLBACK (inline_toggled_cb), gme);
+       gtk_widget_show_all ((GtkWidget *) gme);
+}
+
+GSF_CLASS (GoMathEditor, go_math_editor,
+       go_math_editor_class_init, go_math_editor_init,
+       GTK_TYPE_BIN)
+
+GtkWidget *
+go_math_editor_new (void)
+{
+       return g_object_new (GO_TYPE_MATH_EDITOR, NULL);
+}
+
+gboolean
+go_math_editor_get_inline (GoMathEditor const *gme)
+{
+       g_return_val_if_fail (GO_IS_MATH_EDITOR (gme), FALSE);
+       return gtk_toggle_button_get_active (gme->inline_btn);
+}
+
+char *
+go_math_editor_get_itex (GoMathEditor const *gme)
+{
+       GtkTextIter start;
+       GtkTextIter end;
+
+       g_return_val_if_fail (GO_IS_MATH_EDITOR (gme), NULL);
+       gtk_text_buffer_get_bounds (gme->itex, &start, &end);
+       return gtk_text_buffer_get_text (gme->itex, &start, &end, TRUE);
+}
+
+char *
+go_math_editor_get_mathml (GoMathEditor const *gme)
+{
+       g_return_val_if_fail (GO_IS_MATH_EDITOR (gme), NULL);
+       return NULL; // FIXME
+}
+
+void go_math_editor_set_inline (GoMathEditor *gme, gboolean mode)
+{
+       g_return_if_fail (GO_IS_MATH_EDITOR (gme));
+       gtk_toggle_button_set_active (gme->inline_btn, mode);
+}
+
+void
+go_math_editor_set_itex (GoMathEditor *gme, char const *text)
+{
+       g_return_if_fail (GO_IS_MATH_EDITOR (gme));
+       gtk_text_buffer_set_text (gme->itex, (text != NULL)? text: "", -1);
+}
+
+void
+go_math_editor_set_mathml (GoMathEditor *gme, char const *text)
+{
+       g_return_if_fail (GO_IS_MATH_EDITOR (gme));
+}
diff --git a/goffice/gtk/go-math-editor.h b/goffice/gtk/go-math-editor.h
new file mode 100644
index 0000000..4981f82
--- /dev/null
+++ b/goffice/gtk/go-math-editor.h
@@ -0,0 +1,46 @@
+/*
+ * A math editor widget.
+ *
+ * Copyright 2014 by Jean Brefort (jean brefort normalesup org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) version 3.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA.
+ */
+#ifndef _GO_MATH_EDITOR_H_
+#define _GO_MATH_EDITOR_H_
+
+#include <goffice/goffice.h>
+
+G_BEGIN_DECLS
+
+#define GO_TYPE_MATH_EDITOR    (go_math_editor_get_type ())
+#define GO_MATH_EDITOR(obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), GO_TYPE_MATH_EDITOR, GoMathEditor))
+#define GO_IS_MATH_EDITOR(obj)  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GO_TYPE_MATH_EDITOR))
+
+typedef struct _GoMathEditor GoMathEditor;
+
+GType         go_math_editor_get_type (void);
+GtkWidget    *go_math_editor_new      (void);
+
+gboolean go_math_editor_get_inline (GoMathEditor const *gme);
+char *go_math_editor_get_itex (GoMathEditor const *gme);
+char *go_math_editor_get_mathml (GoMathEditor const *gme);
+void go_math_editor_set_inline (GoMathEditor *gme, gboolean mode);
+void go_math_editor_set_itex (GoMathEditor *gme, char const *text);
+void go_math_editor_set_mathml (GoMathEditor *gme, char const *text);
+
+G_END_DECLS
+
+#endif /* _GO_MATH_EDITOR_H_ */
diff --git a/goffice/gtk/go-optionmenu.c b/goffice/gtk/go-optionmenu.c
index 295eae4..c40c469 100644
--- a/goffice/gtk/go-optionmenu.c
+++ b/goffice/gtk/go-optionmenu.c
@@ -72,7 +72,7 @@ go_option_menu_new (void)
  * and fills in a menu with the given texts.  Each menu entry will
  * have a data property "value" sets to the given value.  The menu is
  * then placed inside a new #GOOptionMenu which is then returned.
- */ 
+ */
 GtkWidget *
 go_option_menu_build (const char *first_entry, ...)
 {
@@ -87,7 +87,7 @@ go_option_menu_build (const char *first_entry, ...)
                gtk_menu_shell_append (GTK_MENU_SHELL (m), w);
                g_object_set_data (G_OBJECT (w), "value", GINT_TO_POINTER (v));
                first_entry = va_arg (var_args, char *);
-       }               
+       }
        va_end (var_args);
        gtk_widget_show_all (m);
 
diff --git a/goffice/gtk/go-rotation-sel.c b/goffice/gtk/go-rotation-sel.c
index 933ec6a..5d82e44 100644
--- a/goffice/gtk/go-rotation-sel.c
+++ b/goffice/gtk/go-rotation-sel.c
@@ -24,7 +24,7 @@
 #include <string.h>
 
 struct _GORotationSel {
-       GtkBox           box;
+       GtkGrid          grid;
        GtkBuilder      *gui;
        int              angle;
 
@@ -236,7 +236,7 @@ grs_init (GORotationSel *grs)
        gtk_spin_button_set_value (grs->rotate_spinner, grs->angle);
 
        w = go_gtk_builder_get_widget (grs->gui, "toplevel");
-       gtk_box_pack_start (GTK_BOX (grs), w, TRUE, TRUE, 0);
+       gtk_grid_attach (GTK_GRID (grs), w, 0, 0, 1, 1);
        gtk_widget_show_all (GTK_WIDGET (grs));
 }
 
diff --git a/goffice/gtk/goffice-gtk.h b/goffice/gtk/goffice-gtk.h
index f7701f6..aa7de4b 100644
--- a/goffice/gtk/goffice-gtk.h
+++ b/goffice/gtk/goffice-gtk.h
@@ -50,6 +50,7 @@
 #include <goffice/gtk/go-optionmenu.h>
 #include <goffice/gtk/go-pattern-selector.h>
 #include <goffice/gtk/go-rotation-sel.h>
+#include <goffice/gtk/go-math-editor.h>
 
 
 G_BEGIN_DECLS
diff --git a/goffice/math/go-quad.c b/goffice/math/go-quad.c
index ea1803d..fa54e58 100644
--- a/goffice/math/go-quad.c
+++ b/goffice/math/go-quad.c
@@ -768,7 +768,7 @@ SUFFIX(go_quad_log) (QUAD *res, const QUAD *a)
                SUFFIX(go_quad_sub) (&dx, a, &yi);
                SUFFIX(go_quad_div) (&dx, &dx, &yi);
                SUFFIX(go_quad_add) (&xi, &xi, &dx);
-               
+
                *res = xi;
        }
 }
diff --git a/goffice/math/go-regression.c b/goffice/math/go-regression.c
index de4e667..92598c0 100644
--- a/goffice/math/go-regression.c
+++ b/goffice/math/go-regression.c
@@ -1809,7 +1809,7 @@ SUFFIX(go_linear_regression_leverage) (MATRIX A, DOUBLE *d, int m, int n)
  *     (A A+)^T = A A+
  *     (A+ A)^T = A+ A
  *
- * assuming threshold==0 and no rounding errors.  
+ * assuming threshold==0 and no rounding errors.
  */
 
 void
diff --git a/goffice/utils/go-glib-extras.c b/goffice/utils/go-glib-extras.c
index f880d26..30f64e5 100644
--- a/goffice/utils/go-glib-extras.c
+++ b/goffice/utils/go-glib-extras.c
@@ -75,7 +75,7 @@ go_hash_keys (GHashTable *hash)
  *
  * Inserts a pointer inside an existing array.
  **/
- 
+
 void
 go_ptr_array_insert (GPtrArray *array, gpointer value, int index)
 {
diff --git a/goffice/utils/go-mml-to-itex.c b/goffice/utils/go-mml-to-itex.c
new file mode 100644
index 0000000..38f8961
--- /dev/null
+++ b/goffice/utils/go-mml-to-itex.c
@@ -0,0 +1,106 @@
+/*
+ * mathml to ITEX converter.
+ *
+ * Copyright 2014 by Jean Brefort (jean brefort normalesup org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) version 3.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA.
+ */
+
+#include <goffice/goffice-config.h>
+#include <goffice/goffice.h>
+#include <goffice/goffice-priv.h>
+#include <libxslt/xslt.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+#include <string.h>
+
+gboolean
+go_mathml_to_itex (char const *mml, char **buf, int *length, gboolean *compact, GOCmdContext *gcc)
+{
+    static xsltStylesheet *sheet = NULL;
+    xmlDocPtr doc, res;
+       int ret, len, start, end;
+       char *itex;
+
+       if (mml == NULL || *mml == 0)
+        /* Nothing has failed, but we have nothing to do anyway */
+               return FALSE;
+    if (sheet == NULL) {
+               char *path = g_build_filename (go_sys_data_dir (), "mmlitex/mmlitex.xsl", NULL);
+                       
+               sheet = xsltParseStylesheetFile (path);
+               if (!sheet) {
+                       if (gcc)
+                       go_cmd_context_error_import (gcc, "MathML to ITeX: parsing stylesheet failed");
+                       return FALSE;
+               }
+    }
+       
+    doc = xmlParseDoc((xmlChar const *) mml);
+    if (!doc) {
+               if (gcc)
+               go_cmd_context_error_import (gcc, "MathML toI TeX: parsing MathML document failed");
+               return FALSE;
+    }  
+       
+    res = xsltApplyStylesheet(sheet, doc, NULL);
+    if (!res) {
+               if (gcc)
+               go_cmd_context_error_import (gcc, "MathML to ITeX: applying stylesheet failed");
+               xmlFreeDoc(doc);
+               return FALSE;
+    }
+
+    ret = xsltSaveResultToString ((xmlChar **) &itex, &len, res, sheet) != 0;
+       /* Remove the extra charaters are start or end */
+       if (compact)
+               *compact = FALSE; /* the default */
+       if (!strncmp (itex + 1, "\\[", 2) && !strcmp (itex + len - 2, "\\]")) {
+               start = 3;
+               end = len - 3;
+               while ((itex[start] == '\n' || itex[start] == '\t') && start < len)
+                       start++;
+               while ((itex[end] == '\n' || itex[end] == '\t') && start < len)
+                       end--;
+               end++;
+       } else if (itex[1] == '$' && itex[len - 1] == '$') {
+               if (compact)
+                       *compact = TRUE;
+               start = 2;
+               end = len - 2;
+               while ((itex[start] == '\n' || itex[start] == '\t') && start < len)
+                       start++;
+               while ((itex[end] == '\n' || itex[end] == '\t') && start < len)
+                       end--;
+               end++;
+       } else {
+               start = 0;
+               end = len;
+       }
+       end -= start;
+       if (buf) {
+               *buf = g_malloc (end + 1);
+               memcpy (*buf, itex + start, end);
+               (*buf)[end] = 0;
+       }
+       if (length)
+               *length = len;
+       xmlFree (itex);
+       xmlFreeDoc(res);
+       xmlFreeDoc(doc);
+       return ret >= 0;
+}
diff --git a/goffice/utils/go-mml-to-itex.h b/goffice/utils/go-mml-to-itex.h
new file mode 100644
index 0000000..41f93be
--- /dev/null
+++ b/goffice/utils/go-mml-to-itex.h
@@ -0,0 +1,30 @@
+/*
+ * mathml to ITEX converter.
+ *
+ * Copyright 2014 by Jean Brefort (jean brefort normalesup org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) version 3.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA.
+ */
+#ifndef _GO_MML_TO_ITEX_H_
+#define _GO_MML_TO_ITEX_H_
+
+G_BEGIN_DECLS
+
+gboolean go_mathml_to_itex (char const *mml, char **buf, int *length, gboolean *compact, GOCmdContext *gcc);
+
+G_END_DECLS
+
+#endif  /* _GO_MML_TO_ITEX_H_ */
diff --git a/goffice/utils/goffice-utils.h b/goffice/utils/goffice-utils.h
index 1467c22..6dd60f6 100644
--- a/goffice/utils/goffice-utils.h
+++ b/goffice/utils/goffice-utils.h
@@ -163,6 +163,7 @@ G_END_DECLS
 #include <goffice/utils/go-line.h>
 #include <goffice/utils/go-locale.h>
 #include <goffice/utils/go-marker.h>
+#include <goffice/utils/go-mml-to-itex.h>
 #include <goffice/utils/go-pango-extras.h>
 #include <goffice/utils/go-path.h>
 #include <goffice/utils/go-pattern.h>
diff --git a/mmlitex/Makefile.am b/mmlitex/Makefile.am
new file mode 100644
index 0000000..fb160d0
--- /dev/null
+++ b/mmlitex/Makefile.am
@@ -0,0 +1,12 @@
+xslt_DATA = \
+       cmarkup.xsl   \
+       glayout.xsl   \
+       scripts.xsl   \
+       tokens.xsl      \
+       entities.xsl  \
+       mmlitex.xsl     \
+       tables.xsl \
+       README 
+xsltdir = $(DESTDIR)$(goffice_datadir)/mmlitex
+
+EXTRA_DIST = $(xslt_DATA)
diff --git a/mmlitex/README b/mmlitex/README
new file mode 100644
index 0000000..6b6b948
--- /dev/null
+++ b/mmlitex/README
@@ -0,0 +1,109 @@
+Original README is below. The present files are identical to the original files
+except that entities.xsl has been adapted to produce ITEX code suitable for
+edition and back transformation to mathml isnt itex2mml. The main stylsesheet
+ has been renamed from mmltex.xsl to mmlitex.xsl to reflect the change.
+
+<!-- ====================================================================== -->
+<!-- $Id: README,v 1.8 2005/02/28 18:50:45 shade33 Exp $                    -->
+<!-- ====================================================================== -->
+README for the XSLT MathML Library 2.1.4
+
+
+XSLT MathML Library is a set of XSLT stylesheets to transform
+MathML 2.0 to LaTeX.
+
+Currently, we include the cvs HEAD version of this library, as obtained on July
+18 2008.
+
+For more information, see
+http://xsltml.sf.net
+
+Manifest
+--------
+
+README        this file
+mmltex.xsl
+tokens.xsl
+glayout.xsl
+scripts.xsl
+tables.xsl
+entities.xsl
+cmarkup.xsl
+
+Use
+---
+
+There are two ways of using the library:
+
+    * Use a local copy of the library.
+
+        1. Download the distribution (see below).
+
+        2. Unpack the distribution, using unzip.
+
+        3. In your stylesheet import or include either the main
+           stylesheet, mmltex.xsl, or the stylesheet module you
+           wish to use, such as tokens.xsl. This example assumes
+           that the distribution has been extracted into the same
+           directory as your own stylesheet:
+
+           <xsl:import href="mmltex.xsl"/>
+
+    * Import or include either the main stylesheet, or the
+      stylesheet module you wish to use, directly from the library
+      website; http://www.raleigh.ru/MathML/mmltex/. For example:
+
+      <xsl:import href="http://www.raleigh.ru/MathML/mmltex/mmltex.xsl"/>
+
+Obtaining The Library
+---------------------
+
+The XSLT MathML Library is available for download as:
+
+    * Zip file: http://www.raleigh.ru/MathML/mmltex/xsltml_2.1.2.zip
+
+Copyright
+---------
+
+Copyright (C) 2001-2003 Vasil Yaroshevich
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the ``Software''), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Except as contained in this notice, the names of individuals
+credited with contribution to this software shall not be used in
+advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization
+from the individuals in question.
+
+Any stylesheet derived from this Software that is publically
+distributed will be identified with a different name and the
+version strings in any derived Software will be changed so that
+no possibility of confusion between the derived package and this
+Software will exist.
+
+Warranty
+--------
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Contacting the Author
+---------------------
+
+These stylesheets are maintained by Vasil Yaroshevich, <yarosh raleigh ru>.
diff --git a/mmlitex/cmarkup.xsl b/mmlitex/cmarkup.xsl
new file mode 100644
index 0000000..72e3757
--- /dev/null
+++ b/mmlitex/cmarkup.xsl
@@ -0,0 +1,1113 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet
+               xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+               version='1.0'>
+                
+<!-- ====================================================================== -->
+<!-- $Id: cmarkup.xsl,v 1.10 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+
+<!-- 4.4.1.1 cn -->
+<xsl:template match="m:cn"><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="m:cn[ type='complex-cartesian']">
+       <xsl:apply-templates select="text()[1]"/>
+       <xsl:text>+</xsl:text>
+       <xsl:apply-templates select="text()[2]"/>
+       <xsl:text>i</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:cn[ type='rational']">
+       <xsl:apply-templates select="text()[1]"/>
+       <xsl:text>/</xsl:text>
+       <xsl:apply-templates select="text()[2]"/>
+</xsl:template>
+
+<xsl:template match="m:cn[ type='integer' and @base!=10]">
+               <xsl:apply-templates/>
+               <xsl:text>_{</xsl:text><xsl:value-of select="@base"/><xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:cn[ type='complex-polar']">
+       <xsl:apply-templates select="text()[1]"/>
+       <xsl:text>e^{i </xsl:text>
+       <xsl:apply-templates select="text()[2]"/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:cn[ type='e-notation']">
+    <xsl:apply-templates select="text()[1]"/>
+    <xsl:text>E</xsl:text>
+    <xsl:apply-templates select="text()[2]"/>
+</xsl:template>
+
+<!-- 4.4.1.1 ci 4.4.1.2 csymbol -->
+<xsl:template match="m:ci | m:csymbol">
+       <xsl:choose>
+               <xsl:when test="string-length(normalize-space(text()))>1">
+                       <xsl:text>\mathrm{</xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<!-- 4.4.2.1 apply 4.4.2.2 reln -->
+<xsl:template match="m:apply | m:reln">
+       <xsl:apply-templates select="*[1]">
+       <!-- <? -->
+               <xsl:with-param name="p" select="10"/>
+       </xsl:apply-templates>
+       <!-- ?> -->
+       <xsl:text>(</xsl:text>
+       <xsl:for-each select="*[position()>1]">
+               <xsl:apply-templates select="."/>
+               <xsl:if test="not(position()=last())"><xsl:text>, </xsl:text></xsl:if>
+       </xsl:for-each>
+       <xsl:text>)</xsl:text>
+</xsl:template>
+
+<!-- 4.4.2.3 fn -->
+<xsl:template match="m:fn[m:apply[1]]"> <!-- for m:fn using default rule -->
+       <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
+</xsl:template>
+
+<!-- 4.4.2.4 interval -->
+<xsl:template match="m:interval[*[2]]">
+       <xsl:choose>
+               <xsl:when test="@closure='open' or @closure='open-closed'">
+                       <xsl:text>\left(</xsl:text>             
+               </xsl:when>
+               <xsl:otherwise><xsl:text>\left[</xsl:text></xsl:otherwise> 
+       </xsl:choose>
+       <xsl:apply-templates select="*[1]"/>
+       <xsl:text> , </xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:choose>
+               <xsl:when test="@closure='open' or @closure='closed-open'">
+                       <xsl:text>\right)</xsl:text>            
+               </xsl:when>
+               <xsl:otherwise><xsl:text>\right]</xsl:text></xsl:otherwise> 
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template match="m:interval">
+       <xsl:text>\left\{</xsl:text><xsl:apply-templates/><xsl:text>\right\}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.2.5 inverse -->
+<xsl:template match="m:apply[*[1][self::m:inverse]]">
+       <xsl:apply-templates select="*[2]"/><xsl:text>^{(-1)}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.2.6 sep 4.4.2.7 condition -->
+<xsl:template match="m:sep | m:condition"><xsl:apply-templates/></xsl:template>
+
+<!-- 4.4.2.9 lambda -->
+<xsl:template match="m:lambda">
+       <xsl:apply-templates select="m:bvar/*"/>
+  <xsl:text>\mapsto </xsl:text>
+  <xsl:apply-templates select="*[last()]"/>
+<!--   Other variant 
+       <xsl:text>\mathrm{lambda}\: </xsl:text>
+       <xsl:apply-templates select="m:bvar/*"/>
+       <xsl:text>.\: </xsl:text>
+  <xsl:apply-templates select="*[last()]"/> -->
+</xsl:template>
+
+<!-- 4.4.2.10 compose -->
+<xsl:template match="m:apply[*[1][self::m:compose]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\circ </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.2.11 ident -->
+<xsl:template match="m:ident"><xsl:text>\mathrm{id}</xsl:text></xsl:template>
+
+<!-- 4.4.2.12 domain 4.4.2.13 codomain 4.4.2.14 image 4.4.3.21 arg 4.4.3.24 lcm
+               4.4.5.9 grad 4.4.5.10 curl 4.4.9.4 median 4.4.9.5 mode-->
+<xsl:template match="m:domain | m:codomain | m:image | m:arg | m:lcm | m:grad |
+                                                                m:curl | m:median | m:mode">
+       <xsl:text>\mathop{\mathrm{</xsl:text>
+       <xsl:value-of select="local-name()"/>
+       <xsl:text>}}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.2.15 domainofapplication -->
+<xsl:template match="m:domainofapplication"/>
+
+<!-- 4.4.2.16 piecewise -->
+<xsl:template match="m:piecewise">
+       <xsl:text>\begin{cases}</xsl:text>
+       <xsl:apply-templates select="m:piece"/>
+       <xsl:apply-templates select="m:otherwise"/>
+       <xsl:text>\end{cases}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:piece">
+               <xsl:apply-templates select="*[1]"/>
+               <xsl:text> &amp; \text{if $</xsl:text>
+               <xsl:apply-templates select="*[2]"/>
+               <xsl:text>$}</xsl:text>
+               <xsl:if test="not(position()=last()) or ../m:otherwise"><xsl:text>\\ </xsl:text></xsl:if>
+</xsl:template>
+
+<xsl:template match="m:otherwise">
+       <xsl:apply-templates select="*[1]"/>
+       <xsl:text> &amp; \text{otherwise}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.1 quotient -->
+<xsl:template match="m:apply[*[1][self::m:quotient]]">
+       <xsl:text>\left\lfloor\frac{</xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>}{</xsl:text>
+       <xsl:apply-templates select="*[3]"/>
+       <xsl:text>}\right\rfloor </xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.2 factorial -->
+<xsl:template match="m:apply[*[1][self::m:factorial]]">
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+       <xsl:text>!</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.3 divide -->
+<xsl:template match="m:apply[*[1][self::m:divide]]">
+       <xsl:param name="p" select="0"/>
+  <xsl:param name="this-p" select="3"/>
+  <xsl:if test="$this-p &lt; $p"><xsl:text>\left(</xsl:text></xsl:if>
+  <xsl:text>\frac{</xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+<!--           <xsl:with-param name="p" select="$this-p"/>
+       </xsl:apply-templates>-->
+       <xsl:text>}{</xsl:text>
+       <xsl:apply-templates select="*[3]"/>
+<!--           <xsl:with-param name="p" select="$this-p"/>
+       </xsl:apply-templates>-->
+       <xsl:text>}</xsl:text>
+       <xsl:if test="$this-p &lt; $p"><xsl:text>\right)</xsl:text></xsl:if>
+</xsl:template>
+
+<!-- 4.4.3.4 max min -->
+<xsl:template match="m:apply[*[1][self::m:max or self::m:min]]">
+       <xsl:text>\</xsl:text>
+       <xsl:value-of select="local-name(*[1])"/>
+       <xsl:text>\{</xsl:text>
+   <xsl:choose>
+               <xsl:when test="m:condition">
+               <xsl:apply-templates select="*[last()]"/>
+               <xsl:text>\mid </xsl:text>
+                       <xsl:apply-templates select="m:condition/node()"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:for-each select="*[position() &gt; 1]">
+                               <xsl:apply-templates select="."/>
+                               <xsl:if test="position() !=last()"><xsl:text> , </xsl:text></xsl:if>
+                       </xsl:for-each>
+               </xsl:otherwise>
+   </xsl:choose>
+       <xsl:text>\}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.5  minus-->
+<xsl:template match="m:apply[*[1][self::m:minus] and count(*)=2]">
+       <xsl:text>-</xsl:text>
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="2"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="m:apply[*[1][self::m:minus] and count(*)&gt;2]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="mo">-</xsl:with-param>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="this-p" select="2"/>
+       </xsl:call-template>
+</xsl:template> 
+
+
+<!-- 4.4.3.6  plus-->
+<xsl:template match="m:apply[*[1][self::m:plus]]">
+  <xsl:param name="p" select="0"/>
+  <xsl:if test="$p &gt; 2">
+               <xsl:text>(</xsl:text>
+       </xsl:if>
+  <xsl:for-each select="*[position()&gt;1]">
+   <xsl:if test="position() &gt; 1">
+    <xsl:choose>
+      <xsl:when test="self::m:apply[*[1][self::m:times] and
+      *[2][self::m:apply/*[1][self::m:minus] or self::m:cn[not(m:sep) and
+      (number(.) &lt; 0)]]]">-</xsl:when>
+      <xsl:otherwise>+</xsl:otherwise>
+    </xsl:choose>
+   </xsl:if>   
+    <xsl:choose>
+      <xsl:when test="self::m:apply[*[1][self::m:times] and
+      *[2][self::m:cn[not(m:sep) and (number(.) &lt;0)]]]">
+                       <xsl:value-of select="-(*[2])"/>
+                       <xsl:apply-templates select=".">
+                    <xsl:with-param name="first" select="2"/>
+                    <xsl:with-param name="p" select="2"/>
+                  </xsl:apply-templates>
+       </xsl:when>
+      <xsl:when test="self::m:apply[*[1][self::m:times] and
+      *[2][self::m:apply/*[1][self::m:minus]]]">
+                               <xsl:apply-templates select="./*[2]/*[2]"/>
+                               <xsl:apply-templates select=".">
+                                       <xsl:with-param name="first" select="2"/>
+                                       <xsl:with-param name="p" select="2"/>
+                               </xsl:apply-templates>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:apply-templates select=".">
+                                       <xsl:with-param name="p" select="2"/>
+                               </xsl:apply-templates>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:for-each>
+       <xsl:if test="$p &gt; 2">
+               <xsl:text>)</xsl:text>
+       </xsl:if>
+</xsl:template>
+
+<!-- 4.4.3.7 power -->
+<xsl:template match="m:apply[*[1][self::m:power]]">
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="5"/>
+       </xsl:apply-templates>
+       <xsl:text>^{</xsl:text>
+       <xsl:apply-templates select="*[3]">
+               <xsl:with-param name="p" select="5"/>
+       </xsl:apply-templates>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.8 remainder -->
+<xsl:template match="m:apply[*[1][self::m:rem]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="mo">\mod </xsl:with-param>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="this-p" select="3"/>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.3.9  times-->
+<xsl:template match="m:apply[*[1][self::m:times]]" name="times">
+  <xsl:param name="p" select="0"/>
+  <xsl:param name="first" select="1"/>
+  <xsl:if test="$p &gt; 3"><xsl:text>(</xsl:text></xsl:if>
+  <xsl:for-each select="*[position()&gt;1]">
+               <xsl:if test="position() &gt; 1">
+                       <xsl:choose>
+                               <xsl:when test="self::m:cn">\times <!-- times --></xsl:when>
+                               <xsl:otherwise><!--invisible times--></xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if> 
+               <xsl:if test="position()&gt;= $first">
+                       <xsl:apply-templates select=".">
+                               <xsl:with-param name="p" select="3"/>
+                       </xsl:apply-templates>
+               </xsl:if>
+       </xsl:for-each>
+  <xsl:if test="$p &gt; 3"><xsl:text>)</xsl:text></xsl:if>
+</xsl:template>
+
+<!-- 4.4.3.10 root -->
+<xsl:template match="m:apply[*[1][self::m:root]]">
+       <xsl:text>\sqrt</xsl:text>
+       <xsl:if test="m:degree!=2">
+               <xsl:text>[</xsl:text>
+               <xsl:apply-templates select="m:degree/*"/>
+               <xsl:text>]</xsl:text>
+       </xsl:if>
+       <xsl:text>{</xsl:text>
+       <xsl:apply-templates select="*[position()&gt;1 and not(self::m:degree)]"/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.11 gcd -->
+<xsl:template match="m:gcd"><xsl:text>\gcd </xsl:text></xsl:template>
+
+<!-- 4.4.3.12 and -->
+<xsl:template match="m:apply[*[1][self::m:and]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\land <!-- and --></xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.3.13 or -->
+<xsl:template match="m:apply[*[1][self::m:or]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="3"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\lor </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.3.14 xor -->
+<xsl:template match="m:apply[*[1][self::m:xor]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="3"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\mathop{\mathrm{xor}}</xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.3.15 not -->
+<xsl:template match="m:apply[*[1][self::m:not]]">
+       <xsl:text>\neg </xsl:text>
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<!-- 4.4.3.16 implies -->
+<xsl:template match="m:apply[*[1][self::m:implies]] | m:reln[*[1][self::m:implies]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="mo">\implies </xsl:with-param>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="this-p" select="3"/>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.3.17 forall 4.4.3.18 exists -->
+<xsl:template match="m:apply[*[1][self::m:forall or self::m:exists]]">
+       <xsl:text>\</xsl:text>
+       <xsl:value-of select="local-name(*[1])"/>
+       <xsl:text> </xsl:text>
+       <xsl:apply-templates select="m:bvar"/>
+       <xsl:if test="m:condition">
+               <xsl:text>, </xsl:text><xsl:apply-templates select="m:condition"/>
+       </xsl:if>
+       <xsl:if test="*[last()][local-name()!='condition'][local-name()!='bvar']">
+               <xsl:text>\colon </xsl:text>
+         <xsl:apply-templates select="*[last()]"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- 4.4.3.19 abs -->
+<xsl:template match="m:apply[*[1][self::m:abs]]">
+       <xsl:text>\left|</xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>\right|</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.20 conjugate -->
+<xsl:template match="m:apply[*[1][self::m:conjugate]]">
+       <xsl:text>\overline{</xsl:text><xsl:apply-templates select="*[2]"/><xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.22 real -->
+<xsl:template match="m:real"><xsl:text>\Re </xsl:text></xsl:template>
+
+<!-- 4.4.3.23 imaginary -->
+<xsl:template match="m:imaginary"><xsl:text>\Im </xsl:text></xsl:template>
+
+<!-- 4.4.3.25 floor -->
+<xsl:template match="m:apply[*[1][self::m:floor]]">
+       <xsl:text>\lfloor </xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>\rfloor </xsl:text>
+</xsl:template>
+
+<!-- 4.4.3.25 ceiling -->
+<xsl:template match="m:apply[*[1][self::m:ceiling]]">
+       <xsl:text>\lceil </xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>\rceil </xsl:text>
+</xsl:template>
+
+<!-- 4.4.4.1 eq -->
+<xsl:template match="m:apply[*[1][self::m:eq]] | m:reln[*[1][self::m:eq]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">=</xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.2 neq -->
+<xsl:template match="m:apply[*[1][self::m:neq]] | m:reln[*[1][self::m:neq]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\neq </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.3 gt -->
+<xsl:template match="m:apply[*[1][self::m:gt]] | m:reln[*[1][self::m:gt]]">
+<xsl:param name="p" select="0"/>
+<xsl:call-template name="infix">
+       <xsl:with-param name="this-p" select="1"/>
+       <xsl:with-param name="p" select="$p"/>
+       <xsl:with-param name="mo">&gt; </xsl:with-param>
+</xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.4 lt -->
+<xsl:template match="m:apply[*[1][self::m:lt]] | m:reln[*[1][self::m:lt]]">
+<xsl:param name="p" select="0"/>
+<xsl:call-template name="infix">
+       <xsl:with-param name="this-p" select="1"/>
+       <xsl:with-param name="p" select="$p"/>
+       <xsl:with-param name="mo">&lt; </xsl:with-param>
+</xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.5 geq -->
+<xsl:template match="m:apply[*[1][self::m:geq]] | m:reln[*[1][self::m:geq]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\ge </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.6 leq -->
+<xsl:template match="m:apply[*[1][self::m:leq]] | m:reln[*[1][self::m:leq]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\le </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.7 equivalent -->
+<xsl:template match="m:apply[*[1][self::m:equivalent]] | m:reln[*[1][self::m:equivalent]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\equiv </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.8 approx -->
+<xsl:template match="m:apply[*[1][self::m:approx]] | m:reln[*[1][self::m:approx]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="1"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\approx </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.4.9 factorof -->
+<xsl:template match="m:apply[*[1][self::m:factorof]] | m:reln[*[1][self::m:factorof]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="mo"> | </xsl:with-param>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="this-p" select="3"/>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.5.1 int -->
+<xsl:template match="m:apply[*[1][self::m:int]]">
+       <xsl:text>\int</xsl:text>
+       <xsl:if test="m:lowlimit/*|m:interval/*[1]|m:condition/*">
+               <xsl:text>_{</xsl:text>
+               <xsl:apply-templates select="m:lowlimit/*|m:interval/*[1]|m:condition/*"/>
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:if test="m:uplimit/*|m:interval/*[2]">
+               <xsl:text>^{</xsl:text>
+               <xsl:apply-templates select="m:uplimit/*|m:interval/*[2]"/>
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:text> </xsl:text>
+       <xsl:apply-templates select="*[last()]"/>
+       <xsl:text>\,d </xsl:text>
+       <xsl:apply-templates select="m:bvar"/>
+</xsl:template>
+
+<!-- 4.4.5.2 diff -->
+<xsl:template match="m:apply[*[1][self::m:diff] and m:ci and count(*)=2]" priority="2">
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>^\prime </xsl:text>
+</xsl:template>
+
+<xsl:template match="m:apply[*[1][self::m:diff]]" priority="1">
+       <xsl:text>\frac{</xsl:text>
+       <xsl:choose>
+               <xsl:when test="m:bvar/m:degree">
+                       <xsl:text>d^{</xsl:text>
+                       <xsl:apply-templates select="m:bvar/m:degree/node()"/>
+                       <xsl:text>}</xsl:text>
+                       <xsl:apply-templates select="*[last()]"/>
+                       <xsl:text>}{d</xsl:text>
+                       <xsl:apply-templates select="m:bvar/node()"/>
+                       <xsl:text>^{</xsl:text>
+                       <xsl:apply-templates select="m:bvar/m:degree/node()"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>d </xsl:text>
+                       <xsl:apply-templates select="*[last()]"/>
+                       <xsl:text>}{d </xsl:text>
+                       <xsl:apply-templates select="m:bvar"/>
+               </xsl:otherwise>
+       </xsl:choose>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.5.3 partialdiff -->
+<xsl:template match="m:apply[*[1][self::m:partialdiff] and m:list and m:ci and count(*)=3]" priority="2">
+       <xsl:text>D_{</xsl:text>
+       <xsl:for-each select="m:list[1]/*">
+               <xsl:apply-templates select="."/>
+               <xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
+       </xsl:for-each>
+       <xsl:text>}</xsl:text>
+       <xsl:apply-templates select="*[3]"/>
+</xsl:template>
+
+<xsl:template match="m:apply[*[1][self::m:partialdiff]]" priority="1">
+       <xsl:text>\frac{\partial</xsl:text>
+       <xsl:choose>
+               <xsl:when test="m:degree">
+                       <xsl:text>^{</xsl:text> 
+                       <xsl:apply-templates select="m:degree/node()"/>
+                       <xsl:text>}</xsl:text>          
+               </xsl:when>
+               <xsl:when test="m:bvar/m:degree[string(number(.))='NaN']">
+                       <xsl:text>^{</xsl:text>
+                       <xsl:for-each select="m:bvar/m:degree">
+                               <xsl:apply-templates select="node()"/>
+                               <xsl:if test="position()&lt;last()"><xsl:text>+</xsl:text></xsl:if>
+                       </xsl:for-each>
+                       <xsl:if test="count(m:bvar[not(m:degree)])&gt;0">
+                               <xsl:text>+</xsl:text>
+                               <xsl:value-of select="count(m:bvar[not(m:degree)])"/>
+                       </xsl:if>
+                       <xsl:text>}</xsl:text>                  
+               </xsl:when>
+               <xsl:when test="sum(m:bvar/m:degree)+count(m:bvar[not(m:degree)]) > 1">
+                               <xsl:text>^{</xsl:text>
+                               <xsl:value-of select="sum(m:bvar/m:degree)+count(m:bvar[not(m:degree)])"/>
+                               <xsl:text>}</xsl:text>          
+               </xsl:when>
+       </xsl:choose>
+       <xsl:text> </xsl:text>          
+       <xsl:apply-templates select="*[last()]"/>
+       <xsl:text>}{</xsl:text>
+       <xsl:for-each select="m:bvar">
+               <xsl:text>\partial </xsl:text>
+               <xsl:apply-templates select="node()"/>
+               <xsl:if test="m:degree">
+                       <xsl:text>^{</xsl:text>
+                       <xsl:apply-templates select="m:degree/node()"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:if>
+       </xsl:for-each>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.2.8 declare 4.4.5.4 lowlimit 4.4.5.5 uplimit 4.4.5.7 degree 4.4.9.5 momentabout -->
+<xsl:template match="m:declare | m:lowlimit | m:uplimit | m:degree | m:momentabout"/>
+
+<!-- 4.4.5.6  bvar-->
+<xsl:template match="m:bvar">
+       <xsl:apply-templates/>
+       <xsl:if test="following-sibling::m:bvar"><xsl:text>, </xsl:text></xsl:if>
+</xsl:template>
+
+<!-- 4.4.5.8 divergence-->
+<xsl:template match="m:divergence"><xsl:text>\mathop{\mathrm{div}}</xsl:text></xsl:template>
+
+<!-- 4.4.5.11 laplacian-->
+<xsl:template match="m:laplacian"><xsl:text>\nabla^2 </xsl:text></xsl:template>
+
+<!-- 4.4.6.1 set -->
+<xsl:template match="m:set">
+       <xsl:text>\{</xsl:text><xsl:call-template name="set"/><xsl:text>\}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.6.2 list -->
+<xsl:template match="m:list">
+       <xsl:text>\left[</xsl:text><xsl:call-template name="set"/><xsl:text>\right]</xsl:text>
+</xsl:template>
+
+<xsl:template name="set">
+   <xsl:choose>
+               <xsl:when test="m:condition">
+               <xsl:apply-templates select="m:bvar/*[not(self::bvar or self::condition)]"/>
+               <xsl:text>\colon </xsl:text>
+                       <xsl:apply-templates select="m:condition/node()"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:for-each select="*">
+                               <xsl:apply-templates select="."/>
+                               <xsl:if test="position()!=last()"><xsl:text>, </xsl:text></xsl:if>
+                       </xsl:for-each>
+               </xsl:otherwise>
+   </xsl:choose>
+</xsl:template>
+
+<!-- 4.4.6.3 union -->
+<xsl:template match="m:apply[*[1][self::m:union]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\cup </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.4 intersect -->
+<xsl:template match="m:apply[*[1][self::m:intersect]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="3"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\cap </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.5 in -->
+<xsl:template match="m:apply[*[1][self::m:in]] | m:reln[*[1][self::m:in]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="mo">\in </xsl:with-param>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="this-p" select="3"/>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.6 notin -->
+<xsl:template match="m:apply[*[1][self::m:notin]] | m:reln[*[1][self::m:notin]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="mo">\notin </xsl:with-param>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="this-p" select="3"/>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.7 subset -->
+<xsl:template match="m:apply[*[1][self::m:subset]] | m:reln[*[1][self::m:subset]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\subseteq </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.8 prsubset -->
+<xsl:template match="m:apply[*[1][self::m:prsubset]] | m:reln[*[1][self::m:prsubset]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\subset </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.9 notsubset -->
+<xsl:template match="m:apply[*[1][self::m:notsubset]] | m:reln[*[1][self::m:notsubset]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\nsubseteq </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.10 notprsubset -->
+<xsl:template match="m:apply[*[1][self::m:notprsubset]] | m:reln[*[1][self::m:notprsubset]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\not\subset </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.11 setdiff -->
+<xsl:template match="m:apply[*[1][self::m:setdiff]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\setminus </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.6.12 card -->
+<xsl:template match="m:apply[*[1][self::m:card]]">
+       <xsl:text>|</xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>|</xsl:text>
+</xsl:template>
+
+<!-- 4.4.6.13 cartesianproduct 4.4.10.6 vectorproduct -->
+<xsl:template match="m:apply[*[1][self::m:cartesianproduct or self::m:vectorproduct]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\times </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<xsl:template
+match="m:apply[*[1][self::m:cartesianproduct][count(following-sibling::m:reals)=count(following-sibling::*)]]"
+priority="2">
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="5"/>
+       </xsl:apply-templates>
+       <xsl:text>^{</xsl:text>
+       <xsl:value-of select="count(*)-1"/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.7.1 sum -->
+<xsl:template match="m:apply[*[1][self::m:sum]]">
+       <xsl:text>\sum</xsl:text><xsl:call-template name="series"/>
+</xsl:template>
+
+<!-- 4.4.7.2 product -->
+<xsl:template match="m:apply[*[1][self::m:product]]">
+       <xsl:text>\prod</xsl:text><xsl:call-template name="series"/>
+</xsl:template>
+       
+<xsl:template name="series">
+       <xsl:if test="m:lowlimit/*|m:interval/*[1]|m:condition/*">
+               <xsl:text>_{</xsl:text>
+               <xsl:if test="not(m:condition)">
+                       <xsl:apply-templates select="m:bvar"/>
+                       <xsl:text>=</xsl:text>
+               </xsl:if>
+               <xsl:apply-templates select="m:lowlimit/*|m:interval/*[1]|m:condition/*"/>
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:if test="m:uplimit/*|m:interval/*[2]">
+               <xsl:text>^{</xsl:text>
+               <xsl:apply-templates select="m:uplimit/*|m:interval/*[2]"/>
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:text> </xsl:text>
+       <xsl:apply-templates select="*[last()]"/>
+</xsl:template>
+
+<!-- 4.4.7.3 limit -->
+<xsl:template match="m:apply[*[1][self::m:limit]]">
+       <xsl:text>\lim_{</xsl:text>
+       <xsl:apply-templates select="m:lowlimit|m:condition/*"/>
+       <xsl:text>}</xsl:text>
+       <xsl:apply-templates select="*[last()]"/>
+</xsl:template>
+
+<xsl:template match="m:apply[m:limit]/m:lowlimit" priority="3">
+       <xsl:apply-templates select="../m:bvar/node()"/>
+       <xsl:text>\to </xsl:text>
+       <xsl:apply-templates/>
+</xsl:template>
+
+<!-- 4.4.7.4 tendsto -->
+<xsl:template match="m:apply[*[1][self::m:tendsto]] | m:reln[*[1][self::m:tendsto]]">
+       <xsl:param name="p"/>
+       <xsl:call-template name="binary">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">
+                       <xsl:choose>
+                               <xsl:when test="*[1][ type='above']">\searrow </xsl:when>
+                               <xsl:when test="*[1][ type='below']">\nearrow </xsl:when>
+                               <xsl:when test="*[1][ type='two-sided']">\rightarrow </xsl:when>
+                               <xsl:otherwise>\to </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.8.1 common tringonometric functions 4.4.8.3 natural logarithm -->
+<xsl:template match="m:apply[*[1][
+ self::m:sin or                self::m:cos or  self::m:tan or          self::m:sec or
+ self::m:csc or                self::m:cot or  self::m:sinh or         self::m:cosh or
+ self::m:tanh or               self::m:coth or self::m:arcsin or       self::m:arccos or
+ self::m:arctan or     self::m:ln]]">
+       <xsl:text>\</xsl:text>
+       <xsl:value-of select="local-name(*[1])"/>
+       <xsl:text> </xsl:text>
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="m:sin | m:cos | m:tan | m:sec | m:csc |
+                                                                m:cot | m:sinh | m:cosh | m:tanh | m:coth |
+                                                                m:arcsin | m:arccos | m:arctan | m:ln">
+       <xsl:text>\</xsl:text>
+       <xsl:value-of select="local-name(.)"/>
+       <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="m:apply[*[1][
+ self::m:sech or               self::m:csch or         self::m:arccosh or
+ self::m:arccot or     self::m:arccoth or      self::m:arccsc or
+ self::m:arccsch or self::m:arcsec or  self::m:arcsech or
+ self::m:arcsinh or self::m:arctanh]]">
+       <xsl:text>\mathrm{</xsl:text>
+       <xsl:value-of select="local-name(*[1])"/>
+       <xsl:text>\,}</xsl:text>
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="m:sech | m:csch | m:arccosh | m:arccot |
+                                                                m:arccoth | m:arccsc |m:arccsch |m:arcsec |
+                                                                m:arcsech | m:arcsinh | m:arctanh">
+       <xsl:text>\mathrm{</xsl:text>
+       <xsl:value-of select="local-name(.)"/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.8.2 exp -->
+<xsl:template match="m:apply[*[1][self::m:exp]]">
+       <xsl:text>e^{</xsl:text><xsl:apply-templates select="*[2]"/><xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.8.4 log -->
+<xsl:template match="m:apply[*[1][self::m:log]]">
+       <xsl:text>\lg </xsl:text>
+       <xsl:apply-templates select="*[last()]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="m:apply[*[1][self::m:log] and m:logbase != 10]">
+       <xsl:text>\log_{</xsl:text>
+       <xsl:apply-templates select="m:logbase/node()"/>
+       <xsl:text>}</xsl:text>
+       <xsl:apply-templates select="*[last()]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<!-- 4.4.9.1 mean -->
+<xsl:template match="m:apply[*[1][self::m:mean]]">
+       <xsl:text>\langle </xsl:text>
+       <xsl:for-each select="*[position()&gt;1]">
+               <xsl:apply-templates select="."/>
+               <xsl:if test="position() !=last()"><xsl:text>, </xsl:text></xsl:if>
+       </xsl:for-each>
+       <xsl:text>\rangle </xsl:text>
+</xsl:template>
+
+<!-- 4.4.9.2 sdef -->
+<xsl:template match="m:sdev"><xsl:text>\sigma </xsl:text></xsl:template>
+
+<!-- 4.4.9.3 variance -->
+<xsl:template match="m:apply[*[1][self::m:variance]]">
+       <xsl:text>\sigma(</xsl:text>
+       <xsl:apply-templates select="*[2]"/>
+       <xsl:text>)^2</xsl:text>
+</xsl:template>
+
+<!-- 4.4.9.5 moment -->
+<xsl:template match="m:apply[*[1][self::m:moment]]">
+       <xsl:text>\langle </xsl:text>
+       <xsl:apply-templates select="*[last()]"/>
+       <xsl:text>^{</xsl:text>
+       <xsl:apply-templates select="m:degree/node()"/>
+       <xsl:text>}\rangle</xsl:text>
+       <xsl:if test="m:momentabout">
+               <xsl:text>_{</xsl:text>
+               <xsl:apply-templates select="m:momentabout/node()"/>
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:text> </xsl:text>
+</xsl:template>
+
+<!-- 4.4.10.1 vector  -->
+<xsl:template match="m:vector">
+       <xsl:text>\left(\begin{array}{c}</xsl:text>
+       <xsl:for-each select="*">
+               <xsl:apply-templates select="."/>
+               <xsl:if test="position()!=last()"><xsl:text>\\ </xsl:text></xsl:if>
+       </xsl:for-each>
+       <xsl:text>\end{array}\right)</xsl:text>
+</xsl:template>
+
+<!-- 4.4.10.2 matrix  -->
+<xsl:template match="m:matrix">
+       <xsl:text>\begin{pmatrix}</xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>\end{pmatrix}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.10.3 matrixrow  -->
+<xsl:template match="m:matrixrow">
+       <xsl:for-each select="*">
+               <xsl:apply-templates select="."/>
+               <xsl:if test="position()!=last()"><xsl:text> &amp; </xsl:text></xsl:if>
+       </xsl:for-each>
+       <xsl:if test="position()!=last()"><xsl:text>\\ </xsl:text></xsl:if>
+</xsl:template>
+
+<!-- 4.4.10.4 determinant  -->
+<xsl:template match="m:apply[*[1][self::m:determinant]]">
+       <xsl:text>\det </xsl:text>
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="m:apply[*[1][self::m:determinant]][*[2][self::m:matrix]]" priority="2">
+       <xsl:text>\begin{vmatrix}</xsl:text>
+       <xsl:apply-templates select="m:matrix/*"/>
+       <xsl:text>\end{vmatrix}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.10.5 transpose -->
+<xsl:template match="m:apply[*[1][self::m:transpose]]">
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+       <xsl:text>^T</xsl:text>
+</xsl:template>
+
+<!-- 4.4.10.6 selector -->
+<xsl:template match="m:apply[*[1][self::m:selector]]">
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="7"/>
+       </xsl:apply-templates>
+       <xsl:text>_{</xsl:text>
+       <xsl:for-each select="*[position()&gt;2]">
+               <xsl:apply-templates select="."/>
+               <xsl:if test="position() !=last()"><xsl:text>, </xsl:text></xsl:if>
+       </xsl:for-each>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<!-- 4.4.10.8 scalarproduct -->
+<xsl:template match="m:apply[*[1][self::m:scalarproduct]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\cdot </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.10.9 outerproduct -->
+<xsl:template match="m:apply[*[1][self::m:outerproduct]]">
+       <xsl:param name="p" select="0"/>
+       <xsl:call-template name="infix">
+               <xsl:with-param name="this-p" select="2"/>
+               <xsl:with-param name="p" select="$p"/>
+               <xsl:with-param name="mo">\otimes </xsl:with-param>
+       </xsl:call-template>
+</xsl:template>
+
+<!-- 4.4.11.2 semantics -->
+<xsl:template match="m:semantics"><xsl:apply-templates select="*[1]"/></xsl:template>
+
+<xsl:template match="m:semantics[m:annotation/@encoding='TeX']">
+       <xsl:apply-templates select="m:annotation[ encoding='TeX']/node()"/>
+</xsl:template>
+
+<!-- 4.4.12.1 integers -->
+<xsl:template match="m:integers"><xsl:text>\mathbb{Z}</xsl:text></xsl:template>
+
+<!-- 4.4.12.2 reals -->
+<xsl:template match="m:reals"><xsl:text>\mathbb{R}</xsl:text></xsl:template>
+
+<!-- 4.4.12.3 rationals -->
+<xsl:template match="m:rationals"><xsl:text>\mathbb{Q}</xsl:text></xsl:template>
+
+<!-- 4.4.12.4 naturalnumbers -->
+<xsl:template match="m:naturalnumbers"><xsl:text>\mathbb{N}</xsl:text></xsl:template>
+
+<!-- 4.4.12.5 complexes -->
+<xsl:template match="m:complexes"><xsl:text>\mathbb{C}</xsl:text></xsl:template>
+
+<!-- 4.4.12.6 primes -->
+<xsl:template match="m:primes"><xsl:text>\mathbb{P}</xsl:text></xsl:template>
+       
+<!-- 4.4.12.7 exponentiale -->
+<xsl:template match="m:exponentiale"><xsl:text>e</xsl:text></xsl:template>
+
+<!-- 4.4.12.8 imaginaryi -->
+<xsl:template match="m:imaginaryi"><xsl:text>i</xsl:text></xsl:template>
+
+<!-- 4.4.12.9 notanumber -->
+<xsl:template match="m:notanumber"><xsl:text>NaN</xsl:text></xsl:template>
+
+<!-- 4.4.12.10 true -->
+<xsl:template match="m:true"><xsl:text>\mbox{true}</xsl:text></xsl:template>
+
+<!-- 4.4.12.11 false -->
+<xsl:template match="m:false"><xsl:text>\mbox{false}</xsl:text></xsl:template>
+
+<!-- 4.4.12.12 emptyset -->
+<xsl:template match="m:emptyset"><xsl:text>\emptyset </xsl:text></xsl:template>
+
+<!-- 4.4.12.13 pi -->
+<xsl:template match="m:pi"><xsl:text>\pi </xsl:text></xsl:template>
+
+<!-- 4.4.12.14 eulergamma -->
+<xsl:template match="m:eulergamma"><xsl:text>\gamma </xsl:text></xsl:template>
+
+<!-- 4.4.12.15 infinity -->
+<xsl:template match="m:infinity"><xsl:text>\infty </xsl:text></xsl:template>
+
+<!-- ****************************** -->
+<xsl:template name="infix" >
+  <xsl:param name="mo"/>
+  <xsl:param name="p" select="0"/>
+  <xsl:param name="this-p" select="0"/>
+  <xsl:if test="$this-p &lt; $p"><xsl:text>(</xsl:text></xsl:if>
+  <xsl:for-each select="*[position()&gt;1]">
+               <xsl:if test="position() &gt; 1">
+                       <xsl:copy-of select="$mo"/>
+               </xsl:if>   
+               <xsl:apply-templates select=".">
+                       <xsl:with-param name="p" select="$this-p"/>
+               </xsl:apply-templates>
+       </xsl:for-each>
+  <xsl:if test="$this-p &lt; $p"><xsl:text>)</xsl:text></xsl:if>
+</xsl:template>
+
+<xsl:template name="binary" >
+  <xsl:param name="mo"/>
+  <xsl:param name="p" select="0"/>
+  <xsl:param name="this-p" select="0"/>
+  <xsl:if test="$this-p &lt; $p"><xsl:text>(</xsl:text></xsl:if>
+       <xsl:apply-templates select="*[2]">
+               <xsl:with-param name="p" select="$this-p"/>
+       </xsl:apply-templates>
+       <xsl:value-of select="$mo"/>
+       <xsl:apply-templates select="*[3]">
+       <xsl:with-param name="p" select="$this-p"/>
+       </xsl:apply-templates>
+       <xsl:if test="$this-p &lt; $p"><xsl:text>)</xsl:text></xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/mmlitex/entities.xsl b/mmlitex/entities.xsl
new file mode 100644
index 0000000..e423d9a
--- /dev/null
+++ b/mmlitex/entities.xsl
@@ -0,0 +1,901 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+                version='1.0'>
+
+<!-- ====================================================================== -->
+<!-- $Id: entities.xsl,modified from v 1.14 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+<xsl:variable name="apos">'</xsl:variable>
+
+<xsl:template name="replaceEntities">
+       <xsl:param name="content"/>
+       <xsl:if test="string-length($content)>0">
+       <xsl:choose>
+               <xsl:when test="starts-with($content,' ')"><xsl:value-of select="'\; '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, ' 
')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02009;&#x0200A;&#x0200A;')"><xsl:value-of 
select="'\; '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02009;&#x0200A;&#x0200A;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x00023;')"><xsl:value-of select="'\# '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00023;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x00024;')"><xsl:value-of select="'\$ '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00024;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x00025;')"><xsl:value-of select="'\% '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00025;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x00026;')"><xsl:value-of select="'\&amp; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00026;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0002A;')"><xsl:value-of select="'\ast '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0002A;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0003A;')"><xsl:value-of select="'\colon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0003A;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0003C;')"><xsl:value-of select="'\less '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0003C;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0003E;')"><xsl:value-of select="'\greater'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0003E;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0005B;')"><xsl:value-of select="'\lbrack '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0005B;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0005C;')"><xsl:value-of select="'\backslash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0005C;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0005D;')"><xsl:value-of select="'\rbrack '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0005D;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0005E;')"><xsl:value-of 
select="'\textasciicircumflex '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0005E;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0005F;')"><xsl:value-of select="'\_ '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0005F;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x00060;')"><xsl:value-of select="'\textasciigrave '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00060;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0007B;')"><xsl:value-of select="'\lbrace '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0007B;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0007C;')"><xsl:value-of select="'\vert '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0007C;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0007D;')"><xsl:value-of select="'\rbrace '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0007D;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0007E;')"><xsl:value-of select="'\textasciitilde '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0007E;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0025B;')"><xsl:value-of select="'\varepsilon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0025B;')"/></xsl:call-template></xsl:when>    <!--/varepsilon -->
+               <xsl:when test="starts-with($content,'&#x002D9;')"><xsl:value-of select="'\dot{}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D9;')"/></xsl:call-template></xsl:when>          <!--/DiacriticalDot -->
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       C1 Controls and Latin-1 Supplement
+       Range: 0080-00FF
+       http://www.unicode.org/charts/PDF/U0080.pdf                         -->
+<!-- ====================================================================== -->
+               <xsl:when test="starts-with($content,'&#x000A1;')"><xsl:value-of select="'\textexclamdown '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000A1;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000A2;')"><xsl:value-of select="'\mbox{\textcent}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000A2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000A3;')"><xsl:value-of select="'\pounds '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000A3;')"/></xsl:call-template></xsl:when>        <!--pound sign -->
+               <xsl:when test="starts-with($content,'&#x000A4;')"><xsl:value-of 
select="'\mbox{\textcurrency}'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000A4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000A5;')"><xsl:value-of select="'\yen '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000A5;')"/></xsl:call-template></xsl:when>   <!--/yen =yen sign --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x000A7;')"><xsl:value-of select="'\S '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000A7;')"/></xsl:call-template></xsl:when>     <!--section sign -->
+               <xsl:when test="starts-with($content,'&#x000A8;')"><xsl:value-of select="'\textasciidieresis 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000A8;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000A9;')"><xsl:value-of select="'\copyright '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000A9;')"/></xsl:call-template></xsl:when>     <!--copyright sign -->
+               <xsl:when test="starts-with($content,'&#x000AA;')"><xsl:value-of select="'\textordfeminine '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000AA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000AB;')"><xsl:value-of 
select="'\mbox{\guillemotleft}'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000AB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000AC;')"><xsl:value-of select="'\neg '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000AC;')"/></xsl:call-template></xsl:when>   <!--/neg /lnot =not sign -->
+               <xsl:when test="starts-with($content,'&#x000AD;')"><xsl:value-of select="'\- '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000AD;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000AE;')"><xsl:value-of select="'&amp;#x000AE&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000AE;')"/></xsl:call-template></xsl:when>      <!--/circledR 
=registered sign --> <!-- Required amssymb --><!--\circledR-->
+               <xsl:when test="starts-with($content,'&#x000AF;')"><xsl:value-of select="'&amp;#x000AF&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000AF;')"/></xsl:call-template></xsl:when><!--\textasciimacron-->
+               <xsl:when test="starts-with($content,'&#x000B0;')"><xsl:value-of select="'&amp;#x000B0&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000B0;')"/></xsl:call-template></xsl:when><!--\degree-->
+               <xsl:when test="starts-with($content,'&#x000B1;')"><xsl:value-of select="'\pm '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000B1;')"/></xsl:call-template></xsl:when>    <!--/pm B: =plus-or-minus sign -->
+               <xsl:when test="starts-with($content,'&#x000B2;')"><xsl:value-of select="'{^2}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000B2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000B3;')"><xsl:value-of select="'{^3}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000B3;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000B4;')"><xsl:value-of select="'&amp;#x000B4&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000B4;')"/></xsl:call-template></xsl:when><!--\textasciiacute-->
+               <xsl:when test="starts-with($content,'&#x000B5;')"><xsl:value-of select="'\mathrm{\mu}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000B5;')"/></xsl:call-template></xsl:when>    <!--=micro sign -->
+               <xsl:when test="starts-with($content,'&#x000B6;')"><xsl:value-of select="'&amp;#x000B6&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000B6;')"/></xsl:call-template></xsl:when>      <!--pilcrow (paragraph 
sign) --><!--\P-->
+               <xsl:when test="starts-with($content,'&#x000B7;')"><xsl:value-of select="'&amp;#x000B7&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000B7;')"/></xsl:call-template></xsl:when><!--\cdotp-->
+               <xsl:when test="starts-with($content,'&#x000B8;')"><xsl:value-of select="'&amp;#x000B8&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000B8;')"/></xsl:call-template></xsl:when><!--\mbox{\c{}}-->
+               <xsl:when test="starts-with($content,'&#x000B9;')"><xsl:value-of select="'{^1}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000B9;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000BA;')"><xsl:value-of select="'&amp;#x000BA&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000BA;')"/></xsl:call-template></xsl:when><!--\textordmasculine-->
+               <xsl:when test="starts-with($content,'&#x000BB;')"><xsl:value-of select="'&amp;#x000BB&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000BB;')"/></xsl:call-template></xsl:when><!--\mbox{\guillemotright}-->
+               <xsl:when test="starts-with($content,'&#x000C0;')"><xsl:value-of select="'&amp;#x000C0&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C0;')"/></xsl:call-template></xsl:when><!--\grave{A}-->
+               <xsl:when test="starts-with($content,'&#x000C1;')"><xsl:value-of select="'&amp;#x000C1&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C1;')"/></xsl:call-template></xsl:when><!--&amp;#x000C1&#59;--><!--\acute{A}-->
+               <xsl:when test="starts-with($content,'&#x000C2;')"><xsl:value-of select="'\hat{A}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000C3;')"><xsl:value-of select="'\tilde{A}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C3;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000C4;')"><xsl:value-of select="'\ddot{A}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000C5;')"><xsl:value-of select="'&amp;#x000C5&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000C5;')"/></xsl:call-template></xsl:when>      <!--capital A, ring --> 
<!-- invalid in math mode --><!--\AA-->
+               <xsl:when test="starts-with($content,'&#x000C6;')"><xsl:value-of select="'&amp;#x000C6&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000C6;')"/></xsl:call-template></xsl:when>      <!--capital AE 
diphthong (ligature) --> <!-- invalid in math mode --><!--\AE-->
+               <xsl:when test="starts-with($content,'&#x000C7;')"><xsl:value-of select="'&amp;#x000C7&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C7;')"/></xsl:call-template></xsl:when><!--\mbox{\c{C}}-->
+               <xsl:when test="starts-with($content,'&#x000C8;')"><xsl:value-of select="'&amp;#x000C8&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C8;')"/></xsl:call-template></xsl:when><!--\grave{E}-->
+               <xsl:when test="starts-with($content,'&#x000C9;')"><xsl:value-of select="'&amp;#x000C9&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000C9;')"/></xsl:call-template></xsl:when><!--&amp;#x000C9&#59;--><!--\acute{E}-->
+               <xsl:when test="starts-with($content,'&#x000CA;')"><xsl:value-of select="'\hat{E}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000CA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000CB;')"><xsl:value-of select="'\ddot{E}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000CB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000CC;')"><xsl:value-of select="'&amp;#x000CC&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000CC;')"/></xsl:call-template></xsl:when><!--\grave{I}-->
+               <xsl:when test="starts-with($content,'&#x000CD;')"><xsl:value-of select="'&amp;#x000CD&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000CD;')"/></xsl:call-template></xsl:when><!--\acute{I}-->
+               <xsl:when test="starts-with($content,'&#x000CE;')"><xsl:value-of select="'\hat{I}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000CE;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000CF;')"><xsl:value-of select="'\ddot{I}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000CF;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000D0;')"><xsl:value-of select="'&amp;#x000D0&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000D0;')"/></xsl:call-template></xsl:when><!--\DH-->
+               <xsl:when test="starts-with($content,'&#x000D1;')"><xsl:value-of select="'\tilde{N}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D1;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000D2;')"><xsl:value-of select="'&amp;#x000D2&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D2;')"/></xsl:call-template></xsl:when><!--\grave{O}-->
+               <xsl:when test="starts-with($content,'&#x000D3;')"><xsl:value-of select="'&amp;#x000D3&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D3;')"/></xsl:call-template></xsl:when><!--\acute{O}-->
+               <xsl:when test="starts-with($content,'&#x000D4;')"><xsl:value-of select="'\hat{O}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000D5;')"><xsl:value-of select="'\tilde{O}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D5;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000D6;')"><xsl:value-of select="'\ddot{O}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D6;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000D7;')"><xsl:value-of select="'\times '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D7;')"/></xsl:call-template></xsl:when> <!--/times B: =multiply sign -->
+               <xsl:when test="starts-with($content,'&#x000D8;')"><xsl:value-of select="'&amp;#x000D8&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000D8;')"/></xsl:call-template></xsl:when><!--\O-->
+               <xsl:when test="starts-with($content,'&#x000D9;')"><xsl:value-of select="'&amp;#x000D9&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000D9;')"/></xsl:call-template></xsl:when><!--\grave{U}-->
+               <xsl:when test="starts-with($content,'&#x000DA;')"><xsl:value-of select="'&amp;#x000DA&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000DA;')"/></xsl:call-template></xsl:when><!--\acute{U}-->
+               <xsl:when test="starts-with($content,'&#x000DB;')"><xsl:value-of select="'\hat{U}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000DB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000DC;')"><xsl:value-of select="'\ddot{U}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000DC;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000DD;')"><xsl:value-of select="'&amp;#x000DD&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000DD;')"/></xsl:call-template></xsl:when><!--\acute{Y}-->
+               <xsl:when test="starts-with($content,'&#x000DE;')"><xsl:value-of select="'&amp;#x000DE&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000DE;')"/></xsl:call-template></xsl:when><!--\TH-->
+               <xsl:when test="starts-with($content,'&#x000DF;')"><xsl:value-of select="'&amp;#x000DF&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000DF;')"/></xsl:call-template></xsl:when><!--\ss-->
+               <xsl:when test="starts-with($content,'&#x000E0;')"><xsl:value-of select="'&amp;#x000E0&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E0;')"/></xsl:call-template></xsl:when><!--\grave{a}-->
+               <xsl:when test="starts-with($content,'&#x000E1;')"><xsl:value-of select="'&amp;#x000E1&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E1;')"/></xsl:call-template></xsl:when><!--\acute{a}-->
+               <xsl:when test="starts-with($content,'&#x000E2;')"><xsl:value-of select="'\hat{a}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000E3;')"><xsl:value-of select="'\tilde{a}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E3;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000E4;')"><xsl:value-of select="'\ddot{a}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000E5;')"><xsl:value-of select="'&amp;#x000E5&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000E5;')"/></xsl:call-template></xsl:when><!--\aa-->
+               <xsl:when test="starts-with($content,'&#x000E6;')"><xsl:value-of select="'&amp;#x000E6&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000E6;')"/></xsl:call-template></xsl:when>      <!--small ae diphthong 
(ligature) --> <!-- invalid in math mode --><!--\ae-->
+               <xsl:when test="starts-with($content,'&#x000E7;')"><xsl:value-of select="'&amp;#x000E7&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E7;')"/></xsl:call-template></xsl:when><!--\mbox{\c{c}}-->
+               <xsl:when test="starts-with($content,'&#x000E8;')"><xsl:value-of select="'&amp;#x000E8&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E8;')"/></xsl:call-template></xsl:when><!--\grave{e}-->
+               <xsl:when test="starts-with($content,'&#x000E9;')"><xsl:value-of select="'&amp;#x000E9&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000E9;')"/></xsl:call-template></xsl:when><!--\acute{e}-->
+               <xsl:when test="starts-with($content,'&#x000EA;')"><xsl:value-of select="'\hat{e}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000EA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000EB;')"><xsl:value-of select="'\ddot{e}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000EB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000EC;')"><xsl:value-of select="'&amp;#x000EC&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000EC;')"/></xsl:call-template></xsl:when><!--\grave{\imath}-->
+               <xsl:when test="starts-with($content,'&#x000ED;')"><xsl:value-of select="'&amp;#x000ED&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000ED;')"/></xsl:call-template></xsl:when><!--\acute{\imath}-->
+               <xsl:when test="starts-with($content,'&#x000EE;')"><xsl:value-of select="'\hat{\imath}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000EE;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000EF;')"><xsl:value-of select="'\ddot{\imath}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000EF;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F0;')"><xsl:value-of select="'\eth '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F0;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F1;')"><xsl:value-of select="'\tilde{n}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F1;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F2;')"><xsl:value-of select="'&amp;#x000F2&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F2;')"/></xsl:call-template></xsl:when><!--\grave{o}-->
+               <xsl:when test="starts-with($content,'&#x000F3;')"><xsl:value-of select="'&amp;#x000F3&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F3;')"/></xsl:call-template></xsl:when><!--&amp;#x000F3&#59;--><!--\acute{o}-->
+               <xsl:when test="starts-with($content,'&#x000F4;')"><xsl:value-of select="'\hat{o}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F5;')"><xsl:value-of select="'\tilde{o}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F5;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F6;')"><xsl:value-of select="'\ddot{o}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F6;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F7;')"><xsl:value-of select="'\div '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F7;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000F8;')"><xsl:value-of select="'&amp;#x000F8&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000F8;')"/></xsl:call-template></xsl:when><!--\o-->
+               <xsl:when test="starts-with($content,'&#x000F9;')"><xsl:value-of select="'&amp;#x000F9&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000F9;')"/></xsl:call-template></xsl:when><!--\grave{u}-->
+               <xsl:when test="starts-with($content,'&#x000FA;')"><xsl:value-of select="'&amp;#x000FA&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000FA;')"/></xsl:call-template></xsl:when><!--\acute{u}-->
+               <xsl:when test="starts-with($content,'&#x000FB;')"><xsl:value-of select="'\hat{u}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000FB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000FC;')"><xsl:value-of select="'\ddot{u}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000FC;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x000FD;')"><xsl:value-of select="'&amp;#x000FD&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000FD;')"/></xsl:call-template></xsl:when><!--\acute{y}-->
+               <xsl:when test="starts-with($content,'&#x000FE;')"><xsl:value-of select="'&amp;#x000FE&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x000FE;')"/></xsl:call-template></xsl:when><!--\th-->
+               <xsl:when test="starts-with($content,'&#x000FF;')"><xsl:value-of select="'\ddot{y}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x000FF;')"/></xsl:call-template></xsl:when>
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+                  -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'&#x00100;')"><xsl:value-of select="'\bar{A}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00100;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00101;')"><xsl:value-of select="'\bar{a}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00101;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00102;')"><xsl:value-of select="'&amp;#x00102&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00102;')"/></xsl:call-template></xsl:when><!--\breve{A}-->
+<xsl:when test="starts-with($content,'&#x00103;')"><xsl:value-of select="'&amp;#x00103&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00103;')"/></xsl:call-template></xsl:when><!--\u{a}-->
+<xsl:when test="starts-with($content,'&#x00106;')"><xsl:value-of select="'&amp;#x00106&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00106;')"/></xsl:call-template></xsl:when><!--\acute{C}-->
+<xsl:when test="starts-with($content,'&#x00107;')"><xsl:value-of select="'&amp;#x00107&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00107;')"/></xsl:call-template></xsl:when><!--\acute{c}-->
+<xsl:when test="starts-with($content,'&#x00108;')"><xsl:value-of select="'\hat{C}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00108;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00109;')"><xsl:value-of select="'\hat{c}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00109;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0010A;')"><xsl:value-of select="'\dot{C}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0010A;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0010B;')"><xsl:value-of select="'\dot{c}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0010B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0010C;')"><xsl:value-of select="'\check{C}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0010C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0010D;')"><xsl:value-of select="'\check{c}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0010D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0010E;')"><xsl:value-of select="'\check{D}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0010E;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0010F;')"><xsl:value-of select="'\check{d}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0010F;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00112;')"><xsl:value-of select="'\bar{E}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00112;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00113;')"><xsl:value-of select="'\bar{e}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00113;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00114;')"><xsl:value-of select="'&amp;#x00114&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00114;')"/></xsl:call-template></xsl:when><!--\breve{E}-->
+<xsl:when test="starts-with($content,'&#x00115;')"><xsl:value-of select="'&amp;#x00115&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00115;')"/></xsl:call-template></xsl:when><!--\breve{e}-->
+<xsl:when test="starts-with($content,'&#x00116;')"><xsl:value-of select="'\dot{E}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00116;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00117;')"><xsl:value-of select="'\dot{e}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00117;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00118;')"><xsl:value-of select="'&amp;#x00118&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00118;')"/></xsl:call-template></xsl:when><!--\k{E}-->
+<xsl:when test="starts-with($content,'&#x0011A;')"><xsl:value-of select="'\check{E}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0011A;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0011B;')"><xsl:value-of select="'\check{e}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0011B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0011C;')"><xsl:value-of select="'\hat{G}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0011C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0011D;')"><xsl:value-of select="'\hat{g}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0011D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0011E;')"><xsl:value-of select="'&amp;#x0011E&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0011E;')"/></xsl:call-template></xsl:when><!--\breve{G}-->
+<xsl:when test="starts-with($content,'&#x0011F;')"><xsl:value-of select="'&amp;#x0011F&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0011F;')"/></xsl:call-template></xsl:when><!--\breve{g}-->
+<xsl:when test="starts-with($content,'&#x00120;')"><xsl:value-of select="'\dot{G}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00120;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00121;')"><xsl:value-of select="'\dot{g}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00121;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00122;')"><xsl:value-of select="'&amp;#x00122&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00122;')"/></xsl:call-template></xsl:when><!--\mbox{\c{G}}-->
+<xsl:when test="starts-with($content,'&#x00123;')"><xsl:value-of select="'&amp;#x00123&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00123;')"/></xsl:call-template></xsl:when><!--\mbox{\c{g}}-->
+<xsl:when test="starts-with($content,'&#x00124;')"><xsl:value-of select="'\hat{H}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00124;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00125;')"><xsl:value-of select="'\hat{h}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00125;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00127;')"><xsl:value-of select="'&amp;#x00127&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00127;')"/></xsl:call-template></xsl:when><!--\Elzxh-->
+<xsl:when test="starts-with($content,'&#x00128;')"><xsl:value-of select="'\tilde{I}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00128;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00129;')"><xsl:value-of select="'\tilde{\imath}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00129;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0012A;')"><xsl:value-of select="'\bar{I}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0012A;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0012B;')"><xsl:value-of select="'\bar{\imath}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0012B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0012C;')"><xsl:value-of select="'&amp;#x0012C&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0012C;')"/></xsl:call-template></xsl:when><!--\breve{I}-->
+<xsl:when test="starts-with($content,'&#x0012D;')"><xsl:value-of select="'&amp;#x0012D&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0012D;')"/></xsl:call-template></xsl:when><!--\breve{\imath}-->
+<xsl:when test="starts-with($content,'&#x00130;')"><xsl:value-of select="'\dot{I}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00130;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00131;')"><xsl:value-of select="'\imath '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00131;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00134;')"><xsl:value-of select="'\hat{J}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00134;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00135;')"><xsl:value-of select="'\hat{\jmath}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00135;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00136;')"><xsl:value-of select="'&amp;#x00136&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00136;')"/></xsl:call-template></xsl:when><!--\mbox{\c{K}}-->
+<xsl:when test="starts-with($content,'&#x00137;')"><xsl:value-of select="'&amp;#x00137&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00137;')"/></xsl:call-template></xsl:when><!--\mbox{\c{k}}-->
+<xsl:when test="starts-with($content,'&#x00139;')"><xsl:value-of select="'&amp;#x00139&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00139;')"/></xsl:call-template></xsl:when><!--\acute{L}-->
+<xsl:when test="starts-with($content,'&#x0013A;')"><xsl:value-of select="'&amp;#x0013A&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0013A;')"/></xsl:call-template></xsl:when><!--\acute{l}-->
+<xsl:when test="starts-with($content,'&#x0013B;')"><xsl:value-of select="'&amp;#x0013B&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0013B;')"/></xsl:call-template></xsl:when><!--\mbox{\c{L}}-->
+<xsl:when test="starts-with($content,'&#x0013C;')"><xsl:value-of select="'&amp;#x0013C&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0013C;')"/></xsl:call-template></xsl:when><!--\mbox{\c{l}}-->
+<xsl:when test="starts-with($content,'&#x0013D;')"><xsl:value-of select="'\check{L}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0013D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0013E;')"><xsl:value-of select="'\check{l}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0013E;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x00141;')"><xsl:value-of select="'&amp;#x00141&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x00141;')"/></xsl:call-template></xsl:when><!--\L-->
+               <xsl:when test="starts-with($content,'&#x00142;')"><xsl:value-of select="'&amp;#x00142&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x00142;')"/></xsl:call-template></xsl:when><!--\l-->
+<xsl:when test="starts-with($content,'&#x00143;')"><xsl:value-of select="'&amp;#x00143&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00143;')"/></xsl:call-template></xsl:when><!--\acute{N}-->
+<xsl:when test="starts-with($content,'&#x00144;')"><xsl:value-of select="'&amp;#x00144&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00144;')"/></xsl:call-template></xsl:when><!--\acute{n}-->
+<xsl:when test="starts-with($content,'&#x00145;')"><xsl:value-of select="'&amp;#x00145&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00145;')"/></xsl:call-template></xsl:when><!--\mbox{\c{N}}-->
+<xsl:when test="starts-with($content,'&#x00146;')"><xsl:value-of select="'&amp;#x00146&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00146;')"/></xsl:call-template></xsl:when><!--\mbox{\c{n}}-->
+<xsl:when test="starts-with($content,'&#x00147;')"><xsl:value-of select="'\check{N}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00147;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00148;')"><xsl:value-of select="'\check{n}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00148;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0014C;')"><xsl:value-of select="'\bar{O}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0014C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0014D;')"><xsl:value-of select="'\bar{o}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0014D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0014E;')"><xsl:value-of select="'&amp;#x0014E&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0014E;')"/></xsl:call-template></xsl:when><!--\breve{O}-->
+<xsl:when test="starts-with($content,'&#x0014F;')"><xsl:value-of select="'&amp;#x0014F&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0014F;')"/></xsl:call-template></xsl:when><!--\breve{o}-->
+<xsl:when test="starts-with($content,'&#x00150;')"><xsl:value-of select="'&amp;#x00150&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00150;')"/></xsl:call-template></xsl:when><!--\mbox{\H{O}}-->
+<xsl:when test="starts-with($content,'&#x00151;')"><xsl:value-of select="'&amp;#x00151&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00151;')"/></xsl:call-template></xsl:when><!--\mbox{\H{o}}-->
+               <xsl:when test="starts-with($content,'&#x00152;')"><xsl:value-of select="'&amp;#x00152&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x00152;')"/></xsl:call-template></xsl:when><!--\OE-->
+               <xsl:when test="starts-with($content,'&#x00153;')"><xsl:value-of select="'&amp;#x00153&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x00153;')"/></xsl:call-template></xsl:when><!--\oe-->
+<xsl:when test="starts-with($content,'&#x00154;')"><xsl:value-of select="'&amp;#x00154&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00154;')"/></xsl:call-template></xsl:when><!--\acute{R}-->
+<xsl:when test="starts-with($content,'&#x00155;')"><xsl:value-of select="'&amp;#x00155&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00155;')"/></xsl:call-template></xsl:when><!--\acute{r}-->
+<xsl:when test="starts-with($content,'&#x00156;')"><xsl:value-of select="'&amp;#x00156&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00156;')"/></xsl:call-template></xsl:when><!--\mbox{\c{R}}-->
+<xsl:when test="starts-with($content,'&#x00157;')"><xsl:value-of select="'&amp;#x00157&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00157;')"/></xsl:call-template></xsl:when><!--\mbox{\c{r}}-->
+<xsl:when test="starts-with($content,'&#x00158;')"><xsl:value-of select="'\check{R}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00158;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00159;')"><xsl:value-of select="'\check{r}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00159;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0015A;')"><xsl:value-of select="'&amp;#x0015A&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0015A;')"/></xsl:call-template></xsl:when><!--\acute{S}-->
+<xsl:when test="starts-with($content,'&#x0015B;')"><xsl:value-of select="'&amp;#x0015B&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0015B;')"/></xsl:call-template></xsl:when><!--\acute{s}-->
+<xsl:when test="starts-with($content,'&#x0015C;')"><xsl:value-of select="'\hat{S}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0015C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0015D;')"><xsl:value-of select="'\hat{s}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0015D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0015E;')"><xsl:value-of select="'&amp;#x0015E&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0015E;')"/></xsl:call-template></xsl:when><!--\mbox{\c{S}}-->
+<xsl:when test="starts-with($content,'&#x0015F;')"><xsl:value-of select="'&amp;#x0015F&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0015F;')"/></xsl:call-template></xsl:when><!--\mbox{\c{s}}-->
+<xsl:when test="starts-with($content,'&#x00160;')"><xsl:value-of select="'\check{S}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00160;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00161;')"><xsl:value-of select="'\check{s}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00161;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00162;')"><xsl:value-of select="'&amp;#x00162&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00162;')"/></xsl:call-template></xsl:when><!--\mbox{\c{T}}-->
+<xsl:when test="starts-with($content,'&#x00163;')"><xsl:value-of select="'&amp;#x00163&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00163;')"/></xsl:call-template></xsl:when><!--\mbox{\c{t}}-->
+<xsl:when test="starts-with($content,'&#x00164;')"><xsl:value-of select="'\check{T}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00164;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00165;')"><xsl:value-of select="'\check{t}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00165;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00168;')"><xsl:value-of select="'\tilde{U}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00168;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00169;')"><xsl:value-of select="'\tilde{u}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00169;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0016A;')"><xsl:value-of select="'\bar{U}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0016A;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0016B;')"><xsl:value-of select="'\bar{u}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0016B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0016C;')"><xsl:value-of select="'&amp;#x0016C&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0016C;')"/></xsl:call-template></xsl:when><!--\breve{U}-->
+<xsl:when test="starts-with($content,'&#x0016D;')"><xsl:value-of select="'&amp;#x0016D&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0016D;')"/></xsl:call-template></xsl:when><!--\breve{u}-->
+<xsl:when test="starts-with($content,'&#x0016E;')"><xsl:value-of select="'&amp;#x0016E&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0016E;')"/></xsl:call-template></xsl:when><!--\mathring{U}-->
+<xsl:when test="starts-with($content,'&#x0016F;')"><xsl:value-of select="'&amp;#x0016F&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0016F;')"/></xsl:call-template></xsl:when><!--\mathring{u}-->
+<xsl:when test="starts-with($content,'&#x00170;')"><xsl:value-of select="'&amp;#x00170&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00170;')"/></xsl:call-template></xsl:when><!--\mbox{\H{U}}-->
+<xsl:when test="starts-with($content,'&#x00171;')"><xsl:value-of select="'&amp;#x00171&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00171;')"/></xsl:call-template></xsl:when><!--\mbox{\H{u}}-->
+<xsl:when test="starts-with($content,'&#x00172;')"><xsl:value-of select="'&amp;#x00172&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00172;')"/></xsl:call-template></xsl:when><!--\k{U}-->
+<xsl:when test="starts-with($content,'&#x00174;')"><xsl:value-of select="'\hat{W}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00174;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00175;')"><xsl:value-of select="'\hat{w}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00175;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00176;')"><xsl:value-of select="'\hat{Y}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00176;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00177;')"><xsl:value-of select="'\hat{y}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00177;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00178;')"><xsl:value-of select="'\ddot{Y}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00178;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00179;')"><xsl:value-of select="'&amp;#x00179&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00179;')"/></xsl:call-template></xsl:when><!--\acute{Z}-->
+<xsl:when test="starts-with($content,'&#x0017A;')"><xsl:value-of select="'&amp;#x0017A&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0017A;')"/></xsl:call-template></xsl:when><!--\acute{z}-->
+<xsl:when test="starts-with($content,'&#x0017B;')"><xsl:value-of select="'\dot{Z}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0017B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0017C;')"><xsl:value-of select="'\dot{z}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0017C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0017D;')"><xsl:value-of select="'\check{Z}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0017D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0017E;')"><xsl:value-of select="'\check{z}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0017E;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00192;')"><xsl:value-of select="'f'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00192;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x001AA;')"><xsl:value-of select="'\eth '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x001AA;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x001F5;')"><xsl:value-of select="'&amp;#x001F5&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x001F5;')"/></xsl:call-template></xsl:when><!--\acute{g}-->
+<xsl:when test="starts-with($content,'&#x00250;')"><xsl:value-of select="'&amp;#x00250&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00250;')"/></xsl:call-template></xsl:when><!--\Elztrna-->
+<xsl:when test="starts-with($content,'&#x00252;')"><xsl:value-of select="'&amp;#x00252&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00252;')"/></xsl:call-template></xsl:when><!--\Elztrnsa-->
+<xsl:when test="starts-with($content,'&#x00254;')"><xsl:value-of select="'&amp;#x00254&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00254;')"/></xsl:call-template></xsl:when><!--\Elzopeno-->
+<xsl:when test="starts-with($content,'&#x00256;')"><xsl:value-of select="'&amp;#x00256&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00256;')"/></xsl:call-template></xsl:when><!--\Elzrtld-->
+<xsl:when test="starts-with($content,'&#x00259;')"><xsl:value-of select="'&amp;#x00259&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00259;')"/></xsl:call-template></xsl:when><!--\Elzschwa-->
+<xsl:when test="starts-with($content,'&#x0025B;')"><xsl:value-of select="'\varepsilon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0025B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00263;')"><xsl:value-of select="'&amp;#x00263&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00263;')"/></xsl:call-template></xsl:when><!--\Elzpgamma-->
+<xsl:when test="starts-with($content,'&#x00264;')"><xsl:value-of select="'&amp;#x00264&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00264;')"/></xsl:call-template></xsl:when><!--\Elzpbgam-->
+<xsl:when test="starts-with($content,'&#x00265;')"><xsl:value-of select="'&amp;#x00265&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00265;')"/></xsl:call-template></xsl:when><!--\Elztrnh-->
+<xsl:when test="starts-with($content,'&#x0026C;')"><xsl:value-of select="'&amp;#x0026C&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0026C;')"/></xsl:call-template></xsl:when><!--\Elzbtdl-->
+<xsl:when test="starts-with($content,'&#x0026D;')"><xsl:value-of select="'&amp;#x0026D&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0026D;')"/></xsl:call-template></xsl:when><!--\Elzrtll-->
+<xsl:when test="starts-with($content,'&#x0026F;')"><xsl:value-of select="'&amp;#x0026F&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0026F;')"/></xsl:call-template></xsl:when><!--\Elztrnm-->
+<xsl:when test="starts-with($content,'&#x00270;')"><xsl:value-of select="'&amp;#x00270&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00270;')"/></xsl:call-template></xsl:when><!--\Elztrnmlr-->
+<xsl:when test="starts-with($content,'&#x00271;')"><xsl:value-of select="'&amp;#x00271&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00271;')"/></xsl:call-template></xsl:when><!--\Elzltlmr-->
+<xsl:when test="starts-with($content,'&#x00273;')"><xsl:value-of select="'&amp;#x00273&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00273;')"/></xsl:call-template></xsl:when><!--\Elzrtln-->
+<xsl:when test="starts-with($content,'&#x00277;')"><xsl:value-of select="'&amp;#x00277&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00277;')"/></xsl:call-template></xsl:when><!--\Elzclomeg-->
+<xsl:when test="starts-with($content,'&#x00279;')"><xsl:value-of select="'&amp;#x00279&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00279;')"/></xsl:call-template></xsl:when><!--\Elztrnr-->
+<xsl:when test="starts-with($content,'&#x0027A;')"><xsl:value-of select="'&amp;#x0027A&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0027A;')"/></xsl:call-template></xsl:when><!--\Elztrnrl-->
+<xsl:when test="starts-with($content,'&#x0027B;')"><xsl:value-of select="'&amp;#x0027B&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0027B;')"/></xsl:call-template></xsl:when><!--\Elzrttrnr-->
+<xsl:when test="starts-with($content,'&#x0027C;')"><xsl:value-of select="'&amp;#x0027C&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0027C;')"/></xsl:call-template></xsl:when><!--\Elzrl-->
+<xsl:when test="starts-with($content,'&#x0027D;')"><xsl:value-of select="'&amp;#x0027D&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0027D;')"/></xsl:call-template></xsl:when><!--\Elzrtlr-->
+<xsl:when test="starts-with($content,'&#x0027E;')"><xsl:value-of select="'&amp;#x0027E&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0027E;')"/></xsl:call-template></xsl:when><!--\Elzfhr-->
+<xsl:when test="starts-with($content,'&#x00282;')"><xsl:value-of select="'&amp;#x00282&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00282;')"/></xsl:call-template></xsl:when><!--\Elzrtls-->
+<xsl:when test="starts-with($content,'&#x00283;')"><xsl:value-of select="'&amp;#x00283&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00283;')"/></xsl:call-template></xsl:when><!--\Elzesh-->
+<xsl:when test="starts-with($content,'&#x00287;')"><xsl:value-of select="'&amp;#x00287&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00287;')"/></xsl:call-template></xsl:when><!--\Elztrnt-->
+<xsl:when test="starts-with($content,'&#x00288;')"><xsl:value-of select="'&amp;#x00288&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00288;')"/></xsl:call-template></xsl:when><!--\Elzrtlt-->
+<xsl:when test="starts-with($content,'&#x0028A;')"><xsl:value-of select="'&amp;#x0028A&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0028A;')"/></xsl:call-template></xsl:when><!--\Elzpupsil-->
+<xsl:when test="starts-with($content,'&#x0028B;')"><xsl:value-of select="'&amp;#x0028B&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0028B;')"/></xsl:call-template></xsl:when><!--\Elzpscrv-->
+<xsl:when test="starts-with($content,'&#x0028C;')"><xsl:value-of select="'&amp;#x0028C&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0028C;')"/></xsl:call-template></xsl:when><!--\Elzinvv-->
+<xsl:when test="starts-with($content,'&#x0028D;')"><xsl:value-of select="'&amp;#x0028D&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0028D;')"/></xsl:call-template></xsl:when><!--\Elzinvw-->
+<xsl:when test="starts-with($content,'&#x0028E;')"><xsl:value-of select="'&amp;#x0028E&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0028E;')"/></xsl:call-template></xsl:when><!--\Elztrny-->
+<xsl:when test="starts-with($content,'&#x00290;')"><xsl:value-of select="'&amp;#x00290&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00290;')"/></xsl:call-template></xsl:when><!--\Elzrtlz-->
+<xsl:when test="starts-with($content,'&#x00292;')"><xsl:value-of select="'&amp;#x00292&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00292;')"/></xsl:call-template></xsl:when><!--\Elzyogh-->
+<xsl:when test="starts-with($content,'&#x00294;')"><xsl:value-of select="'&amp;#x00294&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00294;')"/></xsl:call-template></xsl:when><!--\Elzglst-->
+<xsl:when test="starts-with($content,'&#x00295;')"><xsl:value-of select="'&amp;#x00295&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00295;')"/></xsl:call-template></xsl:when><!--\Elzreglst-->
+<xsl:when test="starts-with($content,'&#x00296;')"><xsl:value-of select="'&amp;#x00296&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00296;')"/></xsl:call-template></xsl:when><!--\Elzinglst-->
+<xsl:when test="starts-with($content,'&#x002A4;')"><xsl:value-of select="'&amp;#x002A4&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002A4;')"/></xsl:call-template></xsl:when><!--\Elzdyogh-->
+<xsl:when test="starts-with($content,'&#x002A7;')"><xsl:value-of select="'&amp;#x002A7&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002A7;')"/></xsl:call-template></xsl:when><!--\Elztesh-->
+               <xsl:when test="starts-with($content,'&#x002BC;')"><xsl:value-of select="'&amp;#x002BC&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x002BC;')"/></xsl:call-template></xsl:when><!--\rasp-->
+<xsl:when test="starts-with($content,'&#x002C8;')"><xsl:value-of select="'&amp;#x002C8&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002C8;')"/></xsl:call-template></xsl:when><!--\Elzverts-->
+<xsl:when test="starts-with($content,'&#x002CC;')"><xsl:value-of select="'&amp;#x002CC&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002CC;')"/></xsl:call-template></xsl:when><!--\Elzverti-->
+<xsl:when test="starts-with($content,'&#x002D0;')"><xsl:value-of select="'&amp;#x002D0&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D0;')"/></xsl:call-template></xsl:when><!--\Elzlmrk-->
+<xsl:when test="starts-with($content,'&#x002D1;')"><xsl:value-of select="'&amp;#x002D1&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D1;')"/></xsl:call-template></xsl:when><!--\Elzhlmrk-->
+<xsl:when test="starts-with($content,'&#x002D2;')"><xsl:value-of select="'&amp;#x002D2&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D2;')"/></xsl:call-template></xsl:when><!--\Elzsbrhr-->
+<xsl:when test="starts-with($content,'&#x002D3;')"><xsl:value-of select="'&amp;#x002D3&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D3;')"/></xsl:call-template></xsl:when><!--\Elzsblhr-->
+<xsl:when test="starts-with($content,'&#x002D4;')"><xsl:value-of select="'&amp;#x002D4&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D4;')"/></xsl:call-template></xsl:when><!--\Elzrais-->
+<xsl:when test="starts-with($content,'&#x002D5;')"><xsl:value-of select="'&amp;#x002D5&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D5;')"/></xsl:call-template></xsl:when><!--\Elzlow-->
+<xsl:when test="starts-with($content,'&#x002D8;')"><xsl:value-of select="'&amp;#x002D8&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D8;')"/></xsl:call-template></xsl:when><!--\u-->
+<xsl:when test="starts-with($content,'&#x002D9;')"><xsl:value-of select="'\dot{}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002D9;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x002DA;')"><xsl:value-of select="'&amp;#x002DA&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002DA;')"/></xsl:call-template></xsl:when><!--\mathring{}-->
+<xsl:when test="starts-with($content,'&#x002DB;')"><xsl:value-of select="'&amp;#x002DB&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002DB;')"/></xsl:call-template></xsl:when><!--\mbox{\k{}}-->
+<xsl:when test="starts-with($content,'&#x002DD;')"><xsl:value-of select="'&amp;#x002DD&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x002DD;')"/></xsl:call-template></xsl:when><!--\mbox{\H{}}-->
+<xsl:when test="starts-with($content,'&#x00300;')"><xsl:value-of select="'&amp;#x00300&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00300;')"/></xsl:call-template></xsl:when><!--\grave-->
+<xsl:when test="starts-with($content,'&#x00301;')"><xsl:value-of select="'&amp;#x00301&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00301;')"/></xsl:call-template></xsl:when><!--\acute-->
+<xsl:when test="starts-with($content,'&#x00302;')"><xsl:value-of select="'\hat '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00302;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00303;')"><xsl:value-of select="'\tilde '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00303;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00304;')"><xsl:value-of select="'\bar '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00304;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00306;')"><xsl:value-of select="'&amp;#x00306&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00306;')"/></xsl:call-template></xsl:when><!--\breve-->
+<xsl:when test="starts-with($content,'&#x00307;')"><xsl:value-of select="'\dot '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00307;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00308;')"><xsl:value-of select="'\ddot '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00308;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0030A;')"><xsl:value-of select="'&amp;#x0030A&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0030A;')"/></xsl:call-template></xsl:when><!--\ocirc-->
+               <xsl:when test="starts-with($content,'&#x0030B;')"><xsl:value-of select="'&amp;#x0030B&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0030B;')"/></xsl:call-template></xsl:when><!--\H-->
+<xsl:when test="starts-with($content,'&#x0030C;')"><xsl:value-of select="'\check '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0030C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00321;')"><xsl:value-of select="'&amp;#x00321&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00321;')"/></xsl:call-template></xsl:when><!--\Elzpalh-->
+<xsl:when test="starts-with($content,'&#x0032A;')"><xsl:value-of select="'&amp;#x0032A&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0032A;')"/></xsl:call-template></xsl:when><!--\Elzsbbrg-->
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       Greek
+       Range: 0370-03FF
+       http://www.unicode.org/charts/PDF/U0370.pdf                         -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'&#x00386;')"><xsl:value-of select="'\acute{A}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00386;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00388;')"><xsl:value-of select="'\acute{E}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00388;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00389;')"><xsl:value-of select="'&amp;#x00389&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00389;')"/></xsl:call-template></xsl:when><!--\grave{H}-->
+<xsl:when test="starts-with($content,'&#x0038A;')"><xsl:value-of select="concat('\mathrm{',$apos,'I}')" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0038A;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0038C;')"><xsl:value-of select="concat('\mathrm{',$apos,'O}')" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0038C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0038E;')"><xsl:value-of select="concat('\mathrm{',$apos,'Y}')" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0038E;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0038F;')"><xsl:value-of select="concat('\mathrm{',$apos,'\Omega}')" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0038F;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00390;')"><xsl:value-of select="'&amp;#x00390&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00390;')"/></xsl:call-template></xsl:when><!--\acute{\ddot{\iota}}-->
+<xsl:when test="starts-with($content,'&#x00391;')"><xsl:value-of select="'\Alpha '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00391;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00392;')"><xsl:value-of select="'\Beta '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00392;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00393;')"><xsl:value-of select="'\Gamma '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00393;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00394;')"><xsl:value-of select="'\Delta '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00394;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00395;')"><xsl:value-of select="'&amp;#x00395&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00395;')"/></xsl:call-template></xsl:when><!--\Epsilon-->
+<xsl:when test="starts-with($content,'&#x00396;')"><xsl:value-of select="'\Zeta '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00396;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00397;')"><xsl:value-of select="'\Eta '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00397;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00398;')"><xsl:value-of select="'\Theta '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00398;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x00399;')"><xsl:value-of select="'\Iota '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x00399;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0039A;')"><xsl:value-of select="'\Kappa '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0039A;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0039B;')"><xsl:value-of select="'\Lambda '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0039B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0039C;')"><xsl:value-of select="'M'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0039C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0039D;')"><xsl:value-of select="'N'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0039D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0039E;')"><xsl:value-of select="'\Xi '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0039E;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0039F;')"><xsl:value-of select="'O'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0039F;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A0;')"><xsl:value-of select="'\Pi '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A0;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A1;')"><xsl:value-of select="'\Rho '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A1;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A3;')"><xsl:value-of select="'\Sigma '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A3;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A4;')"><xsl:value-of select="'\Tau '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A4;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A5;')"><xsl:value-of select="'\Upsilon '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A5;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A6;')"><xsl:value-of select="'\Phi '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A6;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A7;')"><xsl:value-of select="'&amp;#x003A7&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A7;')"/></xsl:call-template></xsl:when><!--\Chi-->
+<xsl:when test="starts-with($content,'&#x003A8;')"><xsl:value-of select="'\Psi '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A8;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003A9;')"><xsl:value-of select="'\Omega '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003A9;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x003AA;')"><xsl:value-of select="'\mathrm{\ddot{I}}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003AA;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003AB;')"><xsl:value-of select="'\mathrm{\ddot{Y}}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003AB;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003AC;')"><xsl:value-of select="'&amp;#x003AC&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003AC;')"/></xsl:call-template></xsl:when><!--\acute{\alpha}-->
+<xsl:when test="starts-with($content,'&#x003AD;')"><xsl:value-of select="'&amp;#x003AD&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003AD;')"/></xsl:call-template></xsl:when><!--\acute{\epsilon}-->
+<xsl:when test="starts-with($content,'&#x003AE;')"><xsl:value-of select="'&amp;#x003AE&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003AE;')"/></xsl:call-template></xsl:when><!--\acute{\eta}-->
+<xsl:when test="starts-with($content,'&#x003AF;')"><xsl:value-of select="'&amp;#x003AF&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003AF;')"/></xsl:call-template></xsl:when><!--\acute{\iota}-->
+<xsl:when test="starts-with($content,'&#x003B0;')"><xsl:value-of select="'&amp;#x003B0&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B0;')"/></xsl:call-template></xsl:when><!--\acute{\ddot{\upsilon}}-->
+               <xsl:when test="starts-with($content,'&#x003B1;')"><xsl:value-of select="'\alpha '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B1;')"/></xsl:call-template></xsl:when> <!--/alpha small alpha, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B2;')"><xsl:value-of select="'\beta '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B2;')"/></xsl:call-template></xsl:when>  <!--/beta small beta, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B3;')"><xsl:value-of select="'\gamma '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B3;')"/></xsl:call-template></xsl:when> <!--/gamma small gamma, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B4;')"><xsl:value-of select="'\delta '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B4;')"/></xsl:call-template></xsl:when> <!--/delta small delta, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B5;')"><xsl:value-of select="'\epsilon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B5;')"/></xsl:call-template></xsl:when>       <!--/straightepsilon, small epsilon, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B6;')"><xsl:value-of select="'\zeta '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B6;')"/></xsl:call-template></xsl:when>  <!--/zeta small zeta, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B7;')"><xsl:value-of select="'\eta '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B7;')"/></xsl:call-template></xsl:when>   <!--/eta small eta, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B8;')"><xsl:value-of select="'\theta '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B8;')"/></xsl:call-template></xsl:when> <!--/theta straight theta, small theta, Greek -->
+               <xsl:when test="starts-with($content,'&#x003B9;')"><xsl:value-of select="'\iota '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003B9;')"/></xsl:call-template></xsl:when>  <!--/iota small iota, Greek -->
+               <xsl:when test="starts-with($content,'&#x003BA;')"><xsl:value-of select="'\kappa '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003BA;')"/></xsl:call-template></xsl:when> <!--/kappa small kappa, Greek -->
+               <xsl:when test="starts-with($content,'&#x003BB;')"><xsl:value-of select="'\lambda '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003BB;')"/></xsl:call-template></xsl:when>        <!--/lambda small lambda, Greek -->
+               <xsl:when test="starts-with($content,'&#x003BC;')"><xsl:value-of select="'\mu '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003BC;')"/></xsl:call-template></xsl:when>    <!--/mu small mu, Greek -->
+               <xsl:when test="starts-with($content,'&#x003BD;')"><xsl:value-of select="'\nu '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003BD;')"/></xsl:call-template></xsl:when>    <!--/nu small nu, Greek -->
+               <xsl:when test="starts-with($content,'&#x003BE;')"><xsl:value-of select="'\xi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003BE;')"/></xsl:call-template></xsl:when>    <!--/xi small xi, Greek -->
+               <xsl:when test="starts-with($content,'&#x003BF;')"><xsl:value-of select="'o'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003BF;')"/></xsl:call-template></xsl:when>       <!--small omicron, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C0;')"><xsl:value-of select="'\pi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C0;')"/></xsl:call-template></xsl:when>    <!--/pi small pi, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C1;')"><xsl:value-of select="'\rho '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C1;')"/></xsl:call-template></xsl:when>   <!--/rho small rho, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C2;')"><xsl:value-of select="'\varsigma '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C2;')"/></xsl:call-template></xsl:when>      <!--/varsigma -->
+               <xsl:when test="starts-with($content,'&#x003C3;')"><xsl:value-of select="'\sigma '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C3;')"/></xsl:call-template></xsl:when> <!--/sigma small sigma, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C4;')"><xsl:value-of select="'\tau '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C4;')"/></xsl:call-template></xsl:when>   <!--/tau small tau, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C5;')"><xsl:value-of select="'\upsilon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C5;')"/></xsl:call-template></xsl:when>       <!--/upsilon small upsilon, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C6;')"><xsl:value-of select="'\phi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C6;')"/></xsl:call-template></xsl:when>   <!--/straightphi - small phi, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C7;')"><xsl:value-of select="'\chi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C7;')"/></xsl:call-template></xsl:when>   <!--/chi small chi, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C8;')"><xsl:value-of select="'\psi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C8;')"/></xsl:call-template></xsl:when>   <!--/psi small psi, Greek -->
+               <xsl:when test="starts-with($content,'&#x003C9;')"><xsl:value-of select="'\omega '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003C9;')"/></xsl:call-template></xsl:when> <!--/omega small omega, Greek -->
+               <xsl:when test="starts-with($content,'&#x003CA;')"><xsl:value-of select="'\ddot{\iota}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003CA;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003CB;')"><xsl:value-of select="'\ddot{\upsilon}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003CB;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003CC;')"><xsl:value-of select="'\acute{o}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003CC;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003CD;')"><xsl:value-of select="'&amp;#x003CD&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003CD;')"/></xsl:call-template></xsl:when><!--\acute{\upsilon}-->
+<xsl:when test="starts-with($content,'&#x003CE;')"><xsl:value-of select="'&amp;#x003CE&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003CE;')"/></xsl:call-template></xsl:when><!--\acute{\omega}-->
+               <xsl:when test="starts-with($content,'&#x003D1;')"><xsl:value-of select="'\vartheta '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003D1;')"/></xsl:call-template></xsl:when>      <!--/vartheta - curly or open theta -->
+               <xsl:when test="starts-with($content,'&#x003D2;')"><xsl:value-of select="'\Upsilon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003D2;')"/></xsl:call-template></xsl:when>       <!--/Upsilon capital Upsilon, Greek -->
+               <xsl:when test="starts-with($content,'&#x003D5;')"><xsl:value-of select="'\phi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003D5;')"/></xsl:call-template></xsl:when>   <!--/varphi - curly or open phi -->
+               <xsl:when test="starts-with($content,'&#x003D6;')"><xsl:value-of select="'\varpi '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003D6;')"/></xsl:call-template></xsl:when> <!--/varpi -->
+<xsl:when test="starts-with($content,'&#x003DA;')"><xsl:value-of select="'&amp;#x003DA&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003DA;')"/></xsl:call-template></xsl:when><!--\Stigma-->
+<xsl:when test="starts-with($content,'&#x003DC;')"><xsl:value-of select="'&amp;#x003DC&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003DC;')"/></xsl:call-template></xsl:when><!--\Digamma-->
+<xsl:when test="starts-with($content,'&#x003DD;')"><xsl:value-of select="'\digamma '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003DD;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003DE;')"><xsl:value-of select="'&amp;#x003DE&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003DE;')"/></xsl:call-template></xsl:when><!--\Koppa-->
+<xsl:when test="starts-with($content,'&#x003E0;')"><xsl:value-of select="'&amp;#x003E0&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003E0;')"/></xsl:call-template></xsl:when><!--\Sampi-->
+               <xsl:when test="starts-with($content,'&#x003F0;')"><xsl:value-of select="'\varkappa '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003F0;')"/></xsl:call-template></xsl:when>      <!--/varkappa -->
+               <xsl:when test="starts-with($content,'&#x003F1;')"><xsl:value-of select="'\varrho '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003F1;')"/></xsl:call-template></xsl:when>        <!--/varrho -->
+<xsl:when test="starts-with($content,'&#x003F5;')"><xsl:value-of select="'\epsilon '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003F5;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x003F6;')"><xsl:value-of select="'\backepsilon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x003F6;')"/></xsl:call-template></xsl:when>
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       General Punctuation
+       Range: 2000-206F
+       http://www.unicode.org/charts/PDF/U2000.pdf                         -->
+<!-- ====================================================================== -->
+               <xsl:when test="starts-with($content,'&#x02002;')"><xsl:value-of select='"\enspace "' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02002;')"/></xsl:call-template></xsl:when>       <!-- en space (1/2-em) -->
+               <xsl:when test="starts-with($content,'&#x02003;')"><xsl:value-of select='"\quad "' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02003;')"/></xsl:call-template></xsl:when>          <!-- emsp - space of width 1em -->
+               <xsl:when test="starts-with($content,'&#x02004;')"><xsl:value-of select='"\hspace{0.33em}"' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02004;')"/></xsl:call-template></xsl:when> <!-- emsp13 - space of width 1/3 em -->
+               <xsl:when test="starts-with($content,'&#x02005;')"><xsl:value-of select='"\thickspace "' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02005;')"/></xsl:call-template></xsl:when>    <!-- ThickSpace - space of width 1/4 em -->
+               <xsl:when test="starts-with($content,'&#x02006;')"><xsl:value-of select='"\hspace{0.166em}"' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02006;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02007;')"><xsl:value-of select='"\hphantom{0}"' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02007;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02008;')"><xsl:value-of select='"\hphantom{,}"' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02008;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02009;')"><xsl:value-of select='"\thinspace "' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02009;')"/></xsl:call-template></xsl:when>     <!-- ThinSpace - space of width 3/18 em -->
+               <xsl:when test="starts-with($content,'&#x0200A;')"><xsl:value-of select="'&amp;#x0200A&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0200A;')"/></xsl:call-template></xsl:when><!--\hspace-->
+               <xsl:when test="starts-with($content,'&#x0200B;')"><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0200B;')"/></xsl:call-template></xsl:when>    <!--zero width space -->
+               <xsl:when test="starts-with($content,'&#x02010;')"><xsl:value-of select="'-'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02010;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02013;')"><xsl:value-of select="'&amp;#x02013&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02013;')"/></xsl:call-template></xsl:when><!--\endash-->
+               <xsl:when test="starts-with($content,'&#x02014;')"><xsl:value-of select="'&amp;#x02014&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02014;')"/></xsl:call-template></xsl:when><!--\emdash-->
+               <xsl:when test="starts-with($content,'&#x02016;')"><xsl:value-of select="'\Vert '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02016;')"/></xsl:call-template></xsl:when>  <!--/Vert dbl vertical bar -->
+               <xsl:when test="starts-with($content,'&#x02018;')"><xsl:value-of select="'&amp;#x02018&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02018;')"/></xsl:call-template></xsl:when><!--\lq-->
+               <xsl:when test="starts-with($content,'&#x02019;')"><xsl:value-of select="'&amp;#x02019&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02019;')"/></xsl:call-template></xsl:when><!--\rq-->
+<xsl:when test="starts-with($content,'&#x0201B;')"><xsl:value-of select="'&amp;#x0201B&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0201B;')"/></xsl:call-template></xsl:when><!--\Elzreapos-->
+               <xsl:when test="starts-with($content,'&#x0201C;')"><xsl:value-of select="'&amp;#x0201C&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0201C;')"/></xsl:call-template></xsl:when><!--\textquotedblleft-->
+               <xsl:when test="starts-with($content,'&#x0201D;')"><xsl:value-of select="'&amp;#x0201D&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0201D;')"/></xsl:call-template></xsl:when><!--\textquotedblright-->
+<xsl:when test="starts-with($content,'&#x02020;')"><xsl:value-of select="'\dagger '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02020;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02021;')"><xsl:value-of select="'&amp;#x02021&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02021;')"/></xsl:call-template></xsl:when><!--\ddager-->
+<xsl:when test="starts-with($content,'&#x02022;')"><xsl:value-of select="'\bullet '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02022;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02026;')"><xsl:value-of select="'\dots '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02026;')"/></xsl:call-template></xsl:when>  <!--horizontal ellipsis = three dot leader -->
+               <xsl:when test="starts-with($content,'&#x02032;')"><xsl:value-of select="'\prime '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02032;')"/></xsl:call-template></xsl:when> <!--/prime prime or minute -->
+<xsl:when test="starts-with($content,'&#x02033;')"><xsl:value-of select="concat('{',$apos,$apos,'}')" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02033;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02034;')"><xsl:value-of select="concat('{',$apos,$apos,$apos,'}')" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02034;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02035;')"><xsl:value-of select="'\backprime '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02035;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02041;')"><xsl:call-template name="replaceEntities"><xsl:with-param 
name="content" select="substring-after($content, '&#x02041;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02044;')"><xsl:call-template name="replaceEntities"><xsl:with-param 
name="content" select="substring-after($content, '&#x02044;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0204E;')"><xsl:call-template name="replaceEntities"><xsl:with-param 
name="content" select="substring-after($content, '&#x0204E;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02057;')"><xsl:value-of select="concat($apos,$apos,$apos,$apos)" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02057;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0205F;')"><xsl:value-of select="'&amp;#x0205F&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0205F;')"/></xsl:call-template></xsl:when><!--\mkern4mu-->
+               <xsl:when test="starts-with($content,'&#x02061;')"><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02061;')"/></xsl:call-template></xsl:when>    <!-- ApplyFunction -->
+               <xsl:when test="starts-with($content,'&#x02062;')"><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02062;')"/></xsl:call-template></xsl:when>    <!-- InvisibleTimes -->
+               <xsl:when test="starts-with($content,'&#x02063;')"><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02063;')"/></xsl:call-template></xsl:when>    <!-- InvisibleComma, used as a separator, e.g., in indices 
-->
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+                           -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'&#x020A7;')"><xsl:value-of select="'\Elzpes'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x020A7;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x020AC;')"><xsl:value-of select="'&amp;#x020AC&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x020AC;')"/></xsl:call-template></xsl:when><!--\mbox{\texteuro}-->
+<xsl:when test="starts-with($content,'&#x020DB;')"><xsl:value-of select="'\dddot '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x020DB;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x020DC;')"><xsl:value-of select="'\ddddot '" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x020DC;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x020E7;')"><xsl:call-template name="replaceEntities"><xsl:with-param 
name="content" select="substring-after($content, '&#x020E7;')"/></xsl:call-template></xsl:when>
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       Letterlike Symbols
+       Range: 2100-214F
+       http://www.unicode.org/charts/PDF/U2100.pdf                         -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'&#x02102;')"><xsl:value-of select="'\mathbb{C}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02102;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0210A;')"><xsl:value-of select="'&amp;#x0210A&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0210A;')"/></xsl:call-template></xsl:when><!--\mathscr{g}-->
+               <xsl:when test="starts-with($content,'&#x0210B;')"><xsl:value-of select="'&amp;#x0210B&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0210B;')"/></xsl:call-template></xsl:when>       <!--H Hamiltonian --><!--\mathscr{H}-->
+               <xsl:when test="starts-with($content,'&#x0210C;')"><xsl:value-of select="'\mathfrak{H}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0210C;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0210D;')"><xsl:value-of select="'\mathbb{H}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0210D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0210E;')"><xsl:call-template name="replaceEntities"><xsl:with-param 
name="content" select="substring-after($content, '&#x0210E;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0210F;&#x0FE00;')"><xsl:value-of select="'\hbar '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0210F;&#x0FE00;')"/></xsl:call-template></xsl:when>        <!--/hbar - Planck's over 2pi -->
+               <xsl:when test="starts-with($content,'&#x0210F;')"><xsl:value-of select="'&amp;#x0210F&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0210F;')"/></xsl:call-template></xsl:when>      <!--/hslash - variant 
Planck's over 2pi --> <!-- Required amssymb --><!--\hslash-->
+<xsl:when test="starts-with($content,'&#x02110;')"><xsl:value-of select="'&amp;#x02110&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02110;')"/></xsl:call-template></xsl:when><!--\mathscr{I}-->
+               <xsl:when test="starts-with($content,'&#x02111;')"><xsl:value-of select="'\Im '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02111;')"/></xsl:call-template></xsl:when>            <!--/Im - imaginary   -->
+<xsl:when test="starts-with($content,'&#x02112;')"><xsl:value-of select="'&amp;#x02112&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02112;')"/></xsl:call-template></xsl:when><!--\mathscr{L}-->
+               <xsl:when test="starts-with($content,'&#x02113;')"><xsl:value-of select="'\ell '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02113;')"/></xsl:call-template></xsl:when>           <!--/ell - cursive small l -->
+               <xsl:when test="starts-with($content,'&#x02115;')"><xsl:value-of select="'\mathbb{N}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02115;')"/></xsl:call-template></xsl:when>      <!--the semi-ring of natural numbers --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02116;')"><xsl:value-of select="'&amp;#x02116&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02116;')"/></xsl:call-template></xsl:when><!--\textnumero-->
+               <xsl:when test="starts-with($content,'&#x02118;')"><xsl:value-of select="'\wp '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02118;')"/></xsl:call-template></xsl:when>            <!--/wp - Weierstrass p -->
+               <xsl:when test="starts-with($content,'&#x02119;')"><xsl:value-of select="'\mathbb{P}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02119;')"/></xsl:call-template></xsl:when>      <!--the prime natural numbers --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x0211A;')"><xsl:value-of select="'\mathbb{Q}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0211A;')"/></xsl:call-template></xsl:when>      <!--the field of rational numbers --> <!-- Required 
amssymb -->
+<xsl:when test="starts-with($content,'&#x0211B;')"><xsl:value-of select="'&amp;#x0211B&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0211B;')"/></xsl:call-template></xsl:when><!--\mathscr{R}-->
+               <xsl:when test="starts-with($content,'&#x0211C;')"><xsl:value-of select="'\Re '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0211C;')"/></xsl:call-template></xsl:when>            <!--/Re - real -->
+               <xsl:when test="starts-with($content,'&#x0211D;')"><xsl:value-of select="'\mathbb{R}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0211D;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0211E;')"><xsl:value-of select="'&amp;#x0211E&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0211E;')"/></xsl:call-template></xsl:when><!--\Elzxrat-->
+               <xsl:when test="starts-with($content,'&#x02124;')"><xsl:value-of select="'\mathbb{Z}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02124;')"/></xsl:call-template></xsl:when>      <!--the ring of integers --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02126;')"><xsl:value-of select="'\Omega '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02126;')"/></xsl:call-template></xsl:when>         <!--ohm sign -->
+               <xsl:when test="starts-with($content,'&#x02127;')"><xsl:value-of select="'\mho '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02127;')"/></xsl:call-template></xsl:when>           <!--/mho - conductance -->
+<xsl:when test="starts-with($content,'&#x02128;')"><xsl:value-of select="'\mathfrak{Z}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02128;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x02129;')"><xsl:value-of select="'&amp;#x02129&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02129;')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{2129}-->
+<xsl:when test="starts-with($content,'&#x0212B;')"><xsl:value-of select="'\AA'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0212B;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0212C;')"><xsl:value-of select="'&amp;#x0212C&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0212C;')"/></xsl:call-template></xsl:when><!--\mathscr{B}-->
+<xsl:when test="starts-with($content,'&#x0212D;')"><xsl:value-of select="'\mathfrak{C}'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0212D;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x0212F;')"><xsl:value-of select="'&amp;#x0212F&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0212F;')"/></xsl:call-template></xsl:when><!--\mathscr{e}-->
+<xsl:when test="starts-with($content,'&#x02130;')"><xsl:value-of select="'&amp;#x02130&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02130;')"/></xsl:call-template></xsl:when><!--\mathscr{E}-->
+<xsl:when test="starts-with($content,'&#x02131;')"><xsl:value-of select="'&amp;#x02131&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02131;')"/></xsl:call-template></xsl:when><!--\mathscr{F}-->
+<xsl:when test="starts-with($content,'&#x02133;')"><xsl:value-of select="'&amp;#x02133&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02133;')"/></xsl:call-template></xsl:when><!--\mathscr{M}-->
+<xsl:when test="starts-with($content,'&#x02134;')"><xsl:value-of select="'&amp;#x02134&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02134;')"/></xsl:call-template></xsl:when><!--\mathscr{o}-->
+               <xsl:when test="starts-with($content,'&#x02135;')"><xsl:value-of select="'\aleph '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02135;')"/></xsl:call-template></xsl:when>         <!--/aleph aleph, Hebrew -->
+               <xsl:when test="starts-with($content,'&#x02136;')"><xsl:value-of select="'\beth '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02136;')"/></xsl:call-template></xsl:when>          <!--/beth - beth, Hebrew --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02137;')"><xsl:value-of select="'&amp;#x02137&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02137;')"/></xsl:call-template></xsl:when>              <!--/gimel - 
gimel, Hebrew --> <!-- Required amssymb --><!--\gimel-->
+               <xsl:when test="starts-with($content,'&#x02138;')"><xsl:value-of select="'&amp;#x02138&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02138;')"/></xsl:call-template></xsl:when>      <!--/daleth - daleth, 
Hebrew --> <!-- Required amssymb --><!--\daleth-->
+<xsl:when test="starts-with($content,'&#x0213F;')"><xsl:value-of select="'&amp;#x0213F&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0213F;')"/></xsl:call-template></xsl:when><!--\BbbPi-->
+<xsl:when test="starts-with($content,'&#x02140;')"><xsl:value-of select="'&amp;#x02140&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02140;')"/></xsl:call-template></xsl:when><!--\bbsum-->
+<xsl:when test="starts-with($content,'&#x02141;')"><xsl:value-of select="'&amp;#x02141&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02141;')"/></xsl:call-template></xsl:when><!--\Game-->
+               <xsl:when test="starts-with($content,'&#x02145;')"><xsl:value-of select="'D'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02145;')"/></xsl:call-template></xsl:when>               <!--D for use in differentials, e.g., within 
integrals -->
+               <xsl:when test="starts-with($content,'&#x02146;')"><xsl:value-of select="'d'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02146;')"/></xsl:call-template></xsl:when>               <!--d for use in differentials, e.g., within 
integrals -->
+               <xsl:when test="starts-with($content,'&#x02147;')"><xsl:value-of select="'e'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02147;')"/></xsl:call-template></xsl:when>               <!--e use for the exponential base of the 
natural logarithms -->
+               <xsl:when test="starts-with($content,'&#x02148;')"><xsl:value-of select="'i'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02148;')"/></xsl:call-template></xsl:when>               <!--i for use as a square root of -1 -->
+               <xsl:when test="starts-with($content,'&#x02149;')"><xsl:value-of select="'j'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02149;')"/></xsl:call-template></xsl:when>               
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+                                   -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'&#x02153;')"><xsl:value-of select="'&amp;#x02153&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02153;')"/></xsl:call-template></xsl:when><!--\textfrac{1}{3}-->
+<xsl:when test="starts-with($content,'&#x02154;')"><xsl:value-of select="'&amp;#x02154&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02154;')"/></xsl:call-template></xsl:when><!--\textfrac{2}{3}-->
+<xsl:when test="starts-with($content,'&#x02155;')"><xsl:value-of select="'&amp;#x02155&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02155;')"/></xsl:call-template></xsl:when><!--\textfrac{1}{5}-->
+<xsl:when test="starts-with($content,'&#x02156;')"><xsl:value-of select="'&amp;#x02156&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02156;')"/></xsl:call-template></xsl:when><!--\textfrac{2}{5}-->
+<xsl:when test="starts-with($content,'&#x02157;')"><xsl:value-of select="'&amp;#x02157&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02157;')"/></xsl:call-template></xsl:when><!--\textfrac{3}{5}-->
+<xsl:when test="starts-with($content,'&#x02158;')"><xsl:value-of select="'&amp;#x02158&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02158;')"/></xsl:call-template></xsl:when><!--\textfrac{4}{5}-->
+<xsl:when test="starts-with($content,'&#x02159;')"><xsl:value-of select="'&amp;#x02159&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02159;')"/></xsl:call-template></xsl:when><!--\textfrac{1}{6}-->
+<xsl:when test="starts-with($content,'&#x0215A;')"><xsl:value-of select="'&amp;#x0215A&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0215A;')"/></xsl:call-template></xsl:when><!--\textfrac{5}{6}-->
+<xsl:when test="starts-with($content,'&#x0215B;')"><xsl:value-of select="'&amp;#x0215B&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0215B;')"/></xsl:call-template></xsl:when><!--\textfrac{1}{8}-->
+<xsl:when test="starts-with($content,'&#x0215C;')"><xsl:value-of select="'&amp;#x0215C&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0215C;')"/></xsl:call-template></xsl:when><!--\textfrac{3}{8}-->
+<xsl:when test="starts-with($content,'&#x0215D;')"><xsl:value-of select="'&amp;#x0215D&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0215D;')"/></xsl:call-template></xsl:when><!--\textfrac{5}{8}-->
+<xsl:when test="starts-with($content,'&#x0215E;')"><xsl:value-of select="'&amp;#x0215E&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0215E;')"/></xsl:call-template></xsl:when><!--\textfrac{7}{8}-->
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       Arrows
+       Range: 2190-21FF
+       http://www.unicode.org/charts/PDF/U2190.pdf                         -->
+<!-- ====================================================================== -->
+               <xsl:when test="starts-with($content,'&#x02190;')"><xsl:value-of select="'\leftarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02190;')"/></xsl:call-template></xsl:when>     <!--/leftarrow /gets A: =leftward arrow -->
+               <xsl:when test="starts-with($content,'&#x02191;')"><xsl:value-of select="'\uparrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02191;')"/></xsl:call-template></xsl:when>       <!--/uparrow A: =upward arrow -->
+               <xsl:when test="starts-with($content,'&#x02192;')"><xsl:value-of select="'\rightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02192;')"/></xsl:call-template></xsl:when>            <!--/rightarrow /to A: =rightward arrow -->
+               <xsl:when test="starts-with($content,'&#x02193;')"><xsl:value-of select="'\downarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02193;')"/></xsl:call-template></xsl:when>     <!--/downarrow A: =downward arrow -->
+               <xsl:when test="starts-with($content,'&#x02194;')"><xsl:value-of select="'\leftrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02194;')"/></xsl:call-template></xsl:when>        <!--/leftrightarrow A: l&r arrow -->
+               <xsl:when test="starts-with($content,'&#x02195;')"><xsl:value-of select="'\updownarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02195;')"/></xsl:call-template></xsl:when>   <!--/updownarrow A: up&down arrow -->
+               <xsl:when test="starts-with($content,'&#x02196;')"><xsl:value-of select="'\nwarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02196;')"/></xsl:call-template></xsl:when>       <!--/nwarrow A: NW pointing arrow -->
+               <xsl:when test="starts-with($content,'&#x02197;')"><xsl:value-of select="'\nearrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02197;')"/></xsl:call-template></xsl:when>       <!--/nearrow A: NE pointing arrow -->
+               <xsl:when test="starts-with($content,'&#x02198;')"><xsl:value-of select="'\searrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02198;')"/></xsl:call-template></xsl:when>       <!--/searrow A: SE pointing arrow -->
+               <xsl:when test="starts-with($content,'&#x02199;')"><xsl:value-of select="'\swarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02199;')"/></xsl:call-template></xsl:when>       <!--/swarrow A: SW pointing arrow -->
+               <xsl:when test="starts-with($content,'&#x0219A;')"><xsl:value-of select="'\nleftarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0219A;')"/></xsl:call-template></xsl:when>    <!--/nleftarrow A: not left arrow --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x0219B;')"><xsl:value-of select="'\nrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0219B;')"/></xsl:call-template></xsl:when>   <!--/nrightarrow A: not right arrow --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0219C;')"><xsl:value-of select="'\leftsquigarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0219C;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0219D;')"><xsl:value-of select="'\rightsquigarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0219D;')"/></xsl:call-template></xsl:when>       <!--/rightsquigarrow A: rt arrow-wavy --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0219E;')"><xsl:value-of select="'\twoheadleftarrow 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0219E;')"/></xsl:call-template></xsl:when>      <!--/twoheadleftarrow 
A: --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021A0;')"><xsl:value-of select="'\twoheadrightarrow 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021A0;')"/></xsl:call-template></xsl:when>     <!--/twoheadrightarrow 
A: --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021A2;')"><xsl:value-of select="'\leftarrowtail '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021A2;')"/></xsl:call-template></xsl:when> <!--/leftarrowtail A: left arrow-tailed --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x021A3;')"><xsl:value-of select="'\rightarrowtail '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021A3;')"/></xsl:call-template></xsl:when>        <!--/rightarrowtail A: rt arrow-tailed --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021A6;')"><xsl:value-of select="'\mapsto '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021A6;')"/></xsl:call-template></xsl:when>        <!--/mapsto A: -->
+               <xsl:when test="starts-with($content,'&#x021A9;')"><xsl:value-of select="'\hookleftarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021A9;')"/></xsl:call-template></xsl:when> <!--/hookleftarrow A: left arrow-hooked -->
+               <xsl:when test="starts-with($content,'&#x021AA;')"><xsl:value-of select="'\hookrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021AA;')"/></xsl:call-template></xsl:when>        <!--/hookrightarrow A: rt arrow-hooked -->
+               <xsl:when test="starts-with($content,'&#x021AB;')"><xsl:value-of select="'\looparrowleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021AB;')"/></xsl:call-template></xsl:when> <!--/looparrowleft A: left arrow-looped --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x021AC;')"><xsl:value-of select="'\looparrowright '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021AC;')"/></xsl:call-template></xsl:when>        <!--/looparrowright A: rt arrow-looped --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021AD;')"><xsl:value-of 
select="'\leftrightsquigarrow '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021AD;')"/></xsl:call-template></xsl:when>   <!--/leftrightsquigarrow 
A: l&r arr-wavy --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021AE;')"><xsl:value-of select="'\nleftrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021AE;')"/></xsl:call-template></xsl:when>       <!--/nleftrightarrow A: not l&r arrow --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x021B0;')"><xsl:value-of select="'\Lsh '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021B0;')"/></xsl:call-template></xsl:when>   <!--/Lsh A: --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021B1;')"><xsl:value-of select="'\Rsh '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021B1;')"/></xsl:call-template></xsl:when>   <!--/Rsh A: --> <!-- Required amssymb -->
+<xsl:when test="starts-with($content,'&#x021B3;')"><xsl:value-of select="'&amp;#x021B3&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021B3;')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{21B3}-->
+               <xsl:when test="starts-with($content,'&#x021B6;')"><xsl:value-of select="'\curvearrowleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021B6;')"/></xsl:call-template></xsl:when>        <!--/curvearrowleft A: left curved arrow --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021B7;')"><xsl:value-of select="'\curvearrowright '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021B7;')"/></xsl:call-template></xsl:when>       <!--/curvearrowright A: rt curved arrow --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021BA;')"><xsl:value-of select="'\circlearrowleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021BA;')"/></xsl:call-template></xsl:when>       <!--/circlearrowleft A: l arr in circle --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021BB;')"><xsl:value-of select="'\circlearrowright 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021BB;')"/></xsl:call-template></xsl:when>      <!--/circlearrowright 
A: r arr in circle --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021BC;')"><xsl:value-of select="'&amp;#x021BC&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021BC;')"/></xsl:call-template></xsl:when>      <!--/leftharpoonup A: 
left harpoon-up --><!--\leftharpoonup-->
+               <xsl:when test="starts-with($content,'&#x021BD;')"><xsl:value-of select="'&amp;#x021BD&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021BD;')"/></xsl:call-template></xsl:when>      <!--/leftharpoondown A: 
l harpoon-down --><!--\leftharpoondown-->
+               <xsl:when test="starts-with($content,'&#x021BE;')"><xsl:value-of select="'\upharpoonright '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021BE;')"/></xsl:call-template></xsl:when>        <!--/upharpoonright /restriction A: up harp-r --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021BF;')"><xsl:value-of select="'\upharpoonleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021BF;')"/></xsl:call-template></xsl:when> <!--/upharpoonleft A: up harpoon-left --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x021C0;')"><xsl:value-of select="'&amp;#x021C0&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021C0;')"/></xsl:call-template></xsl:when>              
<!--/rightharpoonup A: rt harpoon-up --><!--\rightharpoonup-->
+               <xsl:when test="starts-with($content,'&#x021C1;')"><xsl:value-of select="'&amp;#x021C1&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021C1;')"/></xsl:call-template></xsl:when>      <!--/rightharpoondown 
A: rt harpoon-down --><!--\rightharpoondown-->
+               <xsl:when test="starts-with($content,'&#x021C2;')"><xsl:value-of select="'\downharpoonright 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021C2;')"/></xsl:call-template></xsl:when>      <!--/downharpoonright 
A: down harpoon-rt --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021C3;')"><xsl:value-of select="'\downharpoonleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021C3;')"/></xsl:call-template></xsl:when>       <!--/downharpoonleft A: dn harpoon-left --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021C4;')"><xsl:value-of select="'\rightleftarrows '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021C4;')"/></xsl:call-template></xsl:when>       <!--/rightleftarrows A: r arr over l arr --> <!-- 
Required amssymb -->
+<xsl:when test="starts-with($content,'&#x021C5;')"><xsl:value-of select="'&amp;#x021C5&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021C5;')"/></xsl:call-template></xsl:when><!--\dblarrowupdown-->
+               <xsl:when test="starts-with($content,'&#x021C6;')"><xsl:value-of select="'\leftrightarrows '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021C6;')"/></xsl:call-template></xsl:when>       <!--/leftrightarrows A: l arr over r arr --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021C7;')"><xsl:value-of select="'\leftleftarrows '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021C7;')"/></xsl:call-template></xsl:when>        <!--/leftleftarrows A: two left arrows --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021C8;')"><xsl:value-of select="'\upuparrows '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021C8;')"/></xsl:call-template></xsl:when>    <!--/upuparrows A: two up arrows --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x021C9;')"><xsl:value-of select="'\rightrightarrows 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021C9;')"/></xsl:call-template></xsl:when>      <!--/rightrightarrows 
A: two rt arrows --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021CA;')"><xsl:value-of select="'\downdownarrows '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021CA;')"/></xsl:call-template></xsl:when>        <!--/downdownarrows A: two down arrows --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021CB;')"><xsl:value-of select="'\leftrightharpoons 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021CB;')"/></xsl:call-template></xsl:when>     <!--/leftrightharpoons 
A: l harp over r -->
+               <xsl:when test="starts-with($content,'&#x021CC;')"><xsl:value-of select="'\rightleftharpoons 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x021CC;')"/></xsl:call-template></xsl:when>     <!--/rightleftharpoons 
A: r harp over l -->
+               <xsl:when test="starts-with($content,'&#x021CD;')"><xsl:value-of select="'\nLeftarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021CD;')"/></xsl:call-template></xsl:when>    <!--/nLeftarrow A: not implied by --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x021CE;')"><xsl:value-of select="'\nLeftrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021CE;')"/></xsl:call-template></xsl:when>       <!--/nLeftrightarrow A: not l&r dbl arr --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021CF;')"><xsl:value-of select="'\nRightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021CF;')"/></xsl:call-template></xsl:when>   <!--/nRightarrow A: not implies --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x021D0;')"><xsl:value-of select="'\Leftarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D0;')"/></xsl:call-template></xsl:when>     <!--/Leftarrow A: is implied by -->
+               <xsl:when test="starts-with($content,'&#x021D1;')"><xsl:value-of select="'\Uparrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D1;')"/></xsl:call-template></xsl:when>       <!--/Uparrow A: up dbl arrow -->
+               <xsl:when test="starts-with($content,'&#x021D2;')"><xsl:value-of select="'\Rightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D2;')"/></xsl:call-template></xsl:when>    <!--/Rightarrow A: implies -->
+               <xsl:when test="starts-with($content,'&#x021D3;')"><xsl:value-of select="'\Downarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D3;')"/></xsl:call-template></xsl:when>     <!--/Downarrow A: down dbl arrow -->
+               <xsl:when test="starts-with($content,'&#x021D4;')"><xsl:value-of select="'\Leftrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D4;')"/></xsl:call-template></xsl:when>        <!--/Leftrightarrow A: l&r dbl arrow -->
+<!--           <xsl:when test="starts-with($content,'&#x021D4;')"><xsl:value-of select="'\iff '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D4;')"/></xsl:call-template></xsl:when>   /iff if and only if     -->
+               <xsl:when test="starts-with($content,'&#x021D5;')"><xsl:value-of select="'\Updownarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021D5;')"/></xsl:call-template></xsl:when>   <!--/Updownarrow A: up&down dbl arrow -->
+               <xsl:when test="starts-with($content,'&#x021DA;')"><xsl:value-of select="'\Lleftarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021DA;')"/></xsl:call-template></xsl:when>    <!--/Lleftarrow A: left triple arrow --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x021DB;')"><xsl:value-of select="'\Rrightarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021DB;')"/></xsl:call-template></xsl:when>   <!--/Rrightarrow A: right triple arrow --> <!-- Required 
amssymb -->
+<xsl:when test="starts-with($content,'&#x021DD;')"><xsl:value-of select="'\rightsquigarrow '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021DD;')"/></xsl:call-template></xsl:when>
+<xsl:when test="starts-with($content,'&#x021F5;')"><xsl:value-of select="'&amp;#x021F5&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021F5;')"/></xsl:call-template></xsl:when><!--\DownArrowUpArrow-->
+<xsl:when test="starts-with($content,'&#x021FD;')"><xsl:value-of select="'&amp;#x021FD&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021FD;')"/></xsl:call-template></xsl:when><!--\leftarrowtriangle-->
+<xsl:when test="starts-with($content,'&#x021FE;')"><xsl:value-of select="'&amp;#x021FE&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021FE;')"/></xsl:call-template></xsl:when><!--\rightarrowtriangle-->
+<xsl:when test="starts-with($content,'&#x021FF;')"><xsl:value-of select="'&amp;#x021FF&#59; '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x021FF;')"/></xsl:call-template></xsl:when><!--\leftrightarrowtria*-->
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       Mathematical Operators
+       Range: 2200-22FF
+       http://www.unicode.org/charts/PDF/U2200.pdf                         -->
+<!-- ====================================================================== -->        
+               <xsl:when test="starts-with($content,'&#x02200;')"><xsl:value-of select="'\forall '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02200;')"/></xsl:call-template></xsl:when>        <!--/forall for all -->
+               <xsl:when test="starts-with($content,'&#x02201;')"><xsl:value-of select="'&amp;#x02201&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02201;')"/></xsl:call-template></xsl:when>      <!--/complement - 
complement sign --> <!-- Required amssymb --><!--\complement-->
+               <xsl:when test="starts-with($content,'&#x02202;')"><xsl:value-of select="'\partial '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02202;')"/></xsl:call-template></xsl:when>       <!--/partial partial differential -->
+               <xsl:when test="starts-with($content,'&#x02203;')"><xsl:value-of select="'\exists '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02203;')"/></xsl:call-template></xsl:when>        <!--/exists at least one exists -->
+               <xsl:when test="starts-with($content,'&#x02204;')"><xsl:value-of select="'\nexists '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02204;')"/></xsl:call-template></xsl:when>       <!--/nexists - negated exists --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02205;&#x0FE00;')"><xsl:value-of select="'\emptyset 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02205;&#x0FE00;')"/></xsl:call-template></xsl:when>    <!--/emptyset - 
zero, slash -->
+               <xsl:when test="starts-with($content,'&#x02205;')"><xsl:value-of select="'\varnothing '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02205;')"/></xsl:call-template></xsl:when>    <!--/varnothing - circle, slash --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02207;')"><xsl:value-of select="'\nabla '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02207;')"/></xsl:call-template></xsl:when>         <!--/nabla del, Hamilton operator -->
+               <xsl:when test="starts-with($content,'&#x02208;')"><xsl:value-of select="'\in '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02208;')"/></xsl:call-template></xsl:when>            <!--/in R: set membership  -->
+               <xsl:when test="starts-with($content,'&#x02209;')"><xsl:value-of select="'\notin '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02209;')"/></xsl:call-template></xsl:when>         <!--/notin N: negated set membership -->
+               <xsl:when test="starts-with($content,'&#x0220B;')"><xsl:value-of select="'\ni '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0220B;')"/></xsl:call-template></xsl:when>            <!--/ni /owns R: contains -->
+               <xsl:when test="starts-with($content,'&#x0220C;')"><xsl:value-of select="'&amp;#x0220C&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0220C;')"/></xsl:call-template></xsl:when>      <!--negated contains 
--><!--\not\ni-->
+               <xsl:when test="starts-with($content,'&#x0220F;')"><xsl:value-of select="'\prod '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0220F;')"/></xsl:call-template></xsl:when>          <!--/prod L: product operator -->
+               <xsl:when test="starts-with($content,'&#x02210;')"><xsl:value-of select="'\coprod '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02210;')"/></xsl:call-template></xsl:when>        <!--/coprod L: coproduct operator -->
+               <xsl:when test="starts-with($content,'&#x02211;')"><xsl:value-of select="'\sum '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02211;')"/></xsl:call-template></xsl:when>           <!--/sum L: summation operator -->
+               <xsl:when test="starts-with($content,'&#x02212;')"><xsl:value-of select="'&amp;#x02212&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02212;')"/></xsl:call-template></xsl:when>              <!--B: minus 
sign -->           <!--\minus-->
+               <xsl:when test="starts-with($content,'&#x02213;')"><xsl:value-of select="'\mp '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02213;')"/></xsl:call-template></xsl:when>            <!--/mp B: minus-or-plus sign -->
+               <xsl:when test="starts-with($content,'&#x02214;')"><xsl:value-of select="'\dotplus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02214;')"/></xsl:call-template></xsl:when>       <!--/dotplus B: plus sign, dot above --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02216;')"><xsl:value-of select="'\setminus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02216;')"/></xsl:call-template></xsl:when>      <!--/setminus B: reverse solidus -->
+               <xsl:when test="starts-with($content,'&#x02217;')"><xsl:value-of select="'\ast '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02217;')"/></xsl:call-template></xsl:when>           <!--low asterisk -->
+               <xsl:when test="starts-with($content,'&#x02218;')"><xsl:value-of select="'\circ '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02218;')"/></xsl:call-template></xsl:when>          <!--/circ B: composite function (small circle) -->
+               <xsl:when test="starts-with($content,'&#x02219;')"><xsl:value-of select="'\bullet '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02219;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0221A;')"><xsl:value-of select="'&amp;#x0221A&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0221A;')"/></xsl:call-template></xsl:when>              <!--/surd 
radical --><!--\surd-->
+               <xsl:when test="starts-with($content,'&#x0221D;')"><xsl:value-of select="'\propto '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0221D;')"/></xsl:call-template></xsl:when>        <!--/propto R: is proportional to -->
+               <xsl:when test="starts-with($content,'&#x0221E;')"><xsl:value-of select="'\infty '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0221E;')"/></xsl:call-template></xsl:when>         <!--/infty infinity -->
+               <xsl:when test="starts-with($content,'&#x0221F;')"><xsl:value-of select="'&amp;#x0221F&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0221F;')"/></xsl:call-template></xsl:when>              <!--/right (90 
degree) angle --><!--\rightangle-->
+               <xsl:when test="starts-with($content,'&#x02220;')"><xsl:value-of select="'\angle '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02220;')"/></xsl:call-template></xsl:when>         <!--/angle - angle -->
+               <xsl:when test="starts-with($content,'&#x02221;')"><xsl:value-of select="'\measuredangle '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02221;')"/></xsl:call-template></xsl:when> <!--/measuredangle - angle-measured --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02222;')"><xsl:value-of select="'\sphericalangle '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02222;')"/></xsl:call-template></xsl:when><!--/sphericalangle angle-spherical --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02223;')"><xsl:value-of select="'\mid '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02223;')"/></xsl:call-template></xsl:when>           <!--/mid R: -->
+               <xsl:when test="starts-with($content,'&#x02224;&#x0FE00;')"><xsl:value-of select="'\nshortmid 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02224;&#x0FE00;')"/></xsl:call-template></xsl:when>   <!--/nshortmid 
--> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02224;')"><xsl:value-of select="'\nmid '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02224;')"/></xsl:call-template></xsl:when>          <!--/nmid --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02225;')"><xsl:value-of select="'\parallel '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02225;')"/></xsl:call-template></xsl:when>      <!--/parallel R: parallel -->
+               <xsl:when test="starts-with($content,'&#x02226;&#x0FE00;')"><xsl:value-of 
select="'\nshortparallel '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02226;&#x0FE00;')"/></xsl:call-template></xsl:when>      
<!--/nshortparallel N: not short par --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02226;')"><xsl:value-of select="'\nparallel '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02226;')"/></xsl:call-template></xsl:when>     <!--/nparallel N: not parallel --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02227;')"><xsl:value-of select="'\wedge '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02227;')"/></xsl:call-template></xsl:when>         <!--/wedge /land B: logical and -->
+               <xsl:when test="starts-with($content,'&#x02228;')"><xsl:value-of select="'\vee '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02228;')"/></xsl:call-template></xsl:when>           <!--/vee /lor B: logical or -->
+               <xsl:when test="starts-with($content,'&#x02229;')"><xsl:value-of select="'\cap '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02229;')"/></xsl:call-template></xsl:when>           <!--/cap B: intersection -->
+               <xsl:when test="starts-with($content,'&#x0222A;')"><xsl:value-of select="'\cup '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0222A;')"/></xsl:call-template></xsl:when>           <!--/cup B: union or logical sum -->            
+               <xsl:when test="starts-with($content,'&#x0222B;')"><xsl:value-of select="'\int '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0222B;')"/></xsl:call-template></xsl:when>           <!--/int L: integral operator -->
+               <xsl:when test="starts-with($content,'&#x0222C;')"><xsl:value-of select="'\iint '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0222C;')"/></xsl:call-template></xsl:when>          <!--double integral operator --> <!-- Required 
amsmath -->
+               <xsl:when test="starts-with($content,'&#x0222D;')"><xsl:value-of select="'\iiint '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0222D;')"/></xsl:call-template></xsl:when>         <!--/iiint triple integral operator --> <!-- Required 
amsmath -->
+               <xsl:when test="starts-with($content,'&#x0222E;')"><xsl:value-of select="'\oint '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0222E;')"/></xsl:call-template></xsl:when>          <!--/oint L: contour integral operator -->
+               <xsl:when test="starts-with($content,'&#x0222F;')"><xsl:value-of select="'&amp;#x0222F&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0222F;')"/></xsl:call-template></xsl:when>        <!-- \surfintegral 
--><!--\oiint-->
+               <xsl:when test="starts-with($content,'&#x02230;')"><xsl:value-of select="'&amp;#x02230&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02230;')"/></xsl:call-template></xsl:when>                      <!-- 
\volintegral --><!--\oiiint-->
+               <xsl:when test="starts-with($content,'&#x02231;')"><xsl:value-of select="'&amp;#x02231&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02231;')"/></xsl:call-template></xsl:when><!--\clwintegral-->
+               <xsl:when test="starts-with($content,'&#x02232;')"><xsl:value-of select="'&amp;#x02232&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02232;')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{2232}-->
+               <xsl:when test="starts-with($content,'&#x02233;')"><xsl:value-of select="'&amp;#x02233&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02233;')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{2233}-->
+               <xsl:when test="starts-with($content,'&#x02234;')"><xsl:value-of select="'\therefore '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02234;')"/></xsl:call-template></xsl:when>     <!--/therefore R: therefore --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02235;')"><xsl:value-of select="'\because '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02235;')"/></xsl:call-template></xsl:when>       <!--/because R: because --> <!-- Required amssymb -->
+<!-- ? -->     <xsl:when test="starts-with($content,'&#x02236;')"><xsl:value-of select="':'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02236;')"/></xsl:call-template></xsl:when>               <!--/ratio -->
+               <xsl:when test="starts-with($content,'&#x02237;')"><xsl:value-of select="'&amp;#x02237&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02237;')"/></xsl:call-template></xsl:when>      <!--/Colon, two colons 
--><!--\Colon-->
+               <xsl:when test="starts-with($content,'&#x02238;')"><xsl:value-of select="'&amp;#x02238&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02238;')"/></xsl:call-template></xsl:when>              <!--/dotminus 
B: minus sign, dot above --><!--\dotminus-->
+<!--           <xsl:when test="starts-with($content,'&#x02239;')"><xsl:value-of select="' '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02239;')"/></xsl:call-template></xsl:when>               -->
+               <xsl:when test="starts-with($content,'&#x0223A;')"><xsl:value-of 
select="'\mathbin{{:}\!\!{-}\!\!{:}}'" /><xsl:call-template name="replaceEntities"><xsl:with-param 
name="content" select="substring-after($content, '&#x0223A;')"/></xsl:call-template></xsl:when> <!-- minus 
with four dots, geometric properties -->         
+               <xsl:when test="starts-with($content,'&#x0223B;')"><xsl:value-of select="'&amp;#x0223B&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0223B;')"/></xsl:call-template></xsl:when>                      <!-- 
homothetic --><!--\kernelcontraction-->
+               <xsl:when test="starts-with($content,'&#x0223C;')"><xsl:value-of select="'\sim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0223C;')"/></xsl:call-template></xsl:when>           <!--/sim R: similar -->
+               <xsl:when test="starts-with($content,'&#x0223D;')"><xsl:value-of select="'\backsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0223D;')"/></xsl:call-template></xsl:when>       <!--/backsim R: reverse similar --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0223E;')"><xsl:value-of select="'&amp;#x0223E&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0223E;')"/></xsl:call-template></xsl:when>                      <!-- 
most positive --><!--\lazysinv-->
+<!--           <xsl:when test="starts-with($content,'&#x0223F;')"><xsl:value-of select="' '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0223F;')"/></xsl:call-template></xsl:when>               ac current -->
+               <xsl:when test="starts-with($content,'&#x02240;')"><xsl:value-of select="'\wr '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02240;')"/></xsl:call-template></xsl:when>            <!--/wr B: wreath product -->
+               <xsl:when test="starts-with($content,'&#x02241;')"><xsl:value-of select="'\nsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02241;')"/></xsl:call-template></xsl:when>          <!--/nsim N: not similar --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02242;&#x00338;')"><xsl:value-of select="'\neqsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02242;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02242;')"><xsl:value-of select="'&amp;#x02242&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02242;')"/></xsl:call-template></xsl:when>              <!--/esim R: 
equals, similar --> <!-- Required amssymb --><!--\eqsim-->
+               <xsl:when test="starts-with($content,'&#x02243;')"><xsl:value-of select="'\simeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02243;')"/></xsl:call-template></xsl:when>         <!--/simeq R: similar, equals -->
+               <xsl:when test="starts-with($content,'&#x02244;')"><xsl:value-of select="'&amp;#x02244&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02244;')"/></xsl:call-template></xsl:when>              <!--/nsimeq N: 
not similar, equals --><!--\nsime-->
+               <xsl:when test="starts-with($content,'&#x02245;')"><xsl:value-of select="'\cong '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02245;')"/></xsl:call-template></xsl:when>          <!--/cong R: congruent with -->
+               <xsl:when test="starts-with($content,'&#x02246;')"><xsl:value-of select="'&amp;#x02246&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02246;')"/></xsl:call-template></xsl:when><!--  similar, not equals 
--><!--\approxnotequal-->
+               <xsl:when test="starts-with($content,'&#x02247;')"><xsl:value-of select="'\ncong '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02247;')"/></xsl:call-template></xsl:when>         <!--/ncong N: not congruent with --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02248;')"><xsl:value-of select="'\approx '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02248;')"/></xsl:call-template></xsl:when>                <!--/approx R: approximate -->
+<!--           <xsl:when test="starts-with($content,'&#x02249;&#x00338;')"><xsl:value-of select="' '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02249;&#x00338;')"/></xsl:call-template></xsl:when>     not, vert, approximate -->
+               <xsl:when test="starts-with($content,'&#x02249;')"><xsl:value-of select="'&amp;#x02249&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02249;')"/></xsl:call-template></xsl:when>      <!--/napprox N: not 
approximate --><!--\napprox-->
+               <xsl:when test="starts-with($content,'&#x0224A;')"><xsl:value-of select="'\approxeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0224A;')"/></xsl:call-template></xsl:when>      <!--/approxeq R: approximate, equals --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0224B;&#x00338;')"><xsl:value-of select="'\not\apid 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0224B;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0224B;')"><xsl:value-of select="'&amp;#x0224B&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0224B;')"/></xsl:call-template></xsl:when>      <!--    approximately 
identical to --><!--\tildetrpl-->
+               <xsl:when test="starts-with($content,'&#x0224C;')"><xsl:value-of select="'&amp;#x0224C&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0224C;')"/></xsl:call-template></xsl:when>      <!-- /backcong R: 
reverse congruent --><!--\allequal-->
+               <xsl:when test="starts-with($content,'&#x0224D;')"><xsl:value-of select="'\asymp '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0224D;')"/></xsl:call-template></xsl:when>         <!--/asymp R: asymptotically equal to -->
+               <xsl:when test="starts-with($content,'&#x0224E;&#x00338;')"><xsl:value-of select="'\nBumpeq 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0224E;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0224E;')"><xsl:value-of select="'\Bumpeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0224E;')"/></xsl:call-template></xsl:when>                <!--/Bumpeq R: bumpy equals --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0224F;&#x00338;')"><xsl:value-of select="'\nbumpeq 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0224F;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0224F;')"><xsl:value-of select="'\bumpeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0224F;')"/></xsl:call-template></xsl:when>                <!--/bumpeq R: bumpy equals, equals --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02250;&#x00338;')"><xsl:value-of select="'\not\doteq 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02250;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02250;')"><xsl:value-of select="'\doteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02250;')"/></xsl:call-template></xsl:when>         <!--/doteq R: equals, single dot above -->
+               <xsl:when test="starts-with($content,'&#x02251;')"><xsl:value-of select="'&amp;#x02251&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02251;')"/></xsl:call-template></xsl:when>      <!--/doteqdot /Doteq R: 
eq, even dots --> <!-- Required amssymb --><!--\Doteq-->
+               <xsl:when test="starts-with($content,'&#x02252;')"><xsl:value-of select="'\fallingdotseq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02252;')"/></xsl:call-template></xsl:when><!--/fallingdotseq R: eq, falling dots --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02253;')"><xsl:value-of select="'\risingdotseq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02253;')"/></xsl:call-template></xsl:when>  <!--/risingdotseq R: eq, rising dots --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02254;')"><xsl:value-of select="'\coloneq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02254;')"/></xsl:call-template></xsl:when>       <!--/coloneq R: colon, equals -->
+               <xsl:when test="starts-with($content,'&#x02255;')"><xsl:value-of select="'\eqcolon '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02255;')"/></xsl:call-template></xsl:when>       <!--/eqcolon R: equals, colon -->
+               <xsl:when test="starts-with($content,'&#x02256;')"><xsl:value-of select="'\eqcirc '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02256;')"/></xsl:call-template></xsl:when>                <!--/eqcirc R: circle on equals sign --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02257;')"><xsl:value-of select="'\circeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02257;')"/></xsl:call-template></xsl:when>                <!--/circeq R: circle, equals --> <!-- Required 
amssymb -->
+<!-- ? -->     <xsl:when test="starts-with($content,'&#x02258;')"><xsl:value-of 
select="'\stackrel{\frown}{=}'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02258;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02259;')"><xsl:value-of select="'&amp;#x02259&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02259;')"/></xsl:call-template></xsl:when>      <!--/wedgeq R: 
corresponds to (wedge, equals) --><!--\wedgeq-->
+               <xsl:when test="starts-with($content,'&#x0225A;')"><xsl:value-of select="'&amp;#x0225A&#59;'" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0225A;')"/></xsl:call-template></xsl:when>       <!--logical or, equals --><!--\ElsevierGlyph{225A}-->
+               <xsl:when test="starts-with($content,'&#x0225B;')"><xsl:value-of select="'&amp;#x0225B&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0225B;')"/></xsl:call-template></xsl:when>      <!--equal, asterisk 
above --><!--\starequal-->
+               <xsl:when test="starts-with($content,'&#x0225C;')"><xsl:value-of select="'\triangleq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0225C;')"/></xsl:call-template></xsl:when>     <!--/triangleq R: triangle, equals --> <!-- Required 
amssymb -->
+<!-- ? -->     <xsl:when test="starts-with($content,'&#x0225D;')"><xsl:value-of 
select="'\stackrel{\scriptscriptstyle\mathrm{def}}{=}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0225D;')"/></xsl:call-template></xsl:when>
+<!-- ? -->     <xsl:when test="starts-with($content,'&#x0225E;')"><xsl:value-of 
select="'\stackrel{\scriptscriptstyle\mathrm{m}}{=}'" /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0225E;')"/></xsl:call-template></xsl:when>      
+               <xsl:when test="starts-with($content,'&#x0225F;')"><xsl:value-of select="'&amp;#x0225F&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0225F;')"/></xsl:call-template></xsl:when>      <!--/questeq R: equal 
with questionmark --><!--\questeq-->
+<!--           <xsl:when test="starts-with($content,'&#x02260;&#x0FE00;')"><xsl:value-of select="' '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02260;&#x0FE00;')"/></xsl:call-template></xsl:when>     not equal, dot -->
+               <xsl:when test="starts-with($content,'&#x02260;')"><xsl:value-of select="'\ne '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02260;')"/></xsl:call-template></xsl:when>            <!--/ne /neq R: not equal -->
+<!--           <xsl:when test="starts-with($content,'&#x02261;&#x020E5;')"><xsl:value-of select="' '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02261;&#x020E5;')"/></xsl:call-template></xsl:when>     reverse not equivalent -->
+               <xsl:when test="starts-with($content,'&#x02261;')"><xsl:value-of select="'\equiv '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02261;')"/></xsl:call-template></xsl:when>         <!--/equiv R: identical with -->
+               <xsl:when test="starts-with($content,'&#x02262;')"><xsl:value-of select="'\nequiv '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02262;')"/></xsl:call-template></xsl:when>        <!--/nequiv N: not identical with -->
+<!--           <xsl:when test="starts-with($content,'&#x02263;')"><xsl:value-of select="' '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02263;')"/></xsl:call-template></xsl:when>               -->
+               <xsl:when test="starts-with($content,'&#x02264;')"><xsl:value-of select="'\le '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02264;')"/></xsl:call-template></xsl:when>            <!--/leq /le R: less-than-or-equal -->
+               <xsl:when test="starts-with($content,'&#x02265;')"><xsl:value-of select="'\ge '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02265;')"/></xsl:call-template></xsl:when>            <!--/geq /ge R: greater-than-or-equal -->
+               <xsl:when test="starts-with($content,'&#x02266;')"><xsl:value-of select="'\leqq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02266;')"/></xsl:call-template></xsl:when>          <!--/leqq R: less, double equals --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02267;')"><xsl:value-of select="'\geqq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02267;')"/></xsl:call-template></xsl:when>          <!--/geqq R: greater, double equals --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02268;&#x0FE00;')"><xsl:value-of select="'\lvertneqq 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02268;&#x0FE00;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02268;')"><xsl:value-of select="'\lneqq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02268;')"/></xsl:call-template></xsl:when>         <!--/lneqq N: less, not double equals --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02269;&#x0FE00;')"><xsl:value-of select="'\gvertneqq 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02269;&#x0FE00;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02269;')"><xsl:value-of select="'\gneqq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02269;')"/></xsl:call-template></xsl:when>         <!--/gneqq N: greater, not dbl equals --> <!-- 
Required amssymb -->
+<!--           <xsl:when test="starts-with($content,'&#x0226A;&#x00338;&#x0FE00;')"><xsl:value-of select="' 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0226A;&#x00338;&#x0FE00;')"/></xsl:call-template></xsl:when>   not much 
less than, variant -->
+               <xsl:when test="starts-with($content,'&#x0226A;&#x00338;')"><xsl:value-of 
select="'\NotLessLess '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0226A;&#x00338;')"/></xsl:call-template></xsl:when> <!-- not, vert, 
much less than -->
+               <xsl:when test="starts-with($content,'&#x0226A;')"><xsl:value-of select="'\ll '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0226A;')"/></xsl:call-template></xsl:when>            <!--/ll R: double less-than sign -->
+<!--           <xsl:when test="starts-with($content,'&#x0226B;&#x00338;&#x0FE00;')"><xsl:value-of select="' 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0226B;&#x00338;&#x0FE00;')"/></xsl:call-template></xsl:when>   not much 
greater than, variant -->
+               <xsl:when test="starts-with($content,'&#x0226B;&#x00338;')"><xsl:value-of 
select="'\NotGreaterGreater '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0226B;&#x00338;')"/></xsl:call-template></xsl:when>   <!-- not, vert, 
much greater than -->
+               <xsl:when test="starts-with($content,'&#x0226B;')"><xsl:value-of select="'\gg '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0226B;')"/></xsl:call-template></xsl:when>            <!--/gg R: dbl greater-than sign -->
+               <xsl:when test="starts-with($content,'&#x0226C;')"><xsl:value-of select="'\between '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0226C;')"/></xsl:call-template></xsl:when>       <!--/between R: between --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x0226D;')"><xsl:value-of select="'&amp;#x0226D&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0226D;')"/></xsl:call-template></xsl:when><!--\not\kern-0.3em\times-->
+               <xsl:when test="starts-with($content,'&#x0226E;')"><xsl:value-of select="'\nless '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0226E;')"/></xsl:call-template></xsl:when>         <!--/nless N: not less-than --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x0226F;')"><xsl:value-of select="'\ngtr '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0226F;')"/></xsl:call-template></xsl:when>          <!--/ngtr N: not greater-than --> <!-- Required 
amssymb -->
+<!--           <xsl:when test="starts-with($content,'&#x02270;&#x020E5;')"><xsl:value-of select="'\nleq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02270;&#x020E5;')"/></xsl:call-template></xsl:when>        /nleq N: not less-than-or-equal --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02270;')"><xsl:value-of select="'\nleq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02270;')"/></xsl:call-template></xsl:when>          <!--/nleqq N: not less, dbl equals --> <!-- Required 
amssymb -->
+<!--           <xsl:when test="starts-with($content,'&#x02271;&#x020E5;')"><xsl:value-of select="'\ngeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02271;&#x020E5;')"/></xsl:call-template></xsl:when> /ngeq N: not greater-than-or-equal --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02271;')"><xsl:value-of select="'\ngeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02271;')"/></xsl:call-template></xsl:when>          <!--/ngeqq N: not greater, dbl equals --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x02272;')"><xsl:value-of select="'\lesssim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02272;')"/></xsl:call-template></xsl:when>       <!--/lesssim R: less, similar --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02273;')"><xsl:value-of select="'\gtrsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02273;')"/></xsl:call-template></xsl:when>        <!--/gtrsim R: greater, similar --> <!-- Required 
amssymb -->           
+               <xsl:when test="starts-with($content,'&#x02274;')"><xsl:value-of select="'&amp;#x02274&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02274;')"/></xsl:call-template></xsl:when>      <!--not less, similar 
--> <!-- Required amssymb --><!--\ElsevierGlyph{2274}-->
+               <xsl:when test="starts-with($content,'&#x02275;')"><xsl:value-of select="'&amp;#x02275&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02275;')"/></xsl:call-template></xsl:when>      <!--not greater, 
similar --> <!-- Required amssymb --><!--\ElsevierGlyph{2275}-->
+               <xsl:when test="starts-with($content,'&#x02276;')"><xsl:value-of select="'\lessgtr '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02276;')"/></xsl:call-template></xsl:when>       <!--/lessgtr R: less, greater --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02277;')"><xsl:value-of select="'\gtrless '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02277;')"/></xsl:call-template></xsl:when>       <!--/gtrless R: greater, less --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02278;')"><xsl:value-of select="'&amp;#x02278&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02278;')"/></xsl:call-template></xsl:when>      <!--not less, greater 
--> <!-- Required amssymb --><!--\notlessgreater-->
+               <xsl:when test="starts-with($content,'&#x02279;')"><xsl:value-of select="'&amp;#x02279&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02279;')"/></xsl:call-template></xsl:when>      <!--not greater, less 
--> <!-- Required amssymb --><!--\notgreaterless-->
+               <xsl:when test="starts-with($content,'&#x0227A;')"><xsl:value-of select="'\prec '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0227A;')"/></xsl:call-template></xsl:when>          <!--/prec R: precedes -->
+               <xsl:when test="starts-with($content,'&#x0227B;')"><xsl:value-of select="'\succ '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0227B;')"/></xsl:call-template></xsl:when>          <!--/succ R: succeeds -->
+               <xsl:when test="starts-with($content,'&#x0227C;')"><xsl:value-of select="'\preccurlyeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0227C;')"/></xsl:call-template></xsl:when>   <!--/preccurlyeq R: precedes, curly eq --> <!-- Required 
amssymb -->            
+               <xsl:when test="starts-with($content,'&#x0227D;')"><xsl:value-of select="'\succcurlyeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0227D;')"/></xsl:call-template></xsl:when>   <!--/succcurlyeq R: succeeds, curly eq --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0227E;&#x00338;')"><xsl:value-of select="'\nprecsim 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0227E;&#x00338;')"/></xsl:call-template></xsl:when>    
+               <xsl:when test="starts-with($content,'&#x0227E;')"><xsl:value-of select="'\precsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0227E;')"/></xsl:call-template></xsl:when>       <!--/precsim R: precedes, similar --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x0227F;&#x00338;')"><xsl:value-of select="'\nsuccsim 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0227F;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0227F;')"><xsl:value-of select="'\succsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0227F;')"/></xsl:call-template></xsl:when>       <!--/succsim R: succeeds, similar --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x02280;')"><xsl:value-of select="'\nprec '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02280;')"/></xsl:call-template></xsl:when>         <!--/nprec N: not precedes --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02281;')"><xsl:value-of select="'\nsucc '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02281;')"/></xsl:call-template></xsl:when>         <!--/nsucc N: not succeeds --> <!-- Required amssymb 
-->
+               <xsl:when test="starts-with($content,'&#x02282;')"><xsl:value-of select="'\subset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02282;')"/></xsl:call-template></xsl:when>        <!--/subset R: subset or is implied by -->
+               <xsl:when test="starts-with($content,'&#x02283;')"><xsl:value-of select="'\supset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02283;')"/></xsl:call-template></xsl:when>        <!--/supset R: superset or implies -->
+               <xsl:when test="starts-with($content,'&#x02284;')"><xsl:value-of select="'\nsubset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02284;')"/></xsl:call-template></xsl:when>       <!--not subset -->
+               <xsl:when test="starts-with($content,'&#x02285;')"><xsl:value-of select="'\nsupset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02285;')"/></xsl:call-template></xsl:when>       <!--not superset -->
+               <xsl:when test="starts-with($content,'&#x02286;')"><xsl:value-of select="'\subseteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02286;')"/></xsl:call-template></xsl:when>      <!--/subseteq R: subset, equals -->
+               <xsl:when test="starts-with($content,'&#x02287;')"><xsl:value-of select="'\supseteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02287;')"/></xsl:call-template></xsl:when>      <!--/supseteq R: superset, equals -->
+               <xsl:when test="starts-with($content,'&#x02288;')"><xsl:value-of select="'\nsubseteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02288;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02289;')"><xsl:value-of select="'\nsupseteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02289;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0228A;&#x0FE00;')"><xsl:value-of 
select="'\varsubsetneqq '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0228A;&#x0FE00;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0228A;')"><xsl:value-of select="'\subsetneq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0228A;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0228B;&#x0FE00;')"><xsl:value-of 
select="'\varsupsetneq '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0228B;&#x0FE00;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0228B;')"><xsl:value-of select="'\supsetneq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0228B;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0228D;')"><xsl:value-of select="'&amp;#x0228D&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0228D;')"/></xsl:call-template></xsl:when><!--\cupdot-->
+               <xsl:when test="starts-with($content,'&#x0228E;')"><xsl:value-of select="'\uplus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0228E;')"/></xsl:call-template></xsl:when>         <!--/uplus B: plus sign in union -->
+               <xsl:when test="starts-with($content,'&#x0228F;&#x00338;')"><xsl:value-of 
select="'\NotSquareSubset '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0228F;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0228F;')"><xsl:value-of select="'\sqsubset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0228F;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02290;&#x00338;')"><xsl:value-of 
select="'\NotSquareSuperset '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02290;&#x00338;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02290;')"><xsl:value-of select="'\sqsupset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02290;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02291;')"><xsl:value-of select="'\sqsubseteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02291;')"/></xsl:call-template></xsl:when>            
+               <xsl:when test="starts-with($content,'&#x02292;')"><xsl:value-of select="'\sqsupseteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02292;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x02293;')"><xsl:value-of select="'\sqcap '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02293;')"/></xsl:call-template></xsl:when>         <!--/sqcap B: square intersection -->
+               <xsl:when test="starts-with($content,'&#x02294;')"><xsl:value-of select="'\sqcup '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02294;')"/></xsl:call-template></xsl:when>         <!--/sqcup B: square union -->
+               <xsl:when test="starts-with($content,'&#x02295;')"><xsl:value-of select="'\oplus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02295;')"/></xsl:call-template></xsl:when>         <!--/oplus B: plus sign in circle -->
+               <xsl:when test="starts-with($content,'&#x02296;')"><xsl:value-of select="'\ominus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02296;')"/></xsl:call-template></xsl:when>        <!--/ominus B: minus sign in circle -->
+               <xsl:when test="starts-with($content,'&#x02297;')"><xsl:value-of select="'\otimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02297;')"/></xsl:call-template></xsl:when>        <!--/otimes B: multiply sign in circle -->
+               <xsl:when test="starts-with($content,'&#x02298;')"><xsl:value-of select="'\oslash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02298;')"/></xsl:call-template></xsl:when>        <!--/oslash B: solidus in circle -->
+               <xsl:when test="starts-with($content,'&#x02299;')"><xsl:value-of select="'\odot '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02299;')"/></xsl:call-template></xsl:when>          <!--/odot B: middle dot in circle --> <!--/bigodot L: 
circle dot operator -->
+               <xsl:when test="starts-with($content,'&#x0229A;')"><xsl:value-of select="'\circledcirc '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0229A;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0229B;')"><xsl:value-of select="'\circledast '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0229B;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0229D;')"><xsl:value-of select="'\circleddash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0229D;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0229E;')"><xsl:value-of select="'\boxplus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0229E;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x0229F;')"><xsl:value-of select="'\boxminus '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0229F;')"/></xsl:call-template></xsl:when>      <!--/boxminus B: minus sign in box --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x022A0;')"><xsl:value-of select="'\boxtimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A0;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022A1;')"><xsl:value-of select="'\boxdot '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A1;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022A2;')"><xsl:value-of select="'\vdash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022A3;')"><xsl:value-of select="'\dashv '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A3;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022A4;')"><xsl:value-of select="'\top '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A4;')"/></xsl:call-template></xsl:when>           <!--/top top -->
+               <xsl:when test="starts-with($content,'&#x022A5;')"><xsl:value-of select="'\perp '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A5;')"/></xsl:call-template></xsl:when>          <!--/perp R: perpendicular --><!--/bot bottom -->
+<!--           <xsl:when test="starts-with($content,'&#x022A6;')"><xsl:value-of select="'\vdash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A6;')"/></xsl:call-template></xsl:when> /vdash R: vertical, dash -->
+               <xsl:when test="starts-with($content,'&#x022A7;')"><xsl:value-of select="'\models '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A7;')"/></xsl:call-template></xsl:when>                <!--/vDash R: vertical, dbl dash --> <!-- 
Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x022A8;')"><xsl:value-of select="'\vDash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A8;')"/></xsl:call-template></xsl:when> <!--/models R: -->
+               <xsl:when test="starts-with($content,'&#x022A9;')"><xsl:value-of select="'\Vdash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022A9;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022AA;')"><xsl:value-of select="'\Vvdash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022AA;')"/></xsl:call-template></xsl:when>        <!--/Vvdash R: triple vertical, dash --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x022AB;')"><xsl:value-of select="'\VDash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022AB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022AC;')"><xsl:value-of select="'\nvdash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022AC;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022AD;')"><xsl:value-of select="'\nvDash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022AD;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022AE;')"><xsl:value-of select="'&amp;#x022AE&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022AE;')"/></xsl:call-template></xsl:when><!--\nVdash-->
+               <xsl:when test="starts-with($content,'&#x022AF;')"><xsl:value-of select="'\nVDash '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022AF;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022B2;')"><xsl:value-of select="'\vartriangleleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022B2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022B3;')"><xsl:value-of select="'\vartriangleright 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022B3;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022B4;')"><xsl:value-of select="'\trianglelefteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022B4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022B5;')"><xsl:value-of select="'\trianglerighteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022B5;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022B6;')"><xsl:value-of select="'&amp;#x022B6&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022B6;')"/></xsl:call-template></xsl:when><!--\original-->
+               <xsl:when test="starts-with($content,'&#x022B7;')"><xsl:value-of select="'&amp;#x022B7&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022B7;')"/></xsl:call-template></xsl:when><!--\image-->
+               <xsl:when test="starts-with($content,'&#x022B8;')"><xsl:value-of select="'\multimap '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022B8;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022B9;')"><xsl:value-of select="'&amp;#x022B9&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022B9;')"/></xsl:call-template></xsl:when><!--\hermitconjmatrix-->
+               <xsl:when test="starts-with($content,'&#x022BA;')"><xsl:value-of select="'\intercal '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022BA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022BB;')"><xsl:value-of select="'\veebar '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022BB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022BE;')"><xsl:value-of select="'&amp;#x022BE&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022BE;')"/></xsl:call-template></xsl:when><!--\rightanglearc-->
+               <xsl:when test="starts-with($content,'&#x022C0;')"><xsl:value-of select="'\bigwedge '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C0;')"/></xsl:call-template></xsl:when>      <!--/bigwedge L: logical or operator -->
+               <xsl:when test="starts-with($content,'&#x022C1;')"><xsl:value-of select="'\bigvee '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C1;')"/></xsl:call-template></xsl:when>        <!--/bigcap L: intersection operator -->
+               <xsl:when test="starts-with($content,'&#x022C2;')"><xsl:value-of select="'\bigcap '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C2;')"/></xsl:call-template></xsl:when>        <!--/bigvee L: logical and operator -->
+               <xsl:when test="starts-with($content,'&#x022C3;')"><xsl:value-of select="'\bigcup '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C3;')"/></xsl:call-template></xsl:when>        <!--/bigcup L: union operator -->
+               <xsl:when test="starts-with($content,'&#x022C4;')"><xsl:value-of select="'\diamond '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C4;')"/></xsl:call-template></xsl:when>       <!--/diamond B: open diamond -->
+               <xsl:when test="starts-with($content,'&#x022C5;')"><xsl:value-of select="'\cdot '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C5;')"/></xsl:call-template></xsl:when>          <!--/cdot B: small middle dot -->
+               <xsl:when test="starts-with($content,'&#x022C6;')"><xsl:value-of select="'\star '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C6;')"/></xsl:call-template></xsl:when>          <!--/star B: small star, filled -->
+               <xsl:when test="starts-with($content,'&#x022C7;')"><xsl:value-of select="'\divideontimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C7;')"/></xsl:call-template></xsl:when> <!--/divideontimes B: division on times --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x022C8;')"><xsl:value-of select="'\bowtie '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C8;')"/></xsl:call-template></xsl:when>        <!--/bowtie R: -->
+               <xsl:when test="starts-with($content,'&#x022C9;')"><xsl:value-of select="'\ltimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022C9;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022CA;')"><xsl:value-of select="'\rtimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022CA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022CB;')"><xsl:value-of select="'\leftthreetimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022CB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022CC;')"><xsl:value-of select="'\rightthreetimes '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022CC;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022CD;')"><xsl:value-of select="'\backsimeq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022CD;')"/></xsl:call-template></xsl:when>     <!--/backsimeq R: reverse similar, eq --> <!-- Required 
amssymb -->
+               <xsl:when test="starts-with($content,'&#x022CE;')"><xsl:value-of select="'\curlyvee '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022CE;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022CF;')"><xsl:value-of select="'\curlywedge '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022CF;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D0;')"><xsl:value-of select="'\Subset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D0;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D1;')"><xsl:value-of select="'\Supset '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D1;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D2;')"><xsl:value-of select="'\Cap '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D2;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D3;')"><xsl:value-of select="'\Cup '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D3;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D4;')"><xsl:value-of select="'\pitchfork '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D4;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D6;')"><xsl:value-of select="'\lessdot '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D6;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D7;')"><xsl:value-of select="'\gtrdot '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D7;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022D8;')"><xsl:value-of select="'&amp;#x022D8&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022D8;')"/></xsl:call-template></xsl:when><!--\verymuchless-->
+               <xsl:when test="starts-with($content,'&#x022D9;')"><xsl:value-of select="'\ggg '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022D9;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022DA;')"><xsl:value-of select="'\lesseqgtr '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022DA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022DB;')"><xsl:value-of select="'\gtreqless '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022DB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022DE;')"><xsl:value-of select="'\curlyeqprec '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022DE;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022DF;')"><xsl:value-of select="'\curlyeqsucc '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022DF;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022E2;')"><xsl:value-of select="'&amp;#x022E2&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022E2;')"/></xsl:call-template></xsl:when><!--\not\sqsubseteq-->
+               <xsl:when test="starts-with($content,'&#x022E3;')"><xsl:value-of select="'&amp;#x022E3&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022E3;')"/></xsl:call-template></xsl:when><!--\not\sqsupseteq-->
+               <xsl:when test="starts-with($content,'&#x022E5;')"><xsl:value-of select="'&amp;#x022E5&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022E5;')"/></xsl:call-template></xsl:when><!--\Elzsqspne-->
+               <xsl:when test="starts-with($content,'&#x022E6;')"><xsl:value-of select="'\lnsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022E6;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022E7;')"><xsl:value-of select="'\gnsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022E7;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022E8;')"><xsl:value-of select="'\precnsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022E8;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022E9;')"><xsl:value-of select="'\succnsim '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022E9;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022EA;')"><xsl:value-of select="'\ntriangleleft '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022EA;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022EB;')"><xsl:value-of select="'\ntriangleright '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022EB;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022EC;')"><xsl:value-of select="'\ntrianglelefteq '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022EC;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022ED;')"><xsl:value-of select="'\ntrianglerighteq 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022ED;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022EE;')"><xsl:value-of select="'\vdots '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022EE;')"/></xsl:call-template></xsl:when>
+               <xsl:when test="starts-with($content,'&#x022EF;')"><xsl:value-of select="'\cdots '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022EF;')"/></xsl:call-template></xsl:when> <!--/cdots, three dots, centered -->
+               <xsl:when test="starts-with($content,'&#x022F0;')"><xsl:value-of select="'&amp;#x022F0&#59; 
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x022F0;')"/></xsl:call-template></xsl:when>      <!-- three dots, 
ascending --><!--\adots-->
+               <xsl:when test="starts-with($content,'&#x022F1;')"><xsl:value-of select="'\ddots '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x022F1;')"/></xsl:call-template></xsl:when> <!--/ddots, three dots, descending -->
+<!-- ====================================================================== -->
+<!--   Unicode 3.2
+       Miscellaneous Technical
+       Range: 2300-23FF
+       http://www.unicode.org/charts/PDF/U2300.pdf                         -->
+<!-- ====================================================================== -->        
+               <xsl:when test="starts-with($content,'&#x02308;')"><xsl:value-of select="'\lceil '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02308;')"/></xsl:call-template></xsl:when> <!--/lceil O: left ceiling -->
+               <xsl:when test="starts-with($content,'&#x02309;')"><xsl:value-of select="'\rceil '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02309;')"/></xsl:call-template></xsl:when> <!--/rceil C: right ceiling -->
+               <xsl:when test="starts-with($content,'&#x0230A;')"><xsl:value-of select="'\lfloor '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0230A;')"/></xsl:call-template></xsl:when>        <!--/lfloor O: left floor -->
+               <xsl:when test="starts-with($content,'&#x0230B;')"><xsl:value-of select="'\rfloor '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0230B;')"/></xsl:call-template></xsl:when>        <!--/rfloor C: right floor -->
+               <xsl:when test="starts-with($content,'&#x02329;')"><xsl:value-of select="'\langle '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x02329;')"/></xsl:call-template></xsl:when>        <!--/langle O: left angle bracket -->
+               <xsl:when test="starts-with($content,'&#x0232A;')"><xsl:value-of select="'\rangle '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0232A;')"/></xsl:call-template></xsl:when>        <!--/rangle O: right angle bracket -->
+<!-- ====================================================================== -->                
+               <xsl:when test="starts-with($content,'&#x025A1;')"><xsl:value-of select="'\square '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x025A1;')"/></xsl:call-template></xsl:when>        <!--/square, square --> <!-- Required amssymb -->
+               <xsl:when test="starts-with($content,'&#x025AA;')"><xsl:value-of select="'\blacksquare '" 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x025AA;')"/></xsl:call-template></xsl:when>   <!--/blacksquare, square, filled  --> <!-- Required amssymb 
-->
+               <xsl:when test='starts-with($content,"&apos;")'><xsl:value-of select='"\text{&apos;}"' 
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select='substring-after($content, 
"&apos;")'/></xsl:call-template></xsl:when><!-- \text required amslatex -->
+               <xsl:when test='starts-with($content,"{")'><xsl:value-of select='"\{"' /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'{')"/></xsl:call-template></xsl:when>
+               <xsl:when test='starts-with($content,"}")'><xsl:value-of select='"\}"' /><xsl:call-template 
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, 
'}')"/></xsl:call-template></xsl:when>
+               <xsl:otherwise>
+                       <xsl:value-of select="substring($content,1,1)"/>
+                       <xsl:call-template name="replaceEntities">
+                               <xsl:with-param name="content" select="substring($content, 2)"/>
+                       </xsl:call-template>
+               </xsl:otherwise>
+       </xsl:choose></xsl:if>
+</xsl:template>
+<xsl:template name="replaceMtextEntities">
+       <xsl:param name="content"/>
+       <xsl:if test="string-length($content)>0">
+               <xsl:choose>
+                       <xsl:when test="starts-with($content,'&#x02009;&#x0200A;&#x0200A;')"><xsl:value-of 
select='"\hspace{0.28em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02009;&#x0200A;&#x0200A;')"/></xsl:call-template></xsl:when> <!-- 
ThickSpace - space of width 5/18 em -->
+                       <xsl:when test="starts-with($content,'&#x02002;')"><xsl:value-of 
select='"\hspace{0.5em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02002;')"/></xsl:call-template></xsl:when> <!-- en space (1/2-em) -->
+                       <xsl:when test="starts-with($content,'&#x02003;')"><xsl:value-of 
select='"\hspace{1em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02003;')"/></xsl:call-template></xsl:when> <!-- emsp - space of width 
1em -->
+                       <xsl:when test="starts-with($content,'&#x02004;')"><xsl:value-of 
select='"\hspace{0.33em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02004;')"/></xsl:call-template></xsl:when> <!-- emsp13 - space of width 
1/3 em -->
+                       <xsl:when test="starts-with($content,'&#x02005;')"><xsl:value-of 
select='"\hspace{0.25em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02005;')"/></xsl:call-template></xsl:when> <!-- ThickSpace - space of 
width 1/4 em -->
+                       <xsl:when test="starts-with($content,'&#x02009;')"><xsl:value-of 
select='"\hspace{0.17em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x02009;')"/></xsl:call-template></xsl:when> <!-- ThinSpace - space of 
width 3/18 em -->
+                       <xsl:when test="starts-with($content,'&#x0200A;')"><xsl:value-of 
select='"\hspace{0.05em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0200A;')"/></xsl:call-template></xsl:when>
+                       <xsl:when test="starts-with($content,'&#x0200B;')"><xsl:call-template 
name="replaceMtextEntities"><xsl:with-param name="content" select="substring-after($content, 
'&#x0200B;')"/></xsl:call-template></xsl:when>       <!--zero width space -->
+                       <xsl:when test="starts-with($content,'&#x0205F;')"><xsl:value-of 
select='"\hspace{0.22em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&#x0205F;')"/></xsl:call-template></xsl:when>
+                       <xsl:when test='starts-with($content,"$")'><xsl:value-of select='"\$"' 
/><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '$')"/></xsl:call-template></xsl:when>
+                       <xsl:when test='starts-with($content,"#")'><xsl:value-of select='"\#"' 
/><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '#')"/></xsl:call-template></xsl:when>
+                       <xsl:when test='starts-with($content,"&amp;")'><xsl:value-of select='"\&amp;"' 
/><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '&amp;')"/></xsl:call-template></xsl:when>
+                       <xsl:when test='starts-with($content,"%")'><xsl:value-of select='"\%"' 
/><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '%')"/></xsl:call-template></xsl:when>
+                       <xsl:when test='starts-with($content,"_")'><xsl:value-of select='"\_"' 
/><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content" 
select="substring-after($content, '_')"/></xsl:call-template></xsl:when>
+                       <xsl:when test='starts-with($content,"\")'><xsl:call-template 
name="replaceMtextEntities"><xsl:with-param name="content" select="substring-after($content, 
'\')"/></xsl:call-template></xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="substring($content,1,1)"/>
+                               <xsl:call-template name="replaceMtextEntities">
+                                       <xsl:with-param name="content" select="substring($content, 2)"/>
+                               </xsl:call-template>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:if>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/mmlitex/glayout.xsl b/mmlitex/glayout.xsl
new file mode 100644
index 0000000..f0a63d0
--- /dev/null
+++ b/mmlitex/glayout.xsl
@@ -0,0 +1,228 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+                version='1.0'>
+
+<!-- ====================================================================== -->
+<!-- $Id: glayout.xsl,v 1.6 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+
+<!-- 3.3.2 mfrac -->
+<xsl:template match="m:mfrac">
+       <xsl:choose>
+               <xsl:when test="@linethickness">
+                       <xsl:text>\genfrac{}{}{</xsl:text>
+                       <xsl:choose>
+                               <xsl:when test="number(@linethickness)">
+                                       <xsl:value-of select="@linethickness div 10"/>
+                                       <xsl:text>ex</xsl:text>
+                               </xsl:when>
+                               <xsl:when test="@linethickness='0'">
+                                       <xsl:text>0ex</xsl:text>
+                               </xsl:when>
+                               <xsl:when test="@linethickness='thin'">
+                                       <xsl:text>.05ex</xsl:text>
+                               </xsl:when>
+                               <xsl:when test="@linethickness='medium'"/>
+                               <xsl:when test="@linethickness='thick'">
+                                       <xsl:text>.2ex</xsl:text>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="@linethickness"/>
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:text>}{}{</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>\frac{</xsl:text>
+               </xsl:otherwise>
+       </xsl:choose>
+       <xsl:if test="@numalign='right'">
+               <xsl:text>\hfill </xsl:text>
+       </xsl:if>
+       <xsl:apply-templates select="./*[1]"/>
+       <xsl:if test="@numalign='left'">
+               <xsl:text>\hfill </xsl:text>
+       </xsl:if>
+       <xsl:text>}{</xsl:text> 
+       <xsl:if test="@denomalign='right'">
+               <xsl:text>\hfill </xsl:text>
+       </xsl:if>
+       <xsl:apply-templates select="./*[2]"/>
+               <xsl:if test="@denomalign='left'">
+               <xsl:text>\hfill </xsl:text>
+       </xsl:if>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:mfrac[ bevelled='true']">
+       <xsl:text>\raisebox{1ex}{$</xsl:text>
+       <xsl:apply-templates select="./*[1]"/>
+       <xsl:text>$}\!\left/ \!\raisebox{-1ex}{$</xsl:text>
+       <xsl:apply-templates select="./*[2]"/>
+       <xsl:text>$}\right.</xsl:text>
+</xsl:template>
+
+
+<xsl:template match="m:mroot">
+       <xsl:choose>
+               <xsl:when test="count(./*)=2">
+                       <xsl:text>\sqrt[</xsl:text>
+                       <xsl:apply-templates select="./*[2]"/>
+                       <xsl:text>]{</xsl:text> 
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>  
+               </xsl:when>
+               <xsl:otherwise>
+               <!-- number of argumnets is not 2 - code 25 -->
+                       <xsl:message>exception 25:</xsl:message>
+                       <xsl:text>\text{exception 25:}</xsl:text> 
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template match="m:msqrt">
+       <xsl:text>\sqrt{</xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:mfenced">
+       <xsl:choose>
+               <xsl:when test="@open">
+                       <xsl:if test="translate(@open,'{}[]()|','{{{{{{{')='{'">
+                               <xsl:text>\left</xsl:text>
+                       </xsl:if>
+                       <xsl:if test="@open='{' or @open='}'">
+                               <xsl:text>\</xsl:text>
+                       </xsl:if>
+                       <xsl:if test="translate(@open,'{}[]()|','{{{{{{{')!='{' and 
(translate(@close,'{}[]()|','{{{{{{{')='{' or not(@close))">
+                               <xsl:text>\left.</xsl:text>
+                       </xsl:if>
+                       <xsl:value-of select="@open"/>
+               </xsl:when>
+               <xsl:otherwise><xsl:text>\left(</xsl:text></xsl:otherwise>
+       </xsl:choose>
+                       <xsl:variable name="sep">
+                               <xsl:choose>
+                                       <xsl:when test="@separators">
+                                               <xsl:value-of select="translate(@separators,' ','')"/>
+                                       </xsl:when>
+                                       <xsl:otherwise>,</xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:variable>
+                       <xsl:for-each select="./*">
+                               <xsl:apply-templates select="."/>
+                               <xsl:if test="not(position()=last())">
+                                       <xsl:choose>
+                                               <xsl:when test="position()>string-length($sep)">
+                                                       <xsl:value-of 
select="substring($sep,string-length($sep))"/>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="substring($sep,position(),1)"/>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:if>
+                       </xsl:for-each>
+       <xsl:choose>
+               <xsl:when test="@close">
+                       <xsl:if test="translate(@close,'{}[]()|','{{{{{{{')='{'">
+                               <xsl:text>\right</xsl:text>
+                       </xsl:if>
+                       <xsl:if test="@close='{' or @close='}'">
+                               <xsl:text>\</xsl:text>
+                       </xsl:if>
+                       <xsl:if test="translate(@close,'{}[]()|','{{{{{{{')!='{' and 
(translate(@open,'{}[]()|','{{{{{{{')='{' or not(@open))">
+                               <xsl:text>\right.</xsl:text>
+                       </xsl:if>
+                       <xsl:value-of select="@close"/>
+               </xsl:when>
+               <xsl:otherwise><xsl:text>\right)</xsl:text></xsl:otherwise>
+       </xsl:choose>   
+</xsl:template>
+
+<xsl:template match="m:mphantom">
+       <xsl:text>\phantom{</xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:menclose">
+       <xsl:choose>
+               <xsl:when test="@notation = 'actuarial'">
+                       <xsl:text>\overline{</xsl:text>
+                       <xsl:apply-templates/>
+                       <xsl:text>\hspace{.2em}|}</xsl:text>
+               </xsl:when>
+               <xsl:when test="@notation = 'radical'">
+                       <xsl:text>\sqrt{</xsl:text>
+                       <xsl:apply-templates/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>\overline{)</xsl:text>
+                       <xsl:apply-templates/>
+                       <xsl:text>}</xsl:text>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template match="m:mrow">
+       <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="m:mstyle">
+       <xsl:if test="@displaystyle='true'">
+               <xsl:text>{\displaystyle </xsl:text>
+       </xsl:if>
+       <xsl:if test="@scriptlevel and not(@displaystyle='true')">
+               <xsl:text>{</xsl:text>
+               <xsl:choose>
+                       <xsl:when test="@scriptlevel=0"><xsl:text>\textstyle </xsl:text></xsl:when>
+                       <xsl:when test="@scriptlevel=1"><xsl:text>\scriptstyle </xsl:text></xsl:when>
+                       <xsl:otherwise><xsl:text>\scriptscriptstyle </xsl:text></xsl:otherwise> 
+               </xsl:choose> 
+       </xsl:if>       
+       <xsl:if test="@background">
+               <xsl:text>\colorbox[rgb]{</xsl:text>
+               <xsl:call-template name="color">
+                       <xsl:with-param name="color" select="@background"/>
+               </xsl:call-template>
+               <xsl:text>}{$</xsl:text>
+       </xsl:if>
+       <xsl:if test="@color or @mathcolor">
+               <xsl:variable name="color">
+                       <xsl:choose>
+                               <xsl:when test="@mathcolor"><xsl:value-of select="@mathcolor"/></xsl:when>
+                               <xsl:when test="@color"><xsl:value-of select="@color"/></xsl:when>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:text>\textcolor[rgb]{</xsl:text>
+               <xsl:call-template name="color">
+                       <xsl:with-param name="color" select="$color"/>
+               </xsl:call-template>
+               <xsl:text>}{</xsl:text>
+       </xsl:if>
+       <xsl:apply-templates/>
+       <xsl:if test="@color or @mathcolor">
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:if test="@background">
+               <xsl:text>$}</xsl:text>
+       </xsl:if>
+       <xsl:if test="@scriptlevel and not(@displaystyle='true')">
+               <xsl:text>}</xsl:text>
+       </xsl:if>       
+       <xsl:if test="@displaystyle='true'">
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+</xsl:template>
+
+<xsl:template match="m:merror">
+       <xsl:apply-templates/>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/mmlitex/mmlitex.xsl b/mmlitex/mmlitex.xsl
new file mode 100644
index 0000000..5c463ea
--- /dev/null
+++ b/mmlitex/mmlitex.xsl
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+                version='1.0'>
+                
+<xsl:output method="text" indent="no" encoding="UTF-8"/>
+
+<!-- ====================================================================== -->
+<!-- $Id: mmltex.xsl,v 1.8 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+
+<xsl:include href="tokens.xsl"/>
+<xsl:include href="glayout.xsl"/>
+<xsl:include href="scripts.xsl"/>
+<xsl:include href="tables.xsl"/>
+<xsl:include href="entities.xsl"/>
+<xsl:include href="cmarkup.xsl"/>
+
+<xsl:strip-space elements="m:*"/>
+
+<xsl:template match="m:math[not(@mode) or @mode='inline'][not(@display)] | m:math[ display='inline']">
+       <xsl:text>&#x00024; </xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>&#x00024;</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:math[ display='block'] | m:math[ mode='display'][not(@display)]">
+       <xsl:text>&#xA;\[&#xA;&#x9;</xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>&#xA;\]</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/mmlitex/scripts.xsl b/mmlitex/scripts.xsl
new file mode 100644
index 0000000..e470732
--- /dev/null
+++ b/mmlitex/scripts.xsl
@@ -0,0 +1,375 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+                version='1.0'>
+                
+<!-- ====================================================================== -->
+<!-- $Id: scripts.xsl,v 1.5 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+
+<xsl:template match="m:munderover">
+       <xsl:variable name="base" select="translate(./*[1],' ','')"/>
+       <xsl:variable name="under" select="translate(./*[2],' ','')"/>
+       <xsl:variable name="over" select="translate(./*[3],' ','')"/>
+       <xsl:choose>
+               <xsl:when test="$over='&#x000AF;'">     <!-- OverBar - over bar -->
+                       <xsl:text>\overline{</xsl:text>
+                       <xsl:call-template name="munder">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="under" select="$under"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x0FE37;'">     <!-- OverBrace - over brace -->
+                       <xsl:text>\overbrace{</xsl:text>
+                       <xsl:call-template name="munder">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="under" select="$under"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02190;'">     <!--/leftarrow /gets A: =leftward arrow -->
+                       <xsl:text>\overleftarrow{</xsl:text>
+                       <xsl:call-template name="munder">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="under" select="$under"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02192;'">     <!--/rightarrow /to A: =rightward arrow -->
+                       <xsl:text>\overrightarrow{</xsl:text>
+                       <xsl:call-template name="munder">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="under" select="$under"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02194;'">     <!--/leftrightarrow A: l&r arrow -->
+                       <xsl:text>\overleftrightarrow{</xsl:text>
+                       <xsl:call-template name="munder">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="under" select="$under"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x00332;'">    <!-- UnderBar - combining low line -->
+                       <xsl:text>\underline{</xsl:text>
+                       <xsl:call-template name="mover">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="over" select="$over"/>
+                               <xsl:with-param name="pos_over" select="3"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x0FE38;'">    <!-- UnderBrace - under brace -->
+                       <xsl:text>\underbrace{</xsl:text>
+                       <xsl:call-template name="mover">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="over" select="$over"/>
+                               <xsl:with-param name="pos_over" select="3"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x02190;'">    <!--/leftarrow /gets A: =leftward arrow -->
+                       <xsl:text>\underleftarrow{</xsl:text>
+                       <xsl:call-template name="mover">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="over" select="$over"/>
+                               <xsl:with-param name="pos_over" select="3"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x02192;'">    <!--/rightarrow /to A: =rightward arrow -->
+                       <xsl:text>\underrightarrow{</xsl:text>
+                       <xsl:call-template name="mover">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="over" select="$over"/>
+                               <xsl:with-param name="pos_over" select="3"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x02194;'">    <!--/leftrightarrow A: l&r arrow -->
+                       <xsl:text>\underleftrightarrow{</xsl:text>
+                       <xsl:call-template name="mover">
+                               <xsl:with-param name="base" select="$base"/>
+                               <xsl:with-param name="over" select="$over"/>
+                               <xsl:with-param name="pos_over" select="3"/>
+                       </xsl:call-template>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>             
+               <xsl:when test="translate($base,'&#x0220F;&#x02210;&#x022c2;&#x022c3;&#x02294;',
+                                               '&#x02211;&#x02211;&#x02211;&#x02211;&#x02211;')='&#x02211;'">
+<!-- if $base is operator, such as
+                       &#x02211;       /sum L: summation operator
+                       &#x0220F;       /prod L: product operator
+                       &#x02210;       /coprod L: coproduct operator
+                       &#x022c2;       /bigcap
+                       &#x022c3;       /bigcup
+                       &#x02294;       /bigsqcup
+-->
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>_{</xsl:text>
+                       <xsl:apply-templates select="./*[2]"/>
+                       <xsl:text>}^{</xsl:text>
+                       <xsl:apply-templates select="./*[3]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>\underset{</xsl:text>
+                       <xsl:apply-templates select="./*[2]"/>
+                       <xsl:text>}{\overset{</xsl:text>
+                       <xsl:apply-templates select="./*[3]"/>
+                       <xsl:text>}{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}}</xsl:text>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template match="m:mover">
+       <xsl:call-template name="mover">
+               <xsl:with-param name="base" select="translate(./*[1],' ','')"/>
+               <xsl:with-param name="over" select="translate(./*[2],' ','')"/>
+       </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="m:munder">
+       <xsl:call-template name="munder">
+               <xsl:with-param name="base" select="translate(./*[1],' ','')"/>
+               <xsl:with-param name="under" select="translate(./*[2],' ','')"/>
+       </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="mover">
+       <xsl:param name="base"/>
+       <xsl:param name="over"/>
+       <xsl:param name="pos_over" select="2"/>
+       <xsl:choose>
+               <xsl:when test="$over='&#x000AF;'">     <!-- OverBar - over bar -->
+                       <xsl:text>\overline{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x0FE37;'">     <!-- OverBrace - over brace -->
+                       <xsl:text>\overbrace{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02190;'">     <!--/leftarrow /gets A: =leftward arrow -->
+                       <xsl:text>\overleftarrow{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02192;'">     <!--/rightarrow /to A: =rightward arrow -->
+                       <xsl:text>\overrightarrow{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02194;'">     <!--/leftrightarrow A: l&r arrow -->
+                       <xsl:text>\overleftrightarrow{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x002DC;'">     <!-- small tilde -->
+                       <xsl:text>\tilde{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x02713;'">     <!-- /checkmark =tick, check mark -->
+                       <xsl:text>\check{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+                       <xsl:when test="$over='&#x002D9;'">     <!-- dot above -->
+                       <xsl:text>\dot{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x000A8;'">     <!-- DoubleDot - dieresis or umlaut mark -->
+                       <xsl:text>\ddot{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$over='&#x00302;' or $over='&#x0005E;'"> <!-- Hat or circ - circumflex accent 
-->
+                       <xsl:choose>
+                               <xsl:when test="@accent='true'">
+                                       <xsl:text>\widehat{</xsl:text>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:text>\hat{</xsl:text>
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:apply-templates select="./*[1]"/><xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="translate($base,'&#x0220F;&#x02210;&#x022c2;&#x022c3;&#x02294;',
+                                               '&#x02211;&#x02211;&#x02211;&#x02211;&#x02211;')='&#x02211;'">
+<!-- if $base is operator, such as
+                       &#x02211;       /sum L: summation operator
+                       &#x0220F;       /prod L: product operator
+                       &#x02210;       /coprod L: coproduct operator
+                       &#x022c2;       /bigcap
+                       &#x022c3;       /bigcup
+                       &#x02294;       /bigsqcup
+-->
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>^{</xsl:text>
+                       <xsl:apply-templates select="./*[$pos_over]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>\stackrel{</xsl:text>
+                       <xsl:apply-templates select="./*[$pos_over]"/>
+                       <xsl:text>}{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+                       <!--
+                       <xsl:text>\overset{</xsl:text>
+                       <xsl:apply-templates select="./*[$pos_over]"/>
+                       <xsl:text>}{</xsl:text> 
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>-->
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template name="munder">
+       <xsl:param name="base"/>
+       <xsl:param name="under"/>
+       <xsl:choose>
+               <xsl:when test="$under='&#x00332;'">    <!-- UnderBar - combining low line -->
+                       <xsl:text>\underline{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x0FE38;'">    <!-- UnderBrace - under brace -->
+                       <xsl:text>\underbrace{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x02190;'">    <!--/leftarrow /gets A: =leftward arrow -->
+                       <xsl:text>\underleftarrow{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x02192;'">    <!--/rightarrow /to A: =rightward arrow -->
+                       <xsl:text>\underrightarrow{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="$under='&#x02194;'">    <!--/leftrightarrow A: l&r arrow -->
+                       <xsl:text>\underleftrightarrow{</xsl:text>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:when test="translate($base,'&#x0220F;&#x02210;&#x022c2;&#x022c3;&#x02294;',
+                                               '&#x02211;&#x02211;&#x02211;&#x02211;&#x02211;')='&#x02211;'">
+<!-- if $base is operator, such as
+                       &#x02211;       /sum L: summation operator
+                       &#x0220F;       /prod L: product operator
+                       &#x02210;       /coprod L: coproduct operator
+                       &#x022c2;       /bigcap
+                       &#x022c3;       /bigcup
+                       &#x02294;       /bigsqcup
+-->
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>_{</xsl:text>
+                       <xsl:apply-templates select="./*[2]"/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>\underset{</xsl:text>         <!-- Required AmsMath package -->
+                       <xsl:apply-templates select="./*[2]"/>
+                       <xsl:text>}{</xsl:text> 
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:text>}</xsl:text>  
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template match="m:msubsup">
+       <xsl:text>{</xsl:text>  
+       <xsl:apply-templates select="./*[1]"/>
+       <xsl:text>}_{</xsl:text>
+       <xsl:apply-templates select="./*[2]"/>
+       <xsl:text>}^{</xsl:text>        
+       <xsl:apply-templates select="./*[3]"/>
+       <xsl:text>}</xsl:text>  
+</xsl:template>
+
+<xsl:template match="m:msup">
+       <xsl:text>{</xsl:text>  
+       <xsl:apply-templates select="./*[1]"/>
+       <xsl:text>}^{</xsl:text>        
+       <xsl:apply-templates select="./*[2]"/>
+       <xsl:text>}</xsl:text>  
+</xsl:template>
+
+<xsl:template match="m:msub">
+       <xsl:text>{</xsl:text>  
+       <xsl:apply-templates select="./*[1]"/>
+       <xsl:text>}_{</xsl:text>        
+       <xsl:apply-templates select="./*[2]"/>
+       <xsl:text>}</xsl:text>  
+</xsl:template>
+
+<xsl:template match="m:mmultiscripts" mode="mprescripts">
+       <xsl:for-each select="m:mprescripts/following-sibling::*">
+               <xsl:if test="position() mod 2 and local-name(.)!='none'">
+                       <xsl:text>{}_{</xsl:text>       
+                       <xsl:apply-templates select="."/>
+                       <xsl:text>}</xsl:text>  
+               </xsl:if>
+               <xsl:if test="not(position() mod 2) and local-name(.)!='none'">
+                       <xsl:text>{}^{</xsl:text>       
+                       <xsl:apply-templates select="."/>
+                       <xsl:text>}</xsl:text>  
+               </xsl:if>
+       </xsl:for-each>
+       <xsl:apply-templates select="./*[1]"/>
+       <xsl:for-each select="m:mprescripts/preceding-sibling::*[position()!=last()]">
+               <xsl:if test="position()>2 and local-name(.)!='none'">
+                       <xsl:text>{}</xsl:text> 
+               </xsl:if>
+               <xsl:if test="position() mod 2 and local-name(.)!='none'">
+                       <xsl:text>_{</xsl:text> 
+                       <xsl:apply-templates select="."/>
+                       <xsl:text>}</xsl:text>  
+               </xsl:if>
+               <xsl:if test="not(position() mod 2) and local-name(.)!='none'">
+                       <xsl:text>^{</xsl:text> 
+                       <xsl:apply-templates select="."/>
+                       <xsl:text>}</xsl:text>  
+               </xsl:if>
+       </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="m:mmultiscripts">
+       <xsl:choose>
+               <xsl:when test="m:mprescripts">
+                       <xsl:apply-templates select="." mode="mprescripts"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:apply-templates select="./*[1]"/>
+                       <xsl:for-each select="*[position()>1]">
+                               <xsl:if test="position()>2 and local-name(.)!='none'">
+                                       <xsl:text>{}</xsl:text> 
+                               </xsl:if>
+                               <xsl:if test="position() mod 2 and local-name(.)!='none'">
+                                       <xsl:text>_{</xsl:text> 
+                                       <xsl:apply-templates select="."/>
+                                       <xsl:text>}</xsl:text>  
+                               </xsl:if>
+                               <xsl:if test="not(position() mod 2) and local-name(.)!='none'">
+                                       <xsl:text>^{</xsl:text> 
+                                       <xsl:apply-templates select="."/>
+                                       <xsl:text>}</xsl:text>  
+                               </xsl:if>
+                       </xsl:for-each>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/mmlitex/tables.xsl b/mmlitex/tables.xsl
new file mode 100644
index 0000000..dace93d
--- /dev/null
+++ b/mmlitex/tables.xsl
@@ -0,0 +1,218 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+                version='1.0'>
+                
+<!-- ====================================================================== -->
+<!-- $Id: tables.xsl,v 1.5 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+
+<xsl:template match="m:mtd[ columnspan]">
+       <xsl:text>\multicolumn{</xsl:text>
+       <xsl:value-of select="@columnspan"/>
+       <xsl:text>}{c}{</xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>}</xsl:text>
+       <xsl:if test="count(following-sibling::*)>0">
+               <xsl:text>&amp; </xsl:text>
+       </xsl:if>
+</xsl:template>
+
+
+<xsl:template match="m:mtd">
+       <xsl:if test="@columnalign='right' or @columnalign='center'">
+               <xsl:text>\hfill </xsl:text>
+       </xsl:if>
+       <xsl:apply-templates/>
+       <xsl:if test="@columnalign='left' or @columnalign='center'">
+               <xsl:text>\hfill </xsl:text>
+       </xsl:if>
+</xsl:template>
+
+<xsl:template match="m:mtr">
+       <xsl:for-each select="*">
+               <xsl:apply-templates select="current()"/>
+               <xsl:if test="not(position()=last())">
+                       <xsl:text>&amp;         </xsl:text>
+               </xsl:if>
+       </xsl:for-each>
+       <xsl:if test="not(position()=last())">
+               <xsl:text>\\ </xsl:text>
+               <xsl:if test="../@rowlines">
+                       <xsl:variable name="line">
+                               <xsl:call-template name="getToken">
+                                       <xsl:with-param name="text" select="../@rowlines"/>
+                                       <xsl:with-param name="position" select="position()"/>
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:if test="$line='solid'">
+                               <xsl:text>\hline </xsl:text>
+                       </xsl:if>
+               </xsl:if>
+       </xsl:if>
+</xsl:template>
+
+<xsl:template match="m:mtable">
+       <xsl:text>\begin{array}{</xsl:text>
+       <xsl:if test="@frame='solid'">
+               <xsl:text>|</xsl:text>
+       </xsl:if>
+       <xsl:variable name="numbercols" 
select="count(./m:mtr[1]/*[not(@columnspan)])+sum(./m:mtr[1]/m:mtd/@columnspan)"/>
+       <xsl:choose>
+               <xsl:when test="@columnalign and @columnlines">
+                       <xsl:call-template name="generateAlignString">
+                               <xsl:with-param name="columnalignstring" select="@columnalign"/>
+                               <xsl:with-param name="columnlinestring" select="@columnlines"/>
+                               <xsl:with-param name="count" select="$numbercols"/>
+                       </xsl:call-template>
+               </xsl:when>
+               <xsl:when test="@columnlines">
+                       <xsl:call-template name="generateAlignString">
+                               <xsl:with-param name="columnlinestring" select="@columnlines"/>
+                               <xsl:with-param name="count" select="$numbercols"/>
+                       </xsl:call-template>
+               </xsl:when>
+               <xsl:when test="@columnalign">
+                       <xsl:call-template name="generateAlignString">
+                               <xsl:with-param name="columnalignstring" select="@columnalign"/>
+                               <xsl:with-param name="count" select="$numbercols"/>
+                       </xsl:call-template>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:call-template name="generateAlignString">
+                               <xsl:with-param name="count" select="$numbercols"/>
+                               </xsl:call-template>
+               </xsl:otherwise>
+       </xsl:choose>
+       <xsl:if test="@frame='solid'">
+               <xsl:text>|</xsl:text>
+       </xsl:if>
+       <xsl:text>}</xsl:text>
+       <xsl:if test="@frame='solid'">
+               <xsl:text>\hline </xsl:text>
+       </xsl:if>
+       <xsl:apply-templates/>
+       <xsl:if test="@frame='solid'">
+               <xsl:text>\\ \hline</xsl:text>
+       </xsl:if>
+       <xsl:text>\end{array}</xsl:text>
+</xsl:template>
+
+<xsl:template name="colalign">
+       <xsl:param name="colalign"/>
+       <xsl:choose>
+               <xsl:when test="contains($colalign,' ')">
+                       <xsl:value-of select="substring($colalign,1,1)"/>
+                       <xsl:call-template name="colalign">
+                               <xsl:with-param name="colalign" select="substring-after($colalign,' ')"/>
+                       </xsl:call-template>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:value-of select="substring($colalign,1,1)"/>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate-string">
+<!-- template from XSLT Standard Library v1.1 -->
+    <xsl:param name="text"/>
+    <xsl:param name="count"/>
+
+    <xsl:choose>
+      <xsl:when test="string-length($text) = 0 or $count &lt;= 0"/>
+
+      <xsl:otherwise>
+       <xsl:value-of select="$text"/>
+       <xsl:call-template name="generate-string">
+         <xsl:with-param name="text" select="$text"/>
+         <xsl:with-param name="count" select="$count - 1"/>
+       </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generateAlignString">
+       <xsl:param name="columnalignstring">center</xsl:param>
+       <xsl:param name="columnlinestring"/>
+       <xsl:param name="count"/>
+       <xsl:choose>
+               <xsl:when test="$count &lt;= 0"/>
+               <xsl:otherwise>
+                       <xsl:variable name="columnalign">
+                               <xsl:call-template name="getToken">
+                                       <xsl:with-param name="text" select="$columnalignstring"/>
+                                       <xsl:with-param name="position" select="1"/>
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:variable name="columnline">
+                               <xsl:call-template name="getToken">
+                                       <xsl:with-param name="text" select="$columnlinestring"/>
+                                       <xsl:with-param name="position" select="1"/>
+                               </xsl:call-template>
+                       </xsl:variable>
+       <xsl:value-of select="substring($columnalign,1,1)"/>
+       <xsl:if test="$columnline='solid' and $count>1"><xsl:text>|</xsl:text></xsl:if>
+       <xsl:variable name="leftPartOrLastTokenA">
+               <xsl:choose>
+                       <xsl:when test="substring-after($columnalignstring,' ')">
+                                               <xsl:value-of select="substring-after($columnalignstring,' 
')"/>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="$columnalignstring"/>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+       </xsl:variable>
+       <xsl:variable name="leftPartOrLastTokenB">
+               <xsl:choose>
+                       <xsl:when test="substring-after($columnlinestring,' ')">
+                                               <xsl:value-of select="substring-after($columnlinestring,' 
')"/>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="$columnlinestring"/>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+       </xsl:variable>
+                       <xsl:call-template name="generateAlignString">
+                               <xsl:with-param name="columnalignstring" select="$leftPartOrLastTokenA"/>
+                               <xsl:with-param name="columnlinestring" select="$leftPartOrLastTokenB"/>
+                               <xsl:with-param name="count" select="$count - 1"/>
+                       </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="getToken">
+    <xsl:param name="text"/>
+    <xsl:param name="char" select="string(' ')"/>
+    <xsl:param name="position"/>
+    <xsl:choose>
+      <xsl:when test="$position = 1 or not(contains($text ,$char))">
+        <xsl:choose>
+          <xsl:when test="contains($text ,$char)">
+            <xsl:value-of select="substring-before($text,$char)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$text"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="contains($text ,$char) and $position &gt; 1">
+        <xsl:variable name="last" select="substring-after($text,$char)"/>
+        <xsl:choose>
+          <xsl:when test="$position &gt; 1">
+            <xsl:call-template name="getToken">
+              <xsl:with-param name="text" select="$last"/>
+              <xsl:with-param name="char" select="$char"/>
+              <xsl:with-param name="position" select="$position - 1"/>
+            </xsl:call-template>
+          </xsl:when>
+        </xsl:choose>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/mmlitex/tokens.xsl b/mmlitex/tokens.xsl
new file mode 100644
index 0000000..9ec95ac
--- /dev/null
+++ b/mmlitex/tokens.xsl
@@ -0,0 +1,342 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+               xmlns:m="http://www.w3.org/1998/Math/MathML";
+                version='1.0'>
+                
+<!-- ====================================================================== -->
+<!-- $Id: tokens.xsl,v 1.9 2005/02/28 18:50:45 shade33 Exp $
+     This file is part of the XSLT MathML Library distribution.
+     See ./README or http://xsltml.sf.net for
+     copyright and other information                                        -->
+<!-- ====================================================================== -->
+
+<xsl:template match="m:mi|m:mn|m:mo|m:mtext|m:ms">
+       <xsl:call-template name="CommonTokenAtr"/>
+</xsl:template>
+
+<!-- 3.2.9 mglyph -->
+<xsl:template match="m:mglyph">
+       <xsl:text>\textcolor{red}{</xsl:text>
+       <xsl:value-of select="@alt"/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template name="mi">
+       <xsl:variable name="op">
+               <xsl:value-of select="concat(' ',normalize-space(.),' ')"/>
+       </xsl:variable>
+       <xsl:choose>
+               <xsl:when test="contains(' arccos cos csc exp ker limsup min sinh arcsin cosh deg gcd lg ln 
Pr sup arctan cot det hom lim log sec tan arg coth dim inf liminf max sin tanh ',$op)">
+                       <xsl:text>\</xsl:text>
+                               <xsl:value-of select="normalize-space(.)"/>
+                       <xsl:text> </xsl:text>
+               </xsl:when>     
+               <xsl:when test="string-length(normalize-space(.))>1 and not(@mathvariant)">
+                       <xsl:text>\mathrm{</xsl:text>
+                               <xsl:apply-templates/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:apply-templates/>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template name="mn">
+       <xsl:choose>
+               <xsl:when test="string(number(.))='NaN' and not(@mathvariant)">
+                       <xsl:text>\mathrm{</xsl:text>
+                               <xsl:apply-templates/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:apply-templates/>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<!-- 3.2.5 Math Operator -->
+<xsl:template name="mo">
+<xsl:if test="translate(normalize-space(.),'()[]}|','{{{{{{')='{'">
+               <xsl:choose>
+       <xsl:when test="not(@stretchy='false') and 
count(preceding-sibling::m:mo[translate(normalize-space(.),'()[]}|','{{{{{{')='{'])mod 2=0 and 
following-sibling::m:mo[1][not(@stretchy='false')][translate(normalize-space(.),'()[]}|','{{{{{{')='{']">
+                       <xsl:text>\left</xsl:text>
+               </xsl:when>
+               <xsl:when test="not(@stretchy='false') and 
count(preceding-sibling::m:mo[translate(normalize-space(.),'()[]}|','{{{{{{')='{'])mod 2=1 and 
preceding-sibling::m:mo[1][not(@stretchy='false')][translate(normalize-space(.),'()[]}|','{{{{{{')='{']">
+                       <xsl:text>\right</xsl:text>
+               </xsl:when>
+       </xsl:choose>
+</xsl:if>
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template name="mtext">
+       <xsl:variable name="content">
+               <xsl:call-template name="replaceMtextEntities">
+                       <xsl:with-param name="content" select="normalize-space(.)"/>
+               </xsl:call-template>
+       </xsl:variable>
+       <xsl:text>\text{</xsl:text>
+       <xsl:value-of select="$content"/>
+       <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:mspace">
+       <xsl:text>\phantom{\rule</xsl:text>
+       <xsl:if test="@depth">
+               <xsl:text>[-</xsl:text>
+               <xsl:value-of select="@depth"/>
+               <xsl:text>]</xsl:text>
+       </xsl:if>
+       <xsl:text>{</xsl:text>
+       <xsl:if test="not(@width)">
+               <xsl:text>0ex</xsl:text>
+       </xsl:if>
+       <xsl:value-of select="@width"/>
+       <xsl:text>}{</xsl:text>
+       <xsl:if test="not(@height)">
+               <xsl:text>0ex</xsl:text>
+       </xsl:if>
+       <xsl:value-of select="@height"/>
+       <xsl:text>}}</xsl:text>
+</xsl:template>
+
+<xsl:template name="ms">
+       <xsl:choose>
+               <xsl:when test="@lquote"><xsl:value-of select="@lquote"/></xsl:when>
+               <xsl:otherwise><xsl:text>''</xsl:text></xsl:otherwise>
+       </xsl:choose><xsl:apply-templates/><xsl:choose>
+               <xsl:when test="@rquote"><xsl:value-of select="@rquote"/></xsl:when>
+               <xsl:otherwise><xsl:text>''</xsl:text></xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template name="CommonTokenAtr">
+       <xsl:if test="@mathbackground">
+               <xsl:text>\colorbox[rgb]{</xsl:text>
+               <xsl:call-template name="color">
+                       <xsl:with-param name="color" select="@mathbackground"/>
+               </xsl:call-template>
+               <xsl:text>}{$</xsl:text>
+       </xsl:if>
+       <xsl:if test="@color or @mathcolor"> <!-- Note: @color is deprecated in MathML 2.0 -->
+               <xsl:variable name="color">
+               <xsl:choose>
+                       <xsl:when test="@mathcolor"><xsl:value-of select="@mathcolor"/></xsl:when>
+                       <xsl:when test="@color"><xsl:value-of select="@color"/></xsl:when>
+               </xsl:choose>
+               </xsl:variable>
+               <xsl:text>\textcolor[rgb]{</xsl:text>
+               <xsl:call-template name="color">
+                       <xsl:with-param name="color" select="$color"/>
+               </xsl:call-template>
+               <xsl:text>}{</xsl:text>
+       </xsl:if>
+       <xsl:if test="@mathvariant">
+               <xsl:choose>
+                       <xsl:when test="@mathvariant='normal'">
+                               <xsl:text>\mathrm{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='bold'">
+                               <xsl:text>\mathbf{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='italic'">
+                               <xsl:text>\mathit{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='bold-italic'"> <!-- not supported -->
+                               <xsl:text>\mathit{</xsl:text>
+                               <xsl:message>The value bold-italic for mathvariant is not 
supported</xsl:message>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='double-struck'">  <!-- Required amsfonts -->
+                               <xsl:text>\mathbb{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='bold-fraktur'"> <!-- not supported -->
+                               <xsl:text>\mathfrak{</xsl:text>
+                               <xsl:message>The value bold-fraktur for mathvariant is not 
supported</xsl:message>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='script'">
+                               <xsl:text>\mathcal{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='bold-script'"> <!-- not supported -->
+                               <xsl:text>\mathcal{</xsl:text>
+                               <xsl:message>The value bold-script for mathvariant is not 
supported</xsl:message>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='fraktur'">        <!-- Required amsfonts -->
+                               <xsl:text>\mathfrak{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='sans-serif'">
+                               <xsl:text>\mathsf{</xsl:text>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='bold-sans-serif'"> <!-- not supported -->
+                               <xsl:text>\mathsf{</xsl:text>
+                               <xsl:message>The value bold-sans-serif for mathvariant is not 
supported</xsl:message>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='sans-serif-italic'"> <!-- not supported -->
+                               <xsl:text>\mathsf{</xsl:text>
+                               <xsl:message>The value sans-serif-italic for mathvariant is not 
supported</xsl:message>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='sans-serif-bold-italic'"> <!-- not supported -->
+                               <xsl:text>\mathsf{</xsl:text>
+                               <xsl:message>The value sans-serif-bold-italic for mathvariant is not 
supported</xsl:message>
+                       </xsl:when>
+                       <xsl:when test="@mathvariant='monospace'">
+                               <xsl:text>\mathtt{</xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text>{</xsl:text>
+                               <xsl:message>Error at mathvariant attribute</xsl:message>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:if>
+       <xsl:call-template name="selectTemplate"/>
+       <xsl:if test="@mathvariant">
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:if test="@color or @mathcolor">
+               <xsl:text>}</xsl:text>
+       </xsl:if>
+       <xsl:if test="@mathbackground">
+               <xsl:text>$}</xsl:text>
+       </xsl:if>
+</xsl:template>
+
+<xsl:template name="selectTemplate">
+       <xsl:choose>
+               <xsl:when test="local-name(.)='mi'">
+                       <xsl:call-template name="mi"/>
+               </xsl:when>
+               <xsl:when test="local-name(.)='mn'">
+                       <xsl:call-template name="mn"/>
+               </xsl:when>
+               <xsl:when test="local-name(.)='mo'">
+                       <xsl:call-template name="mo"/>
+               </xsl:when>
+               <xsl:when test="local-name(.)='mtext'">
+                       <xsl:call-template name="mtext"/>
+               </xsl:when>
+               <xsl:when test="local-name(.)='ms'">
+                       <xsl:call-template name="ms"/>
+               </xsl:when>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template name="color">
+<!-- NB: Variables colora and valueColor{n} only for Sablotron -->
+       <xsl:param name="color"/>
+       <xsl:variable name="colora" 
select="translate($color,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
+       <xsl:choose>
+       <xsl:when test="starts-with($colora,'#') and string-length($colora)=4">
+               <xsl:variable name="valueColor">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,2,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of select="$valueColor div 15"/><xsl:text>,</xsl:text>
+               <xsl:variable name="valueColor1">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,3,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of select="$valueColor1 div 15"/><xsl:text>,</xsl:text>
+               <xsl:variable name="valueColor2">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,4,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of select="$valueColor2 div 15"/>
+       </xsl:when>
+       <xsl:when test="starts-with($colora,'#') and string-length($colora)=7">
+               <xsl:variable name="valueColor1">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,2,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:variable name="valueColor2">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,3,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of select="($valueColor1*16 + $valueColor2) div 255"/><xsl:text>,</xsl:text>
+               <xsl:variable name="valueColor1a">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,4,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:variable name="valueColor2a">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,5,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of select="($valueColor1a*16 + $valueColor2a) div 255"/><xsl:text>,</xsl:text>
+               <xsl:variable name="valueColor1b">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,6,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:variable name="valueColor2b">
+                       <xsl:call-template name="Hex2Decimal">
+                               <xsl:with-param name="arg" select="substring($colora,7,1)"/>
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of select="($valueColor1b*16 + $valueColor2b) div 255"/>
+       </xsl:when>
+<!-- ======================= if color specifed as an html-color-name 
========================================== -->
+       <xsl:when test="$colora='aqua'"><xsl:text>0,1,1</xsl:text></xsl:when>
+       <xsl:when test="$colora='black'"><xsl:text>0,0,0</xsl:text></xsl:when>
+       <xsl:when test="$colora='blue'"><xsl:text>0,0,1</xsl:text></xsl:when>
+       <xsl:when test="$colora='fuchsia'"><xsl:text>1,0,1</xsl:text></xsl:when>
+       <xsl:when test="$colora='gray'"><xsl:text>.5,.5,.5</xsl:text></xsl:when>
+       <xsl:when test="$colora='green'"><xsl:text>0,.5,0</xsl:text></xsl:when>
+       <xsl:when test="$colora='lime'"><xsl:text>0,1,0</xsl:text></xsl:when>
+       <xsl:when test="$colora='maroon'"><xsl:text>.5,0,0</xsl:text></xsl:when>
+       <xsl:when test="$colora='navy'"><xsl:text>0,0,.5</xsl:text></xsl:when>
+       <xsl:when test="$colora='olive'"><xsl:text>.5,.5,0</xsl:text></xsl:when>
+       <xsl:when test="$colora='purple'"><xsl:text>.5,0,.5</xsl:text></xsl:when>
+       <xsl:when test="$colora='red'"><xsl:text>1,0,0</xsl:text></xsl:when>
+       <xsl:when test="$colora='silver'"><xsl:text>.75,.75,.75</xsl:text></xsl:when>
+       <xsl:when test="$colora='teal'"><xsl:text>0,.5,.5</xsl:text></xsl:when>
+       <xsl:when test="$colora='white'"><xsl:text>1,1,1</xsl:text></xsl:when>
+       <xsl:when test="$colora='yellow'"><xsl:text>1,1,0</xsl:text></xsl:when>
+       <xsl:otherwise>
+               <xsl:message>Exception at color template</xsl:message>
+       </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template name="Hex2Decimal">
+       <xsl:param name="arg"/>
+       <xsl:choose>
+               <xsl:when test="$arg='f'">
+                       <xsl:value-of select="15"/>
+               </xsl:when>
+               <xsl:when test="$arg='e'">
+                       <xsl:value-of select="14"/>
+               </xsl:when>
+               <xsl:when test="$arg='d'">
+                       <xsl:value-of select="13"/>
+               </xsl:when>
+               <xsl:when test="$arg='c'">
+                       <xsl:value-of select="12"/>
+               </xsl:when>
+               <xsl:when test="$arg='b'">
+                       <xsl:value-of select="11"/>
+               </xsl:when>
+               <xsl:when test="$arg='a'">
+                       <xsl:value-of select="10"/>
+               </xsl:when>
+               <xsl:when test="translate($arg, '0123456789', '9999999999')='9'"> <!-- if $arg is number -->
+                       <xsl:value-of select="$arg"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:message>Exception at Hex2Decimal template</xsl:message>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+<xsl:template match="m:*/text()">
+       <xsl:call-template name="replaceEntities">
+               <xsl:with-param name="content" select="normalize-space()"/>
+       </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 7f19482..64b33c6 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -8,3 +8,8 @@ SUBDIRS = \
        reg_linear \
        reg_logfit \
        smoothing
+
+if GOFFICE_WITH_LASEM
+SUBDIRS += \
+       lasem
+endif
diff --git a/plugins/lasem/Makefile.am b/plugins/lasem/Makefile.am
new file mode 100644
index 0000000..7db792e
--- /dev/null
+++ b/plugins/lasem/Makefile.am
@@ -0,0 +1,19 @@
+goffice_lasemdir = $(goffice_plugindir)/lasem
+xmldir  = $(goffice_lasemdir)
+
+goffice_lasem_LTLIBRARIES = lasem.la
+lasem_la_LDFLAGS = -module $(GOFFICE_PLUGIN_FLAGS)
+lasem_la_LIBADD = $(GOFFICE_PLUGIN_LIBADD)
+
+lasem_la_SOURCES =     \
+       component.c
+
+xml_in_files = plugin.xml.in
+xml_DATA = $(xml_in_files:.xml.in=.xml)
+
+ INTLTOOL_XML_RULE@
+
+EXTRA_DIST = $(xml_in_files)
+DISTCLEANFILES = $(xml_in_files:.xml.in=.xml)
+
+include $(top_srcdir)/goffice-plugins.mk
diff --git a/plugins/lasem/component.c b/plugins/lasem/component.c
new file mode 100644
index 0000000..3885540
--- /dev/null
+++ b/plugins/lasem/component.c
@@ -0,0 +1,471 @@
+/*
+ * Lasem GOffice component
+ * component.c
+ *
+ * Copyright (C) 2014 by Jean Bréfort <jean brefort normalesup org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include <goffice/goffice-config.h>
+#include <goffice/goffice.h>
+#include <goffice/app/module-plugin-defs.h>
+#include <gsf/gsf-impl-utils.h>
+#include <glib/gi18n-lib.h>
+#include <lsmdom.h>
+#include <string.h>
+
+GOPluginModuleDepend const go_plugin_depends [] = {
+       { "goffice", GOFFICE_API_VERSION }
+};
+GOPluginModuleHeader const go_plugin_header =
+       { GOFFICE_MODULE_PLUGIN_MAGIC_NUMBER, G_N_ELEMENTS (go_plugin_depends) };
+
+G_MODULE_EXPORT void go_plugin_init (GOPlugin *plugin, GOCmdContext *cc);
+G_MODULE_EXPORT void go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc);
+
+typedef struct {
+       GOComponent parent;
+
+       char *itex;
+       char *font;
+       GOColor color;
+       gboolean compact;
+       PangoFontDescription *desc;
+
+       LsmDomDocument *mathml;
+       LsmDomNode *math_element;
+       LsmDomNode *style_element;
+       LsmDomNode *itex_element;
+       LsmDomNode *itex_string;
+       LsmDomView *view;
+} GoLasemComponent;
+
+typedef GOComponentClass GoLasemComponentClass;
+
+#define GO_TYPE_LASEM_COMPONENT        (go_lasem_component_get_type ())
+#define GO_LASEM_COMPONENT(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_LASEM_COMPONENT, 
GoLasemComponent))
+#define GO_IS_LASEM_COMPONENT(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_LASEM_COMPONENT))
+
+GType go_lasem_component_get_type (void);
+
+static GObjectClass *parent_klass;
+
+enum {
+       LASEM_PROP_0,
+       LASEM_PROP_ITEX,
+       LASEM_PROP_COLOR,
+       LASEM_PROP_FONT,
+};
+
+static void
+go_lasem_component_update_style (GoLasemComponent *equation)
+{
+       LsmDomElement *style_element;
+       char *value;
+       double width, height, baseline;
+
+       if (equation->style_element == NULL) {
+               LsmDomNode *child;
+               equation->style_element = LSM_DOM_NODE (lsm_dom_document_create_element (equation->mathml, 
"mstyle"));
+               /* put all document children into the mstyle element */
+               while ((child = lsm_dom_node_get_first_child (equation->math_element))) {
+                       lsm_dom_node_remove_child (equation->math_element, child);
+                       lsm_dom_node_append_child (equation->style_element, child);
+               }
+               lsm_dom_node_append_child (equation->math_element, equation->style_element);
+       }
+       style_element = LSM_DOM_ELEMENT (equation->style_element);
+       lsm_dom_element_set_attribute (LSM_DOM_ELEMENT (equation->style_element), "displaystyle",
+                                      equation->compact ? "false" : "true");
+       if (pango_font_description_get_weight (equation->desc) >= PANGO_WEIGHT_BOLD) {
+               if (pango_font_description_get_style (equation->desc) == PANGO_STYLE_NORMAL)
+                       lsm_dom_element_set_attribute (style_element, "mathvariant", "bold");
+               else
+                       lsm_dom_element_set_attribute (style_element, "mathvariant", "bold-italic");
+       } else {
+               if (pango_font_description_get_style (equation->desc) == PANGO_STYLE_NORMAL)
+                       lsm_dom_element_set_attribute (style_element, "mathvariant", "normal");
+               else
+                       lsm_dom_element_set_attribute (style_element, "mathvariant", "italic");
+       }
+
+       lsm_dom_element_set_attribute (style_element, "mathfamily",
+                                      pango_font_description_get_family (equation->desc));
+
+       value = g_strdup_printf ("%gpt", pango_units_to_double (
+                       pango_font_description_get_size (equation->desc)));
+       lsm_dom_element_set_attribute (style_element, "mathsize", value);
+       g_free (value);
+       value = g_strdup_printf ("#%02x%02x%02x",
+                                GO_COLOR_UINT_R (equation->color),
+                                GO_COLOR_UINT_G (equation->color),
+                                GO_COLOR_UINT_B (equation->color));
+       lsm_dom_element_set_attribute (style_element, "mathcolor", value);
+       g_free (value);
+       if (equation->view) {
+       lsm_dom_view_get_size (equation->view, &width, &height, &baseline);
+               equation->parent.width = width / 72.;
+               equation->parent.height = height / 72.;
+               equation->parent.ascent = baseline / 72.;
+               equation->parent.descent = equation->parent.height - equation->parent.ascent;
+       }
+}
+
+static void
+update_equation (GoLasemComponent *equation)
+{
+       if (equation->itex != NULL && !g_utf8_validate (equation->itex, -1, NULL)) {
+               g_free (equation->itex);
+               equation->itex = NULL;
+       }
+       if (equation->itex != NULL) {
+               if (equation->itex_element == NULL) {
+                       if (equation->mathml != NULL)
+                               g_object_unref (equation->mathml);
+                       equation->mathml = lsm_dom_implementation_create_document (NULL, "math");
+                       equation->math_element = LSM_DOM_NODE (lsm_dom_document_create_element 
(equation->mathml, "math"));
+                       equation->style_element = LSM_DOM_NODE (lsm_dom_document_create_element 
(equation->mathml, "mstyle"));
+                       equation->itex_element = LSM_DOM_NODE (lsm_dom_document_create_element 
(equation->mathml, "lasem:itex"));
+                       equation->itex_string = LSM_DOM_NODE (lsm_dom_document_create_text_node 
(equation->mathml, equation->itex));
+
+                       lsm_dom_node_append_child (LSM_DOM_NODE (equation->mathml), equation->math_element);
+                       lsm_dom_node_append_child (equation->math_element, equation->style_element);
+                       lsm_dom_node_append_child (equation->style_element, equation->itex_element);
+                       lsm_dom_node_append_child (equation->itex_element, equation->itex_string);
+                       if (equation->view != NULL)
+                               g_object_unref (equation->view);
+                       equation->view = lsm_dom_document_create_view (equation->mathml);
+               } else
+                       lsm_dom_node_set_node_value (equation->itex_string, equation->itex);
+               go_lasem_component_update_style (equation);
+       }
+}
+
+#ifdef GOFFICE_WITH_GTK
+
+struct LasemEditorState {
+       GoLasemComponent *equation;
+       GoMathEditor *gme;
+       GOFontSel *fontsel;
+};
+
+static void
+response_cb (GtkWidget *w, int id, struct LasemEditorState *state)
+{
+       if (id == GTK_RESPONSE_ACCEPT) {
+               if (state->equation->desc)
+                       pango_font_description_free (state->equation->desc);
+               state->equation->desc = go_font_sel_get_font_desc (state->fontsel);
+               g_free (state->equation->font);
+               state->equation->font = pango_font_description_to_string (state->equation->desc);
+               state->equation->color = go_font_sel_get_color (state->fontsel);
+               g_free (state->equation->itex);
+               state->equation->itex = go_math_editor_get_itex (state->gme);
+               state->equation->compact = go_math_editor_get_inline (state->gme);
+               update_equation (state->equation);
+               go_component_emit_changed (GO_COMPONENT (state->equation));
+       }
+       gtk_widget_destroy (w);
+}
+
+static GtkWindow *
+go_lasem_component_edit (GOComponent *component)
+{
+       GtkWidget *label, *notebook, *w, *window;
+       GtkContainer *c;
+       struct LasemEditorState *state = g_new0 (struct LasemEditorState, 1);
+
+       state->equation = GO_LASEM_COMPONENT (component);
+       window = gtk_dialog_new_with_buttons (_("Equation editor"), NULL, 0,
+                                             GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
+                                             GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+                                             NULL);
+       c = GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (window)));
+       notebook = gtk_notebook_new ();
+       g_object_set (notebook, "border-width", 6, NULL);
+       gtk_container_add (c, notebook);
+       label = gtk_label_new (_("Contents"));
+       w = go_math_editor_new ();
+       state->gme = GO_MATH_EDITOR (w);
+       go_math_editor_set_itex (state->gme, state->equation->itex);
+       go_math_editor_set_inline (state->gme, state->equation->compact);
+       gtk_notebook_append_page (GTK_NOTEBOOK (notebook), w, label);
+       /* add a font selector if needed */
+       if (!go_component_get_use_font_from_app (component)) {
+               w = g_object_new (GO_TYPE_FONT_SEL, "show-color", TRUE,"border-width", 12, NULL);
+               go_font_sel_set_font_desc (GO_FONT_SEL (w), state->equation->desc);
+               state->fontsel = (GOFontSel *) w;
+               label = gtk_label_new (_("Font"));
+               gtk_notebook_append_page (GTK_NOTEBOOK (notebook), w, label);
+       }
+       /* add a text layout page and show it if not inline */
+       gtk_widget_show_all ((GtkWidget *) window);
+       if (go_component_get_inline (component))
+               gtk_widget_hide (w);
+       g_signal_connect (window, "response", G_CALLBACK (response_cb), state);
+       g_object_set_data_full (G_OBJECT (window), "state", state, g_free);
+       return GTK_WINDOW (window);
+}
+#endif
+
+static gboolean
+go_lasem_component_get_data (GOComponent *component, gpointer *data, int *length,
+                             GDestroyNotify *clearfunc, gpointer *user_data)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (component);
+       if (equation->itex) {
+               char *buf;
+               char const *start, *end;
+               if (equation->compact)
+                       start = end = "$";
+               else {
+                       start = "\\[";
+                       end = "\\]";
+               }
+               buf = g_strconcat (start, equation->itex, end, NULL);
+               *data = lsm_itex_to_mathml (buf, strlen (buf));
+               g_free (buf);
+               *length = strlen (*data);
+               *clearfunc = (GDestroyNotify) lsm_itex_free_mathml_buffer;
+               *user_data = *data;
+               return TRUE;
+       }
+       return FALSE;
+}
+
+static void
+go_lasem_component_set_data (GOComponent *component)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (component);
+       LsmDomNodeList *list;
+       LsmDomNode *node;
+       unsigned i, max;
+
+       g_object_unref (equation->mathml);
+       if (equation->view) {
+               g_object_unref (equation->view);
+               equation->view = NULL;
+       }
+       equation->math_element = NULL;
+       equation->style_element = NULL;
+       equation->mathml = lsm_dom_document_new_from_memory (component->data, component->length, NULL);
+       if (equation->mathml == NULL)
+               return;
+       if (equation->itex == NULL) {
+               char buf[component->length + 1];
+               memcpy (buf, component->data, component->length);
+               buf[component->length] = 0;
+               go_mathml_to_itex (buf, &equation->itex, NULL, &equation->compact, NULL);
+       }
+       equation->math_element = LSM_DOM_NODE (lsm_dom_document_get_document_element (equation->mathml));
+       list = lsm_dom_node_get_child_nodes (equation->math_element);
+       max = lsm_dom_node_list_get_length (list);
+       for (i = 0; i < max; i++) {
+               node = lsm_dom_node_list_get_item (list, i);
+               if (!strcmp (lsm_dom_node_get_node_name (node), "mstyle"))
+                       equation->style_element = node;
+       }
+       equation->view = lsm_dom_document_create_view (equation->mathml);
+       go_lasem_component_update_style (equation);
+}
+
+static void
+go_lasem_component_render (GOComponent *component, cairo_t *cr,
+                           double width, double height)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (component);
+       double zoom;
+
+       if (equation->mathml == NULL || component->height == 0 || component->width == 0)
+               return;
+       zoom = MAX (width / component->width, height / component->height) / 72.;
+       cairo_save (cr);
+       cairo_scale (cr,zoom, zoom);
+       lsm_dom_view_render (equation->view, cr, 0., 0.);
+       cairo_restore (cr);
+}
+
+static gboolean
+go_lasem_component_set_font (GOComponent *component, PangoFontDescription const *desc)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (component);
+       if (desc != NULL) {
+               g_free (equation->font);
+               if (equation->desc)
+                       pango_font_description_free (equation->desc);
+               equation->font = pango_font_description_to_string (desc);
+               equation->desc = pango_font_description_copy (desc);
+               go_lasem_component_update_style (equation);
+       }
+       return TRUE;
+}
+
+static void
+go_lasem_component_init (GOComponent *component)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (component);
+       PangoFontDescription *desc;
+       equation->itex = NULL;
+
+       equation->mathml = lsm_dom_implementation_create_document (NULL, "math");
+       equation->math_element = LSM_DOM_NODE (lsm_dom_document_create_element (equation->mathml, "math"));
+       equation->style_element = LSM_DOM_NODE (lsm_dom_document_create_element (equation->mathml, "mstyle"));
+
+       lsm_dom_node_append_child (LSM_DOM_NODE (equation->mathml), equation->math_element);
+       lsm_dom_node_append_child (equation->math_element, equation->style_element);
+
+       component->resizable = FALSE;
+       component->editable = TRUE;
+       component->snapshot_type = GO_SNAPSHOT_SVG;
+       equation->color = GO_COLOR_BLACK;
+       desc = pango_font_description_from_string ("Sans 10");
+       go_lasem_component_set_font (component, desc);
+       pango_font_description_free (desc);
+}
+
+static void
+go_lasem_component_set_property (GObject *obj, guint param_id,
+                                 GValue const *value, GParamSpec *pspec)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (obj);
+
+       switch (param_id) {
+               case LASEM_PROP_ITEX:
+                       g_free (equation->itex);
+                       equation->itex = g_value_dup_string (value);
+                       break;
+               case LASEM_PROP_COLOR:
+                       if (!go_color_from_str (g_value_get_string (value), &(equation->color)))
+                               equation->color = GO_COLOR_BLACK;
+                       break;
+               case LASEM_PROP_FONT: {
+                       PangoFontDescription *desc = pango_font_description_from_string (g_value_get_string 
(value));
+                       go_lasem_component_set_font (GO_COMPONENT (obj), desc);
+                       pango_font_description_free (desc);
+                       break;
+               }
+
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
+                       return;
+       }
+}
+
+static void
+go_lasem_component_get_property (GObject *obj, guint param_id,
+                                 GValue *value, GParamSpec *pspec)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (obj);
+
+       switch (param_id) {
+               case LASEM_PROP_ITEX :
+                       g_value_set_string (value, equation->itex);
+                       break;
+               case LASEM_PROP_COLOR: {
+                       char *str = go_color_as_str (equation->color);
+                       g_value_set_string (value, str);
+                       g_free (str);
+               }
+                       break;
+               case LASEM_PROP_FONT:
+                       g_value_set_string (value,
+                                           go_component_get_use_font_from_app (GO_COMPONENT (obj))?
+                                           "Sans 10": equation->font);
+                       break;
+
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
+                       break;
+       }
+}
+
+static void
+go_lasem_component_finalize (GObject *object)
+{
+       GoLasemComponent *equation = GO_LASEM_COMPONENT (object);
+
+       if (equation->mathml)
+               g_object_unref (equation->mathml);
+       if (equation->view)
+               g_object_unref (equation->view);
+       if (equation->desc)
+               pango_font_description_free (equation->desc);
+       g_free (equation->itex);
+       g_free (equation->font);
+       ((GObjectClass *) parent_klass)->finalize (object);
+}
+
+static void
+go_lasem_component_class_init (GOComponentClass *klass)
+{
+       GObjectClass *obj_klass = (GObjectClass *) klass;
+
+       obj_klass->finalize = go_lasem_component_finalize;
+       obj_klass->get_property = go_lasem_component_get_property;
+       obj_klass->set_property = go_lasem_component_set_property;
+
+       parent_klass = (GObjectClass*) g_type_class_peek_parent (klass);
+       g_object_class_install_property (obj_klass, LASEM_PROP_ITEX,
+               g_param_spec_string ("itex",
+                                    _("Itex markup"),
+                                    _("Itex markup string"),
+                                    NULL,
+                                    GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
+       g_object_class_install_property (obj_klass, LASEM_PROP_COLOR,
+               g_param_spec_string ("color",
+                                     _("Color"),
+                                     _("Default font color"),
+                                     "0:0:0:FF",
+                                     GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
+       g_object_class_install_property (obj_klass, LASEM_PROP_FONT,
+               g_param_spec_string ("font",
+                                     _("Font"),
+                                     _("Default font"),
+                                     "Sans 10",
+                                     GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
+
+       klass->get_data = go_lasem_component_get_data;
+       klass->set_data = go_lasem_component_set_data;
+       klass->render = go_lasem_component_render;
+#ifdef GOFFICE_WITH_GTK
+       klass->edit = go_lasem_component_edit;
+#endif
+       klass->set_font = go_lasem_component_set_font;
+}
+
+GSF_DYNAMIC_CLASS (GoLasemComponent, go_lasem_component,
+       go_lasem_component_class_init, go_lasem_component_init,
+       GO_TYPE_COMPONENT)
+
+/*************************************************************************************/
+
+G_MODULE_EXPORT void
+go_plugin_init (GOPlugin *plugin, G_GNUC_UNUSED GOCmdContext *cc)
+{
+       GTypeModule *module;
+
+       module = go_plugin_get_type_module (plugin);
+       go_lasem_component_register_type (module);
+
+       go_components_set_mime_suffix ("application/mathml+xml", "*.mml");
+}
+
+G_MODULE_EXPORT void
+go_plugin_shutdown (G_GNUC_UNUSED GOPlugin *plugin,
+                   G_GNUC_UNUSED GOCmdContext *cc)
+{
+}
diff --git a/plugins/lasem/plugin.xml.in b/plugins/lasem/plugin.xml.in
new file mode 100644
index 0000000..bcbe3c6
--- /dev/null
+++ b/plugins/lasem/plugin.xml.in
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin id="GOffice_lasem">
+       <information>
+               <_name>Component : Lasem</_name>
+               <_description>Math equation support</_description>
+       </information>
+       <loader type="Gnumeric_Builtin:module">
+               <attribute name="module_file" value="lasem"/>
+       </loader>
+       <services>
+               <service type="component_engine" id="GoLasemComponent">
+                       <information>
+                               <_description>Math equation component engine</_description>
+                       </information>
+               </service>
+               <service type="component_type" id="GoLasemComponent">
+                       <mime_type name="application/mathml+xml" priority="full"/>
+                       <information>
+                               <_description>Equation</_description>
+                       </information>
+               </service>
+       </services>
+</plugin>
diff --git a/plugins/plot_barcol/gog-line.c b/plugins/plot_barcol/gog-line.c
index edf297c..954bbb0 100644
--- a/plugins/plot_barcol/gog-line.c
+++ b/plugins/plot_barcol/gog-line.c
@@ -823,7 +823,7 @@ gog_line_view_get_data_at_point (GogPlotView *view, double x, double y, GogSerie
                        path = gog_chart_map_make_path (chart_map, NULL, yvals[j], lengths[j],
                                                            interpolations[j], FALSE,
                                                            &GOG_AREA_SERIES (pseries[j])->clamped_derivs);
-                       
+
                        go_path_line_to (path, gog_axis_map_to_view (x_map, lengths[j]), y_zero);
                        go_path_line_to (path, gog_axis_map_to_view (x_map, 1), y_zero);
                        go_path_close (path);
@@ -888,7 +888,7 @@ gog_line_view_get_data_at_point (GogPlotView *view, double x, double y, GogSerie
                                break;
                }
                for (j = 0; j < num_series; j++)
-                       g_free (yvals[j]); 
+                       g_free (yvals[j]);
        }
 
        gog_chart_map_free (chart_map);
diff --git a/plugins/plot_surface/gog-xyz-surface.c b/plugins/plot_surface/gog-xyz-surface.c
index f06a1f7..7f20d42 100644
--- a/plugins/plot_surface/gog-xyz-surface.c
+++ b/plugins/plot_surface/gog-xyz-surface.c
@@ -105,7 +105,7 @@ gog_xyz_matrix_plot_build_matrix (GogXYZPlot *plot, gboolean *cardinality_change
        xyz_data raw_data;
        unsigned *sort;
        gboolean is_3d = GOG_PLOT (plot)->desc.series.num_dim == 3;
-       
+
        if (GOG_IS_XYZ_MATRIX_PLOT (plot)) {
                GogXYZMatrixPlot *xyz = GOG_XYZ_MATRIX_PLOT (plot);
                if (!plot->auto_x && xyz->grid[0].data) {
@@ -569,7 +569,7 @@ gog_xyz_surface_plot_update (GogObject *obj)
        }
 
        if (GOG_PLOT (model)->desc.series.num_dim > 2 && model->z.fmt == NULL)
-                       model->z.fmt = go_data_preferred_fmt (series->base.values[2].data);     
+                       model->z.fmt = go_data_preferred_fmt (series->base.values[2].data);
        if (model->plotted_data != NULL)
                g_free (model->plotted_data);
        model->plotted_data = gog_xyz_plot_build_matrix (model, NULL);
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2bd588c..957dc02 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -108,6 +108,7 @@ goffice/gtk/go-optionmenu.c
 goffice/gtk/go-palette.c
 goffice/gtk/go-rotation-sel.c
 [type: gettext/glade]goffice/gtk/go-rotation-sel.ui
+goffice/gtk/go-math-editor.c
 goffice/math/go-complex.c
 goffice/math/go-cspline.c
 goffice/math/go-distribution.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]