[goffice] New math equations component plugin.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] New math equations component plugin.
- Date: Wed, 19 Feb 2014 14:32:56 +0000 (UTC)
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> & \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> & \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 < $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 < $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() > 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(*)>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 > 2">
+ <xsl:text>(</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="*[position()>1]">
+ <xsl:if test="position() > 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(.) < 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(.) <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 > 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 > 3"><xsl:text>(</xsl:text></xsl:if>
+ <xsl:for-each select="*[position()>1]">
+ <xsl:if test="position() > 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()>= $first">
+ <xsl:apply-templates select=".">
+ <xsl:with-param name="p" select="3"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:if test="$p > 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()>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">> </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">< </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()<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()<last()"><xsl:text>+</xsl:text></xsl:if>
+ </xsl:for-each>
+ <xsl:if test="count(m:bvar[not(m:degree)])>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()>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> & </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()>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 < $p"><xsl:text>(</xsl:text></xsl:if>
+ <xsl:for-each select="*[position()>1]">
+ <xsl:if test="position() > 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 < $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 < $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 < $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,'   ')"><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: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: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="'\ast '"
/><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="'\colon '"
/><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="'\less '"
/><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="'\greater'"
/><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="'\lbrack '"
/><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="'\backslash '"
/><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="'\rbrack '"
/><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="'\textasciicircumflex '" /><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:when test="starts-with($content,'`')"><xsl:value-of select="'\textasciigrave '"
/><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="'\lbrace '"
/><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="'\vert '"
/><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="'\rbrace '"
/><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="'\textasciitilde '"
/><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="'\varepsilon '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɛ')"/></xsl:call-template></xsl:when> <!--/varepsilon -->
+ <xsl:when test="starts-with($content,'˙')"><xsl:value-of select="'\dot{}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˙')"/></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,'¡')"><xsl:value-of select="'\textexclamdown '"
/><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="'\mbox{\textcent}'"
/><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="'\pounds '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'£')"/></xsl:call-template></xsl:when> <!--pound sign -->
+ <xsl:when test="starts-with($content,'¤')"><xsl:value-of
select="'\mbox{\textcurrency}'" /><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="'\yen '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'¥')"/></xsl:call-template></xsl:when> <!--/yen =yen sign --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'§')"><xsl:value-of select="'\S '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'§')"/></xsl:call-template></xsl:when> <!--section sign -->
+ <xsl:when test="starts-with($content,'¨')"><xsl:value-of select="'\textasciidieresis
'" /><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="'\copyright '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'©')"/></xsl:call-template></xsl:when> <!--copyright sign -->
+ <xsl:when test="starts-with($content,'ª')"><xsl:value-of select="'\textordfeminine '"
/><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="'\mbox{\guillemotleft}'" /><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="'\neg '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'¬')"/></xsl:call-template></xsl:when> <!--/neg /lnot =not sign -->
+ <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="'&#x000AE;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '®')"/></xsl:call-template></xsl:when> <!--/circledR
=registered sign --> <!-- Required amssymb --><!--\circledR-->
+ <xsl:when test="starts-with($content,'¯')"><xsl:value-of select="'&#x000AF;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '¯')"/></xsl:call-template></xsl:when><!--\textasciimacron-->
+ <xsl:when test="starts-with($content,'°')"><xsl:value-of select="'&#x000B0;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '°')"/></xsl:call-template></xsl:when><!--\degree-->
+ <xsl:when test="starts-with($content,'±')"><xsl:value-of select="'\pm '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'±')"/></xsl:call-template></xsl:when> <!--/pm B: =plus-or-minus sign -->
+ <xsl:when test="starts-with($content,'²')"><xsl:value-of select="'{^2}'"
/><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="'{^3}'"
/><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="'&#x000B4;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '´')"/></xsl:call-template></xsl:when><!--\textasciiacute-->
+ <xsl:when test="starts-with($content,'µ')"><xsl:value-of select="'\mathrm{\mu}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'µ')"/></xsl:call-template></xsl:when> <!--=micro sign -->
+ <xsl:when test="starts-with($content,'¶')"><xsl:value-of select="'&#x000B6;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '¶')"/></xsl:call-template></xsl:when> <!--pilcrow (paragraph
sign) --><!--\P-->
+ <xsl:when test="starts-with($content,'·')"><xsl:value-of select="'&#x000B7;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '·')"/></xsl:call-template></xsl:when><!--\cdotp-->
+ <xsl:when test="starts-with($content,'¸')"><xsl:value-of select="'&#x000B8;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'¸')"/></xsl:call-template></xsl:when><!--\mbox{\c{}}-->
+ <xsl:when test="starts-with($content,'¹')"><xsl:value-of select="'{^1}'"
/><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="'&#x000BA;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'º')"/></xsl:call-template></xsl:when><!--\textordmasculine-->
+ <xsl:when test="starts-with($content,'»')"><xsl:value-of select="'&#x000BB;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'»')"/></xsl:call-template></xsl:when><!--\mbox{\guillemotright}-->
+ <xsl:when test="starts-with($content,'À')"><xsl:value-of select="'&#x000C0;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'À')"/></xsl:call-template></xsl:when><!--\grave{A}-->
+ <xsl:when test="starts-with($content,'Á')"><xsl:value-of select="'&#x000C1;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Á')"/></xsl:call-template></xsl:when><!--&#x000C1;--><!--\acute{A}-->
+ <xsl:when test="starts-with($content,'Â')"><xsl:value-of select="'\hat{A}'"
/><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="'\tilde{A}'"
/><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="'\ddot{A}'"
/><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="'&#x000C5;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Å')"/></xsl:call-template></xsl:when> <!--capital A, ring -->
<!-- invalid in math mode --><!--\AA-->
+ <xsl:when test="starts-with($content,'Æ')"><xsl:value-of select="'&#x000C6;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Æ')"/></xsl:call-template></xsl:when> <!--capital AE
diphthong (ligature) --> <!-- invalid in math mode --><!--\AE-->
+ <xsl:when test="starts-with($content,'Ç')"><xsl:value-of select="'&#x000C7;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ç')"/></xsl:call-template></xsl:when><!--\mbox{\c{C}}-->
+ <xsl:when test="starts-with($content,'È')"><xsl:value-of select="'&#x000C8;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'È')"/></xsl:call-template></xsl:when><!--\grave{E}-->
+ <xsl:when test="starts-with($content,'É')"><xsl:value-of select="'&#x000C9;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'É')"/></xsl:call-template></xsl:when><!--&#x000C9;--><!--\acute{E}-->
+ <xsl:when test="starts-with($content,'Ê')"><xsl:value-of select="'\hat{E}'"
/><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="'\ddot{E}'"
/><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="'&#x000CC;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ì')"/></xsl:call-template></xsl:when><!--\grave{I}-->
+ <xsl:when test="starts-with($content,'Í')"><xsl:value-of select="'&#x000CD;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Í')"/></xsl:call-template></xsl:when><!--\acute{I}-->
+ <xsl:when test="starts-with($content,'Î')"><xsl:value-of select="'\hat{I}'"
/><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="'\ddot{I}'"
/><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="'&#x000D0;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Ð')"/></xsl:call-template></xsl:when><!--\DH-->
+ <xsl:when test="starts-with($content,'Ñ')"><xsl:value-of select="'\tilde{N}'"
/><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="'&#x000D2;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ò')"/></xsl:call-template></xsl:when><!--\grave{O}-->
+ <xsl:when test="starts-with($content,'Ó')"><xsl:value-of select="'&#x000D3;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ó')"/></xsl:call-template></xsl:when><!--\acute{O}-->
+ <xsl:when test="starts-with($content,'Ô')"><xsl:value-of select="'\hat{O}'"
/><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="'\tilde{O}'"
/><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="'\ddot{O}'"
/><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="'\times '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'×')"/></xsl:call-template></xsl:when> <!--/times B: =multiply sign -->
+ <xsl:when test="starts-with($content,'Ø')"><xsl:value-of select="'&#x000D8;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Ø')"/></xsl:call-template></xsl:when><!--\O-->
+ <xsl:when test="starts-with($content,'Ù')"><xsl:value-of select="'&#x000D9;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ù')"/></xsl:call-template></xsl:when><!--\grave{U}-->
+ <xsl:when test="starts-with($content,'Ú')"><xsl:value-of select="'&#x000DA;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ú')"/></xsl:call-template></xsl:when><!--\acute{U}-->
+ <xsl:when test="starts-with($content,'Û')"><xsl:value-of select="'\hat{U}'"
/><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="'\ddot{U}'"
/><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="'&#x000DD;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ý')"/></xsl:call-template></xsl:when><!--\acute{Y}-->
+ <xsl:when test="starts-with($content,'Þ')"><xsl:value-of select="'&#x000DE;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Þ')"/></xsl:call-template></xsl:when><!--\TH-->
+ <xsl:when test="starts-with($content,'ß')"><xsl:value-of select="'&#x000DF;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ß')"/></xsl:call-template></xsl:when><!--\ss-->
+ <xsl:when test="starts-with($content,'à')"><xsl:value-of select="'&#x000E0;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'à')"/></xsl:call-template></xsl:when><!--\grave{a}-->
+ <xsl:when test="starts-with($content,'á')"><xsl:value-of select="'&#x000E1;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'á')"/></xsl:call-template></xsl:when><!--\acute{a}-->
+ <xsl:when test="starts-with($content,'â')"><xsl:value-of select="'\hat{a}'"
/><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="'\tilde{a}'"
/><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="'\ddot{a}'"
/><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="'&#x000E5;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'å')"/></xsl:call-template></xsl:when><!--\aa-->
+ <xsl:when test="starts-with($content,'æ')"><xsl:value-of select="'&#x000E6;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'æ')"/></xsl:call-template></xsl:when> <!--small ae diphthong
(ligature) --> <!-- invalid in math mode --><!--\ae-->
+ <xsl:when test="starts-with($content,'ç')"><xsl:value-of select="'&#x000E7;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ç')"/></xsl:call-template></xsl:when><!--\mbox{\c{c}}-->
+ <xsl:when test="starts-with($content,'è')"><xsl:value-of select="'&#x000E8;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'è')"/></xsl:call-template></xsl:when><!--\grave{e}-->
+ <xsl:when test="starts-with($content,'é')"><xsl:value-of select="'&#x000E9;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'é')"/></xsl:call-template></xsl:when><!--\acute{e}-->
+ <xsl:when test="starts-with($content,'ê')"><xsl:value-of select="'\hat{e}'"
/><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="'\ddot{e}'"
/><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="'&#x000EC;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ì')"/></xsl:call-template></xsl:when><!--\grave{\imath}-->
+ <xsl:when test="starts-with($content,'í')"><xsl:value-of select="'&#x000ED;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'í')"/></xsl:call-template></xsl:when><!--\acute{\imath}-->
+ <xsl:when test="starts-with($content,'î')"><xsl:value-of select="'\hat{\imath}'"
/><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="'\ddot{\imath}'"
/><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="'\eth '"
/><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="'\tilde{n}'"
/><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="'&#x000F2;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ò')"/></xsl:call-template></xsl:when><!--\grave{o}-->
+ <xsl:when test="starts-with($content,'ó')"><xsl:value-of select="'&#x000F3;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ó')"/></xsl:call-template></xsl:when><!--&#x000F3;--><!--\acute{o}-->
+ <xsl:when test="starts-with($content,'ô')"><xsl:value-of select="'\hat{o}'"
/><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="'\tilde{o}'"
/><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="'\ddot{o}'"
/><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="'\div '"
/><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="'&#x000F8;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ø')"/></xsl:call-template></xsl:when><!--\o-->
+ <xsl:when test="starts-with($content,'ù')"><xsl:value-of select="'&#x000F9;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ù')"/></xsl:call-template></xsl:when><!--\grave{u}-->
+ <xsl:when test="starts-with($content,'ú')"><xsl:value-of select="'&#x000FA;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ú')"/></xsl:call-template></xsl:when><!--\acute{u}-->
+ <xsl:when test="starts-with($content,'û')"><xsl:value-of select="'\hat{u}'"
/><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="'\ddot{u}'"
/><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="'&#x000FD;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ý')"/></xsl:call-template></xsl:when><!--\acute{y}-->
+ <xsl:when test="starts-with($content,'þ')"><xsl:value-of select="'&#x000FE;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'þ')"/></xsl:call-template></xsl:when><!--\th-->
+ <xsl:when test="starts-with($content,'ÿ')"><xsl:value-of select="'\ddot{y}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ÿ')"/></xsl:call-template></xsl:when>
+<!-- ====================================================================== -->
+<!-- Unicode 3.2
+ -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'Ā')"><xsl:value-of select="'\bar{A}'" /><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="'\bar{a}'" /><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="'&#x00102;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ă')"/></xsl:call-template></xsl:when><!--\breve{A}-->
+<xsl:when test="starts-with($content,'ă')"><xsl:value-of select="'&#x00103;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ă')"/></xsl:call-template></xsl:when><!--\u{a}-->
+<xsl:when test="starts-with($content,'Ć')"><xsl:value-of select="'&#x00106;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ć')"/></xsl:call-template></xsl:when><!--\acute{C}-->
+<xsl:when test="starts-with($content,'ć')"><xsl:value-of select="'&#x00107;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ć')"/></xsl:call-template></xsl:when><!--\acute{c}-->
+<xsl:when test="starts-with($content,'Ĉ')"><xsl:value-of select="'\hat{C}'" /><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="'\hat{c}'" /><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="'\dot{C}'" /><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="'\dot{c}'" /><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="'\check{C}'" /><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="'\check{c}'" /><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="'\check{D}'" /><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="'\check{d}'" /><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="'\bar{E}'" /><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="'\bar{e}'" /><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="'&#x00114;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ĕ')"/></xsl:call-template></xsl:when><!--\breve{E}-->
+<xsl:when test="starts-with($content,'ĕ')"><xsl:value-of select="'&#x00115;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ĕ')"/></xsl:call-template></xsl:when><!--\breve{e}-->
+<xsl:when test="starts-with($content,'Ė')"><xsl:value-of select="'\dot{E}'" /><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="'\dot{e}'" /><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="'&#x00118;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ę')"/></xsl:call-template></xsl:when><!--\k{E}-->
+<xsl:when test="starts-with($content,'Ě')"><xsl:value-of select="'\check{E}'" /><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="'\check{e}'" /><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="'\hat{G}'" /><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="'\hat{g}'" /><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="'&#x0011E;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ğ')"/></xsl:call-template></xsl:when><!--\breve{G}-->
+<xsl:when test="starts-with($content,'ğ')"><xsl:value-of select="'&#x0011F;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ğ')"/></xsl:call-template></xsl:when><!--\breve{g}-->
+<xsl:when test="starts-with($content,'Ġ')"><xsl:value-of select="'\dot{G}'" /><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="'\dot{g}'" /><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="'&#x00122;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ģ')"/></xsl:call-template></xsl:when><!--\mbox{\c{G}}-->
+<xsl:when test="starts-with($content,'ģ')"><xsl:value-of select="'&#x00123;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ģ')"/></xsl:call-template></xsl:when><!--\mbox{\c{g}}-->
+<xsl:when test="starts-with($content,'Ĥ')"><xsl:value-of select="'\hat{H}'" /><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="'\hat{h}'" /><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="'&#x00127; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ħ')"/></xsl:call-template></xsl:when><!--\Elzxh-->
+<xsl:when test="starts-with($content,'Ĩ')"><xsl:value-of select="'\tilde{I}'" /><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="'\tilde{\imath}'"
/><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="'\bar{I}'" /><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="'\bar{\imath}'"
/><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="'&#x0012C;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ĭ')"/></xsl:call-template></xsl:when><!--\breve{I}-->
+<xsl:when test="starts-with($content,'ĭ')"><xsl:value-of select="'&#x0012D;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ĭ')"/></xsl:call-template></xsl:when><!--\breve{\imath}-->
+<xsl:when test="starts-with($content,'İ')"><xsl:value-of select="'\dot{I}'" /><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="'\imath '" /><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="'\hat{J}'" /><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="'\hat{\jmath}'"
/><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="'&#x00136;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ķ')"/></xsl:call-template></xsl:when><!--\mbox{\c{K}}-->
+<xsl:when test="starts-with($content,'ķ')"><xsl:value-of select="'&#x00137;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ķ')"/></xsl:call-template></xsl:when><!--\mbox{\c{k}}-->
+<xsl:when test="starts-with($content,'Ĺ')"><xsl:value-of select="'&#x00139;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ĺ')"/></xsl:call-template></xsl:when><!--\acute{L}-->
+<xsl:when test="starts-with($content,'ĺ')"><xsl:value-of select="'&#x0013A;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ĺ')"/></xsl:call-template></xsl:when><!--\acute{l}-->
+<xsl:when test="starts-with($content,'Ļ')"><xsl:value-of select="'&#x0013B;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ļ')"/></xsl:call-template></xsl:when><!--\mbox{\c{L}}-->
+<xsl:when test="starts-with($content,'ļ')"><xsl:value-of select="'&#x0013C;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ļ')"/></xsl:call-template></xsl:when><!--\mbox{\c{l}}-->
+<xsl:when test="starts-with($content,'Ľ')"><xsl:value-of select="'\check{L}'" /><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="'\check{l}'" /><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="'&#x00141;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Ł')"/></xsl:call-template></xsl:when><!--\L-->
+ <xsl:when test="starts-with($content,'ł')"><xsl:value-of select="'&#x00142;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ł')"/></xsl:call-template></xsl:when><!--\l-->
+<xsl:when test="starts-with($content,'Ń')"><xsl:value-of select="'&#x00143;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ń')"/></xsl:call-template></xsl:when><!--\acute{N}-->
+<xsl:when test="starts-with($content,'ń')"><xsl:value-of select="'&#x00144;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ń')"/></xsl:call-template></xsl:when><!--\acute{n}-->
+<xsl:when test="starts-with($content,'Ņ')"><xsl:value-of select="'&#x00145;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ņ')"/></xsl:call-template></xsl:when><!--\mbox{\c{N}}-->
+<xsl:when test="starts-with($content,'ņ')"><xsl:value-of select="'&#x00146;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ņ')"/></xsl:call-template></xsl:when><!--\mbox{\c{n}}-->
+<xsl:when test="starts-with($content,'Ň')"><xsl:value-of select="'\check{N}'" /><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="'\check{n}'" /><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="'\bar{O}'" /><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="'\bar{o}'" /><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="'&#x0014E;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ŏ')"/></xsl:call-template></xsl:when><!--\breve{O}-->
+<xsl:when test="starts-with($content,'ŏ')"><xsl:value-of select="'&#x0014F;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ŏ')"/></xsl:call-template></xsl:when><!--\breve{o}-->
+<xsl:when test="starts-with($content,'Ő')"><xsl:value-of select="'&#x00150;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ő')"/></xsl:call-template></xsl:when><!--\mbox{\H{O}}-->
+<xsl:when test="starts-with($content,'ő')"><xsl:value-of select="'&#x00151;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ő')"/></xsl:call-template></xsl:when><!--\mbox{\H{o}}-->
+ <xsl:when test="starts-with($content,'Œ')"><xsl:value-of select="'&#x00152;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'Œ')"/></xsl:call-template></xsl:when><!--\OE-->
+ <xsl:when test="starts-with($content,'œ')"><xsl:value-of select="'&#x00153;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'œ')"/></xsl:call-template></xsl:when><!--\oe-->
+<xsl:when test="starts-with($content,'Ŕ')"><xsl:value-of select="'&#x00154;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ŕ')"/></xsl:call-template></xsl:when><!--\acute{R}-->
+<xsl:when test="starts-with($content,'ŕ')"><xsl:value-of select="'&#x00155;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ŕ')"/></xsl:call-template></xsl:when><!--\acute{r}-->
+<xsl:when test="starts-with($content,'Ŗ')"><xsl:value-of select="'&#x00156;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ŗ')"/></xsl:call-template></xsl:when><!--\mbox{\c{R}}-->
+<xsl:when test="starts-with($content,'ŗ')"><xsl:value-of select="'&#x00157;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ŗ')"/></xsl:call-template></xsl:when><!--\mbox{\c{r}}-->
+<xsl:when test="starts-with($content,'Ř')"><xsl:value-of select="'\check{R}'" /><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="'\check{r}'" /><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="'&#x0015A;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ś')"/></xsl:call-template></xsl:when><!--\acute{S}-->
+<xsl:when test="starts-with($content,'ś')"><xsl:value-of select="'&#x0015B;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ś')"/></xsl:call-template></xsl:when><!--\acute{s}-->
+<xsl:when test="starts-with($content,'Ŝ')"><xsl:value-of select="'\hat{S}'" /><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="'\hat{s}'" /><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="'&#x0015E;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ş')"/></xsl:call-template></xsl:when><!--\mbox{\c{S}}-->
+<xsl:when test="starts-with($content,'ş')"><xsl:value-of select="'&#x0015F;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ş')"/></xsl:call-template></xsl:when><!--\mbox{\c{s}}-->
+<xsl:when test="starts-with($content,'Š')"><xsl:value-of select="'\check{S}'" /><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="'\check{s}'" /><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="'&#x00162;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ţ')"/></xsl:call-template></xsl:when><!--\mbox{\c{T}}-->
+<xsl:when test="starts-with($content,'ţ')"><xsl:value-of select="'&#x00163;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ţ')"/></xsl:call-template></xsl:when><!--\mbox{\c{t}}-->
+<xsl:when test="starts-with($content,'Ť')"><xsl:value-of select="'\check{T}'" /><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="'\check{t}'" /><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="'\tilde{U}'" /><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="'\tilde{u}'" /><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="'\bar{U}'" /><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="'\bar{u}'" /><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="'&#x0016C;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ŭ')"/></xsl:call-template></xsl:when><!--\breve{U}-->
+<xsl:when test="starts-with($content,'ŭ')"><xsl:value-of select="'&#x0016D;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ŭ')"/></xsl:call-template></xsl:when><!--\breve{u}-->
+<xsl:when test="starts-with($content,'Ů')"><xsl:value-of select="'&#x0016E;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ů')"/></xsl:call-template></xsl:when><!--\mathring{U}-->
+<xsl:when test="starts-with($content,'ů')"><xsl:value-of select="'&#x0016F;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ů')"/></xsl:call-template></xsl:when><!--\mathring{u}-->
+<xsl:when test="starts-with($content,'Ű')"><xsl:value-of select="'&#x00170;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ű')"/></xsl:call-template></xsl:when><!--\mbox{\H{U}}-->
+<xsl:when test="starts-with($content,'ű')"><xsl:value-of select="'&#x00171;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ű')"/></xsl:call-template></xsl:when><!--\mbox{\H{u}}-->
+<xsl:when test="starts-with($content,'Ų')"><xsl:value-of select="'&#x00172;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ų')"/></xsl:call-template></xsl:when><!--\k{U}-->
+<xsl:when test="starts-with($content,'Ŵ')"><xsl:value-of select="'\hat{W}'" /><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="'\hat{w}'" /><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="'\hat{Y}'" /><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="'\hat{y}'" /><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="'\ddot{Y}'" /><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="'&#x00179;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ź')"/></xsl:call-template></xsl:when><!--\acute{Z}-->
+<xsl:when test="starts-with($content,'ź')"><xsl:value-of select="'&#x0017A;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ź')"/></xsl:call-template></xsl:when><!--\acute{z}-->
+<xsl:when test="starts-with($content,'Ż')"><xsl:value-of select="'\dot{Z}'" /><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="'\dot{z}'" /><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="'\check{Z}'" /><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="'\check{z}'" /><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="'f'" /><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="'\eth '" /><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="'&#x001F5;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ǵ')"/></xsl:call-template></xsl:when><!--\acute{g}-->
+<xsl:when test="starts-with($content,'ɐ')"><xsl:value-of select="'&#x00250; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɐ')"/></xsl:call-template></xsl:when><!--\Elztrna-->
+<xsl:when test="starts-with($content,'ɒ')"><xsl:value-of select="'&#x00252; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɒ')"/></xsl:call-template></xsl:when><!--\Elztrnsa-->
+<xsl:when test="starts-with($content,'ɔ')"><xsl:value-of select="'&#x00254; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɔ')"/></xsl:call-template></xsl:when><!--\Elzopeno-->
+<xsl:when test="starts-with($content,'ɖ')"><xsl:value-of select="'&#x00256; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɖ')"/></xsl:call-template></xsl:when><!--\Elzrtld-->
+<xsl:when test="starts-with($content,'ə')"><xsl:value-of select="'&#x00259; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ə')"/></xsl:call-template></xsl:when><!--\Elzschwa-->
+<xsl:when test="starts-with($content,'ɛ')"><xsl:value-of select="'\varepsilon '"
/><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="'&#x00263; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɣ')"/></xsl:call-template></xsl:when><!--\Elzpgamma-->
+<xsl:when test="starts-with($content,'ɤ')"><xsl:value-of select="'&#x00264; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɤ')"/></xsl:call-template></xsl:when><!--\Elzpbgam-->
+<xsl:when test="starts-with($content,'ɥ')"><xsl:value-of select="'&#x00265; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɥ')"/></xsl:call-template></xsl:when><!--\Elztrnh-->
+<xsl:when test="starts-with($content,'ɬ')"><xsl:value-of select="'&#x0026C; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɬ')"/></xsl:call-template></xsl:when><!--\Elzbtdl-->
+<xsl:when test="starts-with($content,'ɭ')"><xsl:value-of select="'&#x0026D; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɭ')"/></xsl:call-template></xsl:when><!--\Elzrtll-->
+<xsl:when test="starts-with($content,'ɯ')"><xsl:value-of select="'&#x0026F; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɯ')"/></xsl:call-template></xsl:when><!--\Elztrnm-->
+<xsl:when test="starts-with($content,'ɰ')"><xsl:value-of select="'&#x00270; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɰ')"/></xsl:call-template></xsl:when><!--\Elztrnmlr-->
+<xsl:when test="starts-with($content,'ɱ')"><xsl:value-of select="'&#x00271; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɱ')"/></xsl:call-template></xsl:when><!--\Elzltlmr-->
+<xsl:when test="starts-with($content,'ɳ')"><xsl:value-of select="'&#x00273; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɳ')"/></xsl:call-template></xsl:when><!--\Elzrtln-->
+<xsl:when test="starts-with($content,'ɷ')"><xsl:value-of select="'&#x00277; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɷ')"/></xsl:call-template></xsl:when><!--\Elzclomeg-->
+<xsl:when test="starts-with($content,'ɹ')"><xsl:value-of select="'&#x00279; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɹ')"/></xsl:call-template></xsl:when><!--\Elztrnr-->
+<xsl:when test="starts-with($content,'ɺ')"><xsl:value-of select="'&#x0027A; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɺ')"/></xsl:call-template></xsl:when><!--\Elztrnrl-->
+<xsl:when test="starts-with($content,'ɻ')"><xsl:value-of select="'&#x0027B; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɻ')"/></xsl:call-template></xsl:when><!--\Elzrttrnr-->
+<xsl:when test="starts-with($content,'ɼ')"><xsl:value-of select="'&#x0027C; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɼ')"/></xsl:call-template></xsl:when><!--\Elzrl-->
+<xsl:when test="starts-with($content,'ɽ')"><xsl:value-of select="'&#x0027D; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɽ')"/></xsl:call-template></xsl:when><!--\Elzrtlr-->
+<xsl:when test="starts-with($content,'ɾ')"><xsl:value-of select="'&#x0027E; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ɾ')"/></xsl:call-template></xsl:when><!--\Elzfhr-->
+<xsl:when test="starts-with($content,'ʂ')"><xsl:value-of select="'&#x00282; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʂ')"/></xsl:call-template></xsl:when><!--\Elzrtls-->
+<xsl:when test="starts-with($content,'ʃ')"><xsl:value-of select="'&#x00283; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʃ')"/></xsl:call-template></xsl:when><!--\Elzesh-->
+<xsl:when test="starts-with($content,'ʇ')"><xsl:value-of select="'&#x00287; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʇ')"/></xsl:call-template></xsl:when><!--\Elztrnt-->
+<xsl:when test="starts-with($content,'ʈ')"><xsl:value-of select="'&#x00288; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʈ')"/></xsl:call-template></xsl:when><!--\Elzrtlt-->
+<xsl:when test="starts-with($content,'ʊ')"><xsl:value-of select="'&#x0028A; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʊ')"/></xsl:call-template></xsl:when><!--\Elzpupsil-->
+<xsl:when test="starts-with($content,'ʋ')"><xsl:value-of select="'&#x0028B; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʋ')"/></xsl:call-template></xsl:when><!--\Elzpscrv-->
+<xsl:when test="starts-with($content,'ʌ')"><xsl:value-of select="'&#x0028C; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʌ')"/></xsl:call-template></xsl:when><!--\Elzinvv-->
+<xsl:when test="starts-with($content,'ʍ')"><xsl:value-of select="'&#x0028D; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʍ')"/></xsl:call-template></xsl:when><!--\Elzinvw-->
+<xsl:when test="starts-with($content,'ʎ')"><xsl:value-of select="'&#x0028E; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʎ')"/></xsl:call-template></xsl:when><!--\Elztrny-->
+<xsl:when test="starts-with($content,'ʐ')"><xsl:value-of select="'&#x00290; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʐ')"/></xsl:call-template></xsl:when><!--\Elzrtlz-->
+<xsl:when test="starts-with($content,'ʒ')"><xsl:value-of select="'&#x00292; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʒ')"/></xsl:call-template></xsl:when><!--\Elzyogh-->
+<xsl:when test="starts-with($content,'ʔ')"><xsl:value-of select="'&#x00294; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʔ')"/></xsl:call-template></xsl:when><!--\Elzglst-->
+<xsl:when test="starts-with($content,'ʕ')"><xsl:value-of select="'&#x00295; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʕ')"/></xsl:call-template></xsl:when><!--\Elzreglst-->
+<xsl:when test="starts-with($content,'ʖ')"><xsl:value-of select="'&#x00296; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʖ')"/></xsl:call-template></xsl:when><!--\Elzinglst-->
+<xsl:when test="starts-with($content,'ʤ')"><xsl:value-of select="'&#x002A4; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʤ')"/></xsl:call-template></xsl:when><!--\Elzdyogh-->
+<xsl:when test="starts-with($content,'ʧ')"><xsl:value-of select="'&#x002A7; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ʧ')"/></xsl:call-template></xsl:when><!--\Elztesh-->
+ <xsl:when test="starts-with($content,'ʼ')"><xsl:value-of select="'&#x002BC;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ʼ')"/></xsl:call-template></xsl:when><!--\rasp-->
+<xsl:when test="starts-with($content,'ˈ')"><xsl:value-of select="'&#x002C8; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ˈ')"/></xsl:call-template></xsl:when><!--\Elzverts-->
+<xsl:when test="starts-with($content,'ˌ')"><xsl:value-of select="'&#x002CC; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ˌ')"/></xsl:call-template></xsl:when><!--\Elzverti-->
+<xsl:when test="starts-with($content,'ː')"><xsl:value-of select="'&#x002D0; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ː')"/></xsl:call-template></xsl:when><!--\Elzlmrk-->
+<xsl:when test="starts-with($content,'ˑ')"><xsl:value-of select="'&#x002D1; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ˑ')"/></xsl:call-template></xsl:when><!--\Elzhlmrk-->
+<xsl:when test="starts-with($content,'˒')"><xsl:value-of select="'&#x002D2; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˒')"/></xsl:call-template></xsl:when><!--\Elzsbrhr-->
+<xsl:when test="starts-with($content,'˓')"><xsl:value-of select="'&#x002D3; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˓')"/></xsl:call-template></xsl:when><!--\Elzsblhr-->
+<xsl:when test="starts-with($content,'˔')"><xsl:value-of select="'&#x002D4; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˔')"/></xsl:call-template></xsl:when><!--\Elzrais-->
+<xsl:when test="starts-with($content,'˕')"><xsl:value-of select="'&#x002D5; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˕')"/></xsl:call-template></xsl:when><!--\Elzlow-->
+<xsl:when test="starts-with($content,'˘')"><xsl:value-of select="'&#x002D8; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˘')"/></xsl:call-template></xsl:when><!--\u-->
+<xsl:when test="starts-with($content,'˙')"><xsl:value-of select="'\dot{}'" /><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="'&#x002DA;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˚')"/></xsl:call-template></xsl:when><!--\mathring{}-->
+<xsl:when test="starts-with($content,'˛')"><xsl:value-of select="'&#x002DB;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˛')"/></xsl:call-template></xsl:when><!--\mbox{\k{}}-->
+<xsl:when test="starts-with($content,'˝')"><xsl:value-of select="'&#x002DD;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'˝')"/></xsl:call-template></xsl:when><!--\mbox{\H{}}-->
+<xsl:when test="starts-with($content,'̀')"><xsl:value-of select="'&#x00300; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'̀')"/></xsl:call-template></xsl:when><!--\grave-->
+<xsl:when test="starts-with($content,'́')"><xsl:value-of select="'&#x00301; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'́')"/></xsl:call-template></xsl:when><!--\acute-->
+<xsl:when test="starts-with($content,'̂')"><xsl:value-of select="'\hat '" /><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="'\tilde '" /><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="'\bar '" /><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="'&#x00306; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'̆')"/></xsl:call-template></xsl:when><!--\breve-->
+<xsl:when test="starts-with($content,'̇')"><xsl:value-of select="'\dot '" /><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="'\ddot '" /><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="'&#x0030A;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '̊')"/></xsl:call-template></xsl:when><!--\ocirc-->
+ <xsl:when test="starts-with($content,'̋')"><xsl:value-of select="'&#x0030B;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '̋')"/></xsl:call-template></xsl:when><!--\H-->
+<xsl:when test="starts-with($content,'̌')"><xsl:value-of select="'\check '" /><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="'&#x00321; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'̡')"/></xsl:call-template></xsl:when><!--\Elzpalh-->
+<xsl:when test="starts-with($content,'̪')"><xsl:value-of select="'&#x0032A; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'̪')"/></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,'Ά')"><xsl:value-of select="'\acute{A}'" /><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="'\acute{E}'" /><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="'&#x00389;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ή')"/></xsl:call-template></xsl:when><!--\grave{H}-->
+<xsl:when test="starts-with($content,'Ί')"><xsl:value-of select="concat('\mathrm{',$apos,'I}')"
/><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="concat('\mathrm{',$apos,'O}')"
/><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="concat('\mathrm{',$apos,'Y}')"
/><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="concat('\mathrm{',$apos,'\Omega}')"
/><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="'&#x00390;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ΐ')"/></xsl:call-template></xsl:when><!--\acute{\ddot{\iota}}-->
+<xsl:when test="starts-with($content,'Α')"><xsl:value-of select="'\Alpha '" /><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="'\Beta '" /><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="'\Gamma '" /><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="'\Delta '" /><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="'&#x00395; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ε')"/></xsl:call-template></xsl:when><!--\Epsilon-->
+<xsl:when test="starts-with($content,'Ζ')"><xsl:value-of select="'\Zeta '" /><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="'\Eta '" /><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="'\Theta '" /><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="'\Iota '" /><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="'\Kappa '" /><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="'\Lambda '" /><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="'M'" /><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="'N'" /><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="'\Xi '" /><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="'O'" /><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="'\Pi '" /><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="'\Rho '" /><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="'\Sigma '" /><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="'\Tau '" /><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="'\Upsilon '" /><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="'\Phi '" /><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="'&#x003A7; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Χ')"/></xsl:call-template></xsl:when><!--\Chi-->
+<xsl:when test="starts-with($content,'Ψ')"><xsl:value-of select="'\Psi '" /><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="'\Omega '" /><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="'\mathrm{\ddot{I}}'"
/><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="'\mathrm{\ddot{Y}}'"
/><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="'&#x003AC;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ά')"/></xsl:call-template></xsl:when><!--\acute{\alpha}-->
+<xsl:when test="starts-with($content,'έ')"><xsl:value-of select="'&#x003AD;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'έ')"/></xsl:call-template></xsl:when><!--\acute{\epsilon}-->
+<xsl:when test="starts-with($content,'ή')"><xsl:value-of select="'&#x003AE;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ή')"/></xsl:call-template></xsl:when><!--\acute{\eta}-->
+<xsl:when test="starts-with($content,'ί')"><xsl:value-of select="'&#x003AF;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ί')"/></xsl:call-template></xsl:when><!--\acute{\iota}-->
+<xsl:when test="starts-with($content,'ΰ')"><xsl:value-of select="'&#x003B0;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ΰ')"/></xsl:call-template></xsl:when><!--\acute{\ddot{\upsilon}}-->
+ <xsl:when test="starts-with($content,'α')"><xsl:value-of select="'\alpha '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'α')"/></xsl:call-template></xsl:when> <!--/alpha small alpha, Greek -->
+ <xsl:when test="starts-with($content,'β')"><xsl:value-of select="'\beta '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'β')"/></xsl:call-template></xsl:when> <!--/beta small beta, Greek -->
+ <xsl:when test="starts-with($content,'γ')"><xsl:value-of select="'\gamma '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'γ')"/></xsl:call-template></xsl:when> <!--/gamma small gamma, Greek -->
+ <xsl:when test="starts-with($content,'δ')"><xsl:value-of select="'\delta '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'δ')"/></xsl:call-template></xsl:when> <!--/delta small delta, Greek -->
+ <xsl:when test="starts-with($content,'ε')"><xsl:value-of select="'\epsilon '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ε')"/></xsl:call-template></xsl:when> <!--/straightepsilon, small epsilon, Greek -->
+ <xsl:when test="starts-with($content,'ζ')"><xsl:value-of select="'\zeta '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ζ')"/></xsl:call-template></xsl:when> <!--/zeta small zeta, Greek -->
+ <xsl:when test="starts-with($content,'η')"><xsl:value-of select="'\eta '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'η')"/></xsl:call-template></xsl:when> <!--/eta small eta, Greek -->
+ <xsl:when test="starts-with($content,'θ')"><xsl:value-of select="'\theta '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'θ')"/></xsl:call-template></xsl:when> <!--/theta straight theta, small theta, Greek -->
+ <xsl:when test="starts-with($content,'ι')"><xsl:value-of select="'\iota '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ι')"/></xsl:call-template></xsl:when> <!--/iota small iota, Greek -->
+ <xsl:when test="starts-with($content,'κ')"><xsl:value-of select="'\kappa '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'κ')"/></xsl:call-template></xsl:when> <!--/kappa small kappa, Greek -->
+ <xsl:when test="starts-with($content,'λ')"><xsl:value-of select="'\lambda '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'λ')"/></xsl:call-template></xsl:when> <!--/lambda small lambda, Greek -->
+ <xsl:when test="starts-with($content,'μ')"><xsl:value-of select="'\mu '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'μ')"/></xsl:call-template></xsl:when> <!--/mu small mu, Greek -->
+ <xsl:when test="starts-with($content,'ν')"><xsl:value-of select="'\nu '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ν')"/></xsl:call-template></xsl:when> <!--/nu small nu, Greek -->
+ <xsl:when test="starts-with($content,'ξ')"><xsl:value-of select="'\xi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ξ')"/></xsl:call-template></xsl:when> <!--/xi small xi, Greek -->
+ <xsl:when test="starts-with($content,'ο')"><xsl:value-of select="'o'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ο')"/></xsl:call-template></xsl:when> <!--small omicron, Greek -->
+ <xsl:when test="starts-with($content,'π')"><xsl:value-of select="'\pi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'π')"/></xsl:call-template></xsl:when> <!--/pi small pi, Greek -->
+ <xsl:when test="starts-with($content,'ρ')"><xsl:value-of select="'\rho '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ρ')"/></xsl:call-template></xsl:when> <!--/rho small rho, Greek -->
+ <xsl:when test="starts-with($content,'ς')"><xsl:value-of select="'\varsigma '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ς')"/></xsl:call-template></xsl:when> <!--/varsigma -->
+ <xsl:when test="starts-with($content,'σ')"><xsl:value-of select="'\sigma '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'σ')"/></xsl:call-template></xsl:when> <!--/sigma small sigma, Greek -->
+ <xsl:when test="starts-with($content,'τ')"><xsl:value-of select="'\tau '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'τ')"/></xsl:call-template></xsl:when> <!--/tau small tau, Greek -->
+ <xsl:when test="starts-with($content,'υ')"><xsl:value-of select="'\upsilon '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'υ')"/></xsl:call-template></xsl:when> <!--/upsilon small upsilon, Greek -->
+ <xsl:when test="starts-with($content,'φ')"><xsl:value-of select="'\phi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'φ')"/></xsl:call-template></xsl:when> <!--/straightphi - small phi, Greek -->
+ <xsl:when test="starts-with($content,'χ')"><xsl:value-of select="'\chi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'χ')"/></xsl:call-template></xsl:when> <!--/chi small chi, Greek -->
+ <xsl:when test="starts-with($content,'ψ')"><xsl:value-of select="'\psi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ψ')"/></xsl:call-template></xsl:when> <!--/psi small psi, Greek -->
+ <xsl:when test="starts-with($content,'ω')"><xsl:value-of select="'\omega '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ω')"/></xsl:call-template></xsl:when> <!--/omega small omega, Greek -->
+ <xsl:when test="starts-with($content,'ϊ')"><xsl:value-of select="'\ddot{\iota}'"
/><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="'\ddot{\upsilon}'"
/><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="'\acute{o}'" /><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="'&#x003CD;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ύ')"/></xsl:call-template></xsl:when><!--\acute{\upsilon}-->
+<xsl:when test="starts-with($content,'ώ')"><xsl:value-of select="'&#x003CE;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ώ')"/></xsl:call-template></xsl:when><!--\acute{\omega}-->
+ <xsl:when test="starts-with($content,'ϑ')"><xsl:value-of select="'\vartheta '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ϑ')"/></xsl:call-template></xsl:when> <!--/vartheta - curly or open theta -->
+ <xsl:when test="starts-with($content,'ϒ')"><xsl:value-of select="'\Upsilon '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ϒ')"/></xsl:call-template></xsl:when> <!--/Upsilon capital Upsilon, Greek -->
+ <xsl:when test="starts-with($content,'ϕ')"><xsl:value-of select="'\phi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ϕ')"/></xsl:call-template></xsl:when> <!--/varphi - curly or open phi -->
+ <xsl:when test="starts-with($content,'ϖ')"><xsl:value-of select="'\varpi '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ϖ')"/></xsl:call-template></xsl:when> <!--/varpi -->
+<xsl:when test="starts-with($content,'Ϛ')"><xsl:value-of select="'&#x003DA; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ϛ')"/></xsl:call-template></xsl:when><!--\Stigma-->
+<xsl:when test="starts-with($content,'Ϝ')"><xsl:value-of select="'&#x003DC; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ϝ')"/></xsl:call-template></xsl:when><!--\Digamma-->
+<xsl:when test="starts-with($content,'ϝ')"><xsl:value-of select="'\digamma '" /><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="'&#x003DE; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ϟ')"/></xsl:call-template></xsl:when><!--\Koppa-->
+<xsl:when test="starts-with($content,'Ϡ')"><xsl:value-of select="'&#x003E0; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ϡ')"/></xsl:call-template></xsl:when><!--\Sampi-->
+ <xsl:when test="starts-with($content,'ϰ')"><xsl:value-of select="'\varkappa '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ϰ')"/></xsl:call-template></xsl:when> <!--/varkappa -->
+ <xsl:when test="starts-with($content,'ϱ')"><xsl:value-of select="'\varrho '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ϱ')"/></xsl:call-template></xsl:when> <!--/varrho -->
+<xsl:when test="starts-with($content,'ϵ')"><xsl:value-of select="'\epsilon '" /><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="'\backepsilon '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'϶')"/></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,' ')"><xsl:value-of select='"\enspace "'
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
' ')"/></xsl:call-template></xsl:when> <!-- en space (1/2-em) -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of select='"\quad "'
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
' ')"/></xsl:call-template></xsl:when> <!-- emsp - space of width 1em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of select='"\hspace{0.33em}"'
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
' ')"/></xsl:call-template></xsl:when> <!-- emsp13 - space of width 1/3 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of select='"\thickspace "'
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
' ')"/></xsl:call-template></xsl:when> <!-- ThickSpace - space of width 1/4 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of select='"\hspace{0.166em}"'
/><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='"\hphantom{0}"'
/><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='"\hphantom{,}"'
/><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='"\thinspace "'
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
' ')"/></xsl:call-template></xsl:when> <!-- ThinSpace - space of width 3/18 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of select="'&#x0200A;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when><!--\hspace-->
+ <xsl:when test="starts-with($content,'​')"><xsl:call-template
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'​')"/></xsl:call-template></xsl:when> <!--zero width space -->
+ <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="'&#x02013;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '–')"/></xsl:call-template></xsl:when><!--\endash-->
+ <xsl:when test="starts-with($content,'—')"><xsl:value-of select="'&#x02014;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '—')"/></xsl:call-template></xsl:when><!--\emdash-->
+ <xsl:when test="starts-with($content,'‖')"><xsl:value-of select="'\Vert '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'‖')"/></xsl:call-template></xsl:when> <!--/Vert dbl vertical bar -->
+ <xsl:when test="starts-with($content,'‘')"><xsl:value-of select="'&#x02018;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '‘')"/></xsl:call-template></xsl:when><!--\lq-->
+ <xsl:when test="starts-with($content,'’')"><xsl:value-of select="'&#x02019;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '’')"/></xsl:call-template></xsl:when><!--\rq-->
+<xsl:when test="starts-with($content,'‛')"><xsl:value-of select="'&#x0201B; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'‛')"/></xsl:call-template></xsl:when><!--\Elzreapos-->
+ <xsl:when test="starts-with($content,'“')"><xsl:value-of select="'&#x0201C;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '“')"/></xsl:call-template></xsl:when><!--\textquotedblleft-->
+ <xsl:when test="starts-with($content,'”')"><xsl:value-of select="'&#x0201D;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '”')"/></xsl:call-template></xsl:when><!--\textquotedblright-->
+<xsl:when test="starts-with($content,'†')"><xsl:value-of select="'\dagger '" /><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="'&#x02021; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'‡')"/></xsl:call-template></xsl:when><!--\ddager-->
+<xsl:when test="starts-with($content,'•')"><xsl:value-of select="'\bullet '" /><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="'\dots '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'…')"/></xsl:call-template></xsl:when> <!--horizontal ellipsis = three dot leader -->
+ <xsl:when test="starts-with($content,'′')"><xsl:value-of select="'\prime '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'′')"/></xsl:call-template></xsl:when> <!--/prime prime or minute -->
+<xsl:when test="starts-with($content,'″')"><xsl:value-of select="concat('{',$apos,$apos,'}')"
/><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="concat('{',$apos,$apos,$apos,'}')"
/><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="'\backprime '" /><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: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: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: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="concat($apos,$apos,$apos,$apos)"
/><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="'&#x0205F;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when><!--\mkern4mu-->
+ <xsl:when test="starts-with($content,'⁡')"><xsl:call-template
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⁡')"/></xsl:call-template></xsl:when> <!-- ApplyFunction -->
+ <xsl:when test="starts-with($content,'⁢')"><xsl:call-template
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⁢')"/></xsl:call-template></xsl:when> <!-- InvisibleTimes -->
+ <xsl:when test="starts-with($content,'⁣')"><xsl:call-template
name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⁣')"/></xsl:call-template></xsl:when> <!-- InvisibleComma, used as a separator, e.g., in indices
-->
+<!-- ====================================================================== -->
+<!-- Unicode 3.2
+ -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'₧')"><xsl:value-of select="'\Elzpes'" /><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="'&#x020AC;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'€')"/></xsl:call-template></xsl:when><!--\mbox{\texteuro}-->
+<xsl:when test="starts-with($content,'⃛')"><xsl:value-of select="'\dddot '" /><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="'\ddddot '" /><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:call-template name="replaceEntities"><xsl:with-param
name="content" select="substring-after($content, '⃧')"/></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,'ℂ')"><xsl:value-of select="'\mathbb{C}'" /><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="'&#x0210A;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℊ')"/></xsl:call-template></xsl:when><!--\mathscr{g}-->
+ <xsl:when test="starts-with($content,'ℋ')"><xsl:value-of select="'&#x0210B;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℋ')"/></xsl:call-template></xsl:when> <!--H Hamiltonian --><!--\mathscr{H}-->
+ <xsl:when test="starts-with($content,'ℌ')"><xsl:value-of select="'\mathfrak{H}'"
/><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="'\mathbb{H}'" /><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: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="'\hbar '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℏ︀')"/></xsl:call-template></xsl:when> <!--/hbar - Planck's over 2pi -->
+ <xsl:when test="starts-with($content,'ℏ')"><xsl:value-of select="'&#x0210F;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ℏ')"/></xsl:call-template></xsl:when> <!--/hslash - variant
Planck's over 2pi --> <!-- Required amssymb --><!--\hslash-->
+<xsl:when test="starts-with($content,'ℐ')"><xsl:value-of select="'&#x02110;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℐ')"/></xsl:call-template></xsl:when><!--\mathscr{I}-->
+ <xsl:when test="starts-with($content,'ℑ')"><xsl:value-of select="'\Im '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℑ')"/></xsl:call-template></xsl:when> <!--/Im - imaginary -->
+<xsl:when test="starts-with($content,'ℒ')"><xsl:value-of select="'&#x02112;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℒ')"/></xsl:call-template></xsl:when><!--\mathscr{L}-->
+ <xsl:when test="starts-with($content,'ℓ')"><xsl:value-of select="'\ell '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℓ')"/></xsl:call-template></xsl:when> <!--/ell - cursive small l -->
+ <xsl:when test="starts-with($content,'ℕ')"><xsl:value-of select="'\mathbb{N}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℕ')"/></xsl:call-template></xsl:when> <!--the semi-ring of natural numbers --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'№')"><xsl:value-of select="'&#x02116;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '№')"/></xsl:call-template></xsl:when><!--\textnumero-->
+ <xsl:when test="starts-with($content,'℘')"><xsl:value-of select="'\wp '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'℘')"/></xsl:call-template></xsl:when> <!--/wp - Weierstrass p -->
+ <xsl:when test="starts-with($content,'ℙ')"><xsl:value-of select="'\mathbb{P}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℙ')"/></xsl:call-template></xsl:when> <!--the prime natural numbers --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'ℚ')"><xsl:value-of select="'\mathbb{Q}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℚ')"/></xsl:call-template></xsl:when> <!--the field of rational numbers --> <!-- Required
amssymb -->
+<xsl:when test="starts-with($content,'ℛ')"><xsl:value-of select="'&#x0211B;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℛ')"/></xsl:call-template></xsl:when><!--\mathscr{R}-->
+ <xsl:when test="starts-with($content,'ℜ')"><xsl:value-of select="'\Re '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℜ')"/></xsl:call-template></xsl:when> <!--/Re - real -->
+ <xsl:when test="starts-with($content,'ℝ')"><xsl:value-of select="'\mathbb{R}'"
/><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="'&#x0211E;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '℞')"/></xsl:call-template></xsl:when><!--\Elzxrat-->
+ <xsl:when test="starts-with($content,'ℤ')"><xsl:value-of select="'\mathbb{Z}'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℤ')"/></xsl:call-template></xsl:when> <!--the ring of integers --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'Ω')"><xsl:value-of select="'\Omega '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'Ω')"/></xsl:call-template></xsl:when> <!--ohm sign -->
+ <xsl:when test="starts-with($content,'℧')"><xsl:value-of select="'\mho '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'℧')"/></xsl:call-template></xsl:when> <!--/mho - conductance -->
+<xsl:when test="starts-with($content,'ℨ')"><xsl:value-of select="'\mathfrak{Z}'"
/><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="'&#x02129;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'℩')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{2129}-->
+<xsl:when test="starts-with($content,'Å')"><xsl:value-of select="'\AA'" /><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="'&#x0212C;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℬ')"/></xsl:call-template></xsl:when><!--\mathscr{B}-->
+<xsl:when test="starts-with($content,'ℭ')"><xsl:value-of select="'\mathfrak{C}'"
/><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="'&#x0212F;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℯ')"/></xsl:call-template></xsl:when><!--\mathscr{e}-->
+<xsl:when test="starts-with($content,'ℰ')"><xsl:value-of select="'&#x02130;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℰ')"/></xsl:call-template></xsl:when><!--\mathscr{E}-->
+<xsl:when test="starts-with($content,'ℱ')"><xsl:value-of select="'&#x02131;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℱ')"/></xsl:call-template></xsl:when><!--\mathscr{F}-->
+<xsl:when test="starts-with($content,'ℳ')"><xsl:value-of select="'&#x02133;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℳ')"/></xsl:call-template></xsl:when><!--\mathscr{M}-->
+<xsl:when test="starts-with($content,'ℴ')"><xsl:value-of select="'&#x02134;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℴ')"/></xsl:call-template></xsl:when><!--\mathscr{o}-->
+ <xsl:when test="starts-with($content,'ℵ')"><xsl:value-of select="'\aleph '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℵ')"/></xsl:call-template></xsl:when> <!--/aleph aleph, Hebrew -->
+ <xsl:when test="starts-with($content,'ℶ')"><xsl:value-of select="'\beth '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℶ')"/></xsl:call-template></xsl:when> <!--/beth - beth, Hebrew --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'ℷ')"><xsl:value-of select="'&#x02137;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ℷ')"/></xsl:call-template></xsl:when> <!--/gimel -
gimel, Hebrew --> <!-- Required amssymb --><!--\gimel-->
+ <xsl:when test="starts-with($content,'ℸ')"><xsl:value-of select="'&#x02138;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, 'ℸ')"/></xsl:call-template></xsl:when> <!--/daleth - daleth,
Hebrew --> <!-- Required amssymb --><!--\daleth-->
+<xsl:when test="starts-with($content,'ℿ')"><xsl:value-of select="'&#x0213F; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ℿ')"/></xsl:call-template></xsl:when><!--\BbbPi-->
+<xsl:when test="starts-with($content,'⅀')"><xsl:value-of select="'&#x02140; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅀')"/></xsl:call-template></xsl:when><!--\bbsum-->
+<xsl:when test="starts-with($content,'⅁')"><xsl:value-of select="'&#x02141; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅁')"/></xsl:call-template></xsl:when><!--\Game-->
+ <xsl:when test="starts-with($content,'ⅅ')"><xsl:value-of select="'D'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ⅅ')"/></xsl:call-template></xsl:when> <!--D for use in differentials, e.g., within
integrals -->
+ <xsl:when test="starts-with($content,'ⅆ')"><xsl:value-of select="'d'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ⅆ')"/></xsl:call-template></xsl:when> <!--d for use in differentials, e.g., within
integrals -->
+ <xsl:when test="starts-with($content,'ⅇ')"><xsl:value-of select="'e'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ⅇ')"/></xsl:call-template></xsl:when> <!--e use for the exponential base of the
natural logarithms -->
+ <xsl:when test="starts-with($content,'ⅈ')"><xsl:value-of select="'i'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ⅈ')"/></xsl:call-template></xsl:when> <!--i for use as a square root of -1 -->
+ <xsl:when test="starts-with($content,'ⅉ')"><xsl:value-of select="'j'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'ⅉ')"/></xsl:call-template></xsl:when>
+<!-- ====================================================================== -->
+<!-- Unicode 3.2
+ -->
+<!-- ====================================================================== -->
+<xsl:when test="starts-with($content,'⅓')"><xsl:value-of select="'&#x02153;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅓')"/></xsl:call-template></xsl:when><!--\textfrac{1}{3}-->
+<xsl:when test="starts-with($content,'⅔')"><xsl:value-of select="'&#x02154;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅔')"/></xsl:call-template></xsl:when><!--\textfrac{2}{3}-->
+<xsl:when test="starts-with($content,'⅕')"><xsl:value-of select="'&#x02155;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅕')"/></xsl:call-template></xsl:when><!--\textfrac{1}{5}-->
+<xsl:when test="starts-with($content,'⅖')"><xsl:value-of select="'&#x02156;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅖')"/></xsl:call-template></xsl:when><!--\textfrac{2}{5}-->
+<xsl:when test="starts-with($content,'⅗')"><xsl:value-of select="'&#x02157;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅗')"/></xsl:call-template></xsl:when><!--\textfrac{3}{5}-->
+<xsl:when test="starts-with($content,'⅘')"><xsl:value-of select="'&#x02158;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅘')"/></xsl:call-template></xsl:when><!--\textfrac{4}{5}-->
+<xsl:when test="starts-with($content,'⅙')"><xsl:value-of select="'&#x02159;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅙')"/></xsl:call-template></xsl:when><!--\textfrac{1}{6}-->
+<xsl:when test="starts-with($content,'⅚')"><xsl:value-of select="'&#x0215A;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅚')"/></xsl:call-template></xsl:when><!--\textfrac{5}{6}-->
+<xsl:when test="starts-with($content,'⅛')"><xsl:value-of select="'&#x0215B;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅛')"/></xsl:call-template></xsl:when><!--\textfrac{1}{8}-->
+<xsl:when test="starts-with($content,'⅜')"><xsl:value-of select="'&#x0215C;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅜')"/></xsl:call-template></xsl:when><!--\textfrac{3}{8}-->
+<xsl:when test="starts-with($content,'⅝')"><xsl:value-of select="'&#x0215D;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅝')"/></xsl:call-template></xsl:when><!--\textfrac{5}{8}-->
+<xsl:when test="starts-with($content,'⅞')"><xsl:value-of select="'&#x0215E;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⅞')"/></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,'←')"><xsl:value-of select="'\leftarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'←')"/></xsl:call-template></xsl:when> <!--/leftarrow /gets A: =leftward arrow -->
+ <xsl:when test="starts-with($content,'↑')"><xsl:value-of select="'\uparrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↑')"/></xsl:call-template></xsl:when> <!--/uparrow A: =upward arrow -->
+ <xsl:when test="starts-with($content,'→')"><xsl:value-of select="'\rightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'→')"/></xsl:call-template></xsl:when> <!--/rightarrow /to A: =rightward arrow -->
+ <xsl:when test="starts-with($content,'↓')"><xsl:value-of select="'\downarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↓')"/></xsl:call-template></xsl:when> <!--/downarrow A: =downward arrow -->
+ <xsl:when test="starts-with($content,'↔')"><xsl:value-of select="'\leftrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↔')"/></xsl:call-template></xsl:when> <!--/leftrightarrow A: l&r arrow -->
+ <xsl:when test="starts-with($content,'↕')"><xsl:value-of select="'\updownarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↕')"/></xsl:call-template></xsl:when> <!--/updownarrow A: up&down arrow -->
+ <xsl:when test="starts-with($content,'↖')"><xsl:value-of select="'\nwarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↖')"/></xsl:call-template></xsl:when> <!--/nwarrow A: NW pointing arrow -->
+ <xsl:when test="starts-with($content,'↗')"><xsl:value-of select="'\nearrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↗')"/></xsl:call-template></xsl:when> <!--/nearrow A: NE pointing arrow -->
+ <xsl:when test="starts-with($content,'↘')"><xsl:value-of select="'\searrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↘')"/></xsl:call-template></xsl:when> <!--/searrow A: SE pointing arrow -->
+ <xsl:when test="starts-with($content,'↙')"><xsl:value-of select="'\swarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↙')"/></xsl:call-template></xsl:when> <!--/swarrow A: SW pointing arrow -->
+ <xsl:when test="starts-with($content,'↚')"><xsl:value-of select="'\nleftarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↚')"/></xsl:call-template></xsl:when> <!--/nleftarrow A: not left arrow --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'↛')"><xsl:value-of select="'\nrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↛')"/></xsl:call-template></xsl:when> <!--/nrightarrow A: not right arrow --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'↜')"><xsl:value-of select="'\leftsquigarrow '"
/><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="'\rightsquigarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↝')"/></xsl:call-template></xsl:when> <!--/rightsquigarrow A: rt arrow-wavy --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'↞')"><xsl:value-of select="'\twoheadleftarrow
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '↞')"/></xsl:call-template></xsl:when> <!--/twoheadleftarrow
A: --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'↠')"><xsl:value-of select="'\twoheadrightarrow
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '↠')"/></xsl:call-template></xsl:when> <!--/twoheadrightarrow
A: --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'↢')"><xsl:value-of select="'\leftarrowtail '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↢')"/></xsl:call-template></xsl:when> <!--/leftarrowtail A: left arrow-tailed --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'↣')"><xsl:value-of select="'\rightarrowtail '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↣')"/></xsl:call-template></xsl:when> <!--/rightarrowtail A: rt arrow-tailed --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'↦')"><xsl:value-of select="'\mapsto '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↦')"/></xsl:call-template></xsl:when> <!--/mapsto A: -->
+ <xsl:when test="starts-with($content,'↩')"><xsl:value-of select="'\hookleftarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↩')"/></xsl:call-template></xsl:when> <!--/hookleftarrow A: left arrow-hooked -->
+ <xsl:when test="starts-with($content,'↪')"><xsl:value-of select="'\hookrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↪')"/></xsl:call-template></xsl:when> <!--/hookrightarrow A: rt arrow-hooked -->
+ <xsl:when test="starts-with($content,'↫')"><xsl:value-of select="'\looparrowleft '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↫')"/></xsl:call-template></xsl:when> <!--/looparrowleft A: left arrow-looped --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'↬')"><xsl:value-of select="'\looparrowright '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↬')"/></xsl:call-template></xsl:when> <!--/looparrowright A: rt arrow-looped --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'↭')"><xsl:value-of
select="'\leftrightsquigarrow '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '↭')"/></xsl:call-template></xsl:when> <!--/leftrightsquigarrow
A: l&r arr-wavy --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'↮')"><xsl:value-of select="'\nleftrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↮')"/></xsl:call-template></xsl:when> <!--/nleftrightarrow A: not l&r arrow --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'↰')"><xsl:value-of select="'\Lsh '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↰')"/></xsl:call-template></xsl:when> <!--/Lsh A: --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'↱')"><xsl:value-of select="'\Rsh '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↱')"/></xsl:call-template></xsl:when> <!--/Rsh A: --> <!-- Required amssymb -->
+<xsl:when test="starts-with($content,'↳')"><xsl:value-of select="'&#x021B3;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↳')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{21B3}-->
+ <xsl:when test="starts-with($content,'↶')"><xsl:value-of select="'\curvearrowleft '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↶')"/></xsl:call-template></xsl:when> <!--/curvearrowleft A: left curved arrow --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'↷')"><xsl:value-of select="'\curvearrowright '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↷')"/></xsl:call-template></xsl:when> <!--/curvearrowright A: rt curved arrow --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'↺')"><xsl:value-of select="'\circlearrowleft '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↺')"/></xsl:call-template></xsl:when> <!--/circlearrowleft A: l arr in circle --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'↻')"><xsl:value-of select="'\circlearrowright
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '↻')"/></xsl:call-template></xsl:when> <!--/circlearrowright
A: r arr in circle --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'↼')"><xsl:value-of select="'&#x021BC;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '↼')"/></xsl:call-template></xsl:when> <!--/leftharpoonup A:
left harpoon-up --><!--\leftharpoonup-->
+ <xsl:when test="starts-with($content,'↽')"><xsl:value-of select="'&#x021BD;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '↽')"/></xsl:call-template></xsl:when> <!--/leftharpoondown A:
l harpoon-down --><!--\leftharpoondown-->
+ <xsl:when test="starts-with($content,'↾')"><xsl:value-of select="'\upharpoonright '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↾')"/></xsl:call-template></xsl:when> <!--/upharpoonright /restriction A: up harp-r --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'↿')"><xsl:value-of select="'\upharpoonleft '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'↿')"/></xsl:call-template></xsl:when> <!--/upharpoonleft A: up harpoon-left --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⇀')"><xsl:value-of select="'&#x021C0;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⇀')"/></xsl:call-template></xsl:when>
<!--/rightharpoonup A: rt harpoon-up --><!--\rightharpoonup-->
+ <xsl:when test="starts-with($content,'⇁')"><xsl:value-of select="'&#x021C1;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⇁')"/></xsl:call-template></xsl:when> <!--/rightharpoondown
A: rt harpoon-down --><!--\rightharpoondown-->
+ <xsl:when test="starts-with($content,'⇂')"><xsl:value-of select="'\downharpoonright
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⇂')"/></xsl:call-template></xsl:when> <!--/downharpoonright
A: down harpoon-rt --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'⇃')"><xsl:value-of select="'\downharpoonleft '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇃')"/></xsl:call-template></xsl:when> <!--/downharpoonleft A: dn harpoon-left --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'⇄')"><xsl:value-of select="'\rightleftarrows '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇄')"/></xsl:call-template></xsl:when> <!--/rightleftarrows A: r arr over l arr --> <!--
Required amssymb -->
+<xsl:when test="starts-with($content,'⇅')"><xsl:value-of select="'&#x021C5; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇅')"/></xsl:call-template></xsl:when><!--\dblarrowupdown-->
+ <xsl:when test="starts-with($content,'⇆')"><xsl:value-of select="'\leftrightarrows '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇆')"/></xsl:call-template></xsl:when> <!--/leftrightarrows A: l arr over r arr --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'⇇')"><xsl:value-of select="'\leftleftarrows '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇇')"/></xsl:call-template></xsl:when> <!--/leftleftarrows A: two left arrows --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'⇈')"><xsl:value-of select="'\upuparrows '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇈')"/></xsl:call-template></xsl:when> <!--/upuparrows A: two up arrows --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'⇉')"><xsl:value-of select="'\rightrightarrows
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⇉')"/></xsl:call-template></xsl:when> <!--/rightrightarrows
A: two rt arrows --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'⇊')"><xsl:value-of select="'\downdownarrows '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇊')"/></xsl:call-template></xsl:when> <!--/downdownarrows A: two down arrows --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'⇋')"><xsl:value-of select="'\leftrightharpoons
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⇋')"/></xsl:call-template></xsl:when> <!--/leftrightharpoons
A: l harp over r -->
+ <xsl:when test="starts-with($content,'⇌')"><xsl:value-of select="'\rightleftharpoons
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⇌')"/></xsl:call-template></xsl:when> <!--/rightleftharpoons
A: r harp over l -->
+ <xsl:when test="starts-with($content,'⇍')"><xsl:value-of select="'\nLeftarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇍')"/></xsl:call-template></xsl:when> <!--/nLeftarrow A: not implied by --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'⇎')"><xsl:value-of select="'\nLeftrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇎')"/></xsl:call-template></xsl:when> <!--/nLeftrightarrow A: not l&r dbl arr --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'⇏')"><xsl:value-of select="'\nRightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇏')"/></xsl:call-template></xsl:when> <!--/nRightarrow A: not implies --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'⇐')"><xsl:value-of select="'\Leftarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇐')"/></xsl:call-template></xsl:when> <!--/Leftarrow A: is implied by -->
+ <xsl:when test="starts-with($content,'⇑')"><xsl:value-of select="'\Uparrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇑')"/></xsl:call-template></xsl:when> <!--/Uparrow A: up dbl arrow -->
+ <xsl:when test="starts-with($content,'⇒')"><xsl:value-of select="'\Rightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇒')"/></xsl:call-template></xsl:when> <!--/Rightarrow A: implies -->
+ <xsl:when test="starts-with($content,'⇓')"><xsl:value-of select="'\Downarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇓')"/></xsl:call-template></xsl:when> <!--/Downarrow A: down dbl arrow -->
+ <xsl:when test="starts-with($content,'⇔')"><xsl:value-of select="'\Leftrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇔')"/></xsl:call-template></xsl:when> <!--/Leftrightarrow A: l&r dbl arrow -->
+<!-- <xsl:when test="starts-with($content,'⇔')"><xsl:value-of select="'\iff '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇔')"/></xsl:call-template></xsl:when> /iff if and only if -->
+ <xsl:when test="starts-with($content,'⇕')"><xsl:value-of select="'\Updownarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇕')"/></xsl:call-template></xsl:when> <!--/Updownarrow A: up&down dbl arrow -->
+ <xsl:when test="starts-with($content,'⇚')"><xsl:value-of select="'\Lleftarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇚')"/></xsl:call-template></xsl:when> <!--/Lleftarrow A: left triple arrow --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⇛')"><xsl:value-of select="'\Rrightarrow '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇛')"/></xsl:call-template></xsl:when> <!--/Rrightarrow A: right triple arrow --> <!-- Required
amssymb -->
+<xsl:when test="starts-with($content,'⇝')"><xsl:value-of select="'\rightsquigarrow '"
/><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="'&#x021F5; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇵')"/></xsl:call-template></xsl:when><!--\DownArrowUpArrow-->
+<xsl:when test="starts-with($content,'⇽')"><xsl:value-of select="'&#x021FD; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇽')"/></xsl:call-template></xsl:when><!--\leftarrowtriangle-->
+<xsl:when test="starts-with($content,'⇾')"><xsl:value-of select="'&#x021FE; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇾')"/></xsl:call-template></xsl:when><!--\rightarrowtriangle-->
+<xsl:when test="starts-with($content,'⇿')"><xsl:value-of select="'&#x021FF; '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⇿')"/></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,'∀')"><xsl:value-of select="'\forall '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∀')"/></xsl:call-template></xsl:when> <!--/forall for all -->
+ <xsl:when test="starts-with($content,'∁')"><xsl:value-of select="'&#x02201;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∁')"/></xsl:call-template></xsl:when> <!--/complement -
complement sign --> <!-- Required amssymb --><!--\complement-->
+ <xsl:when test="starts-with($content,'∂')"><xsl:value-of select="'\partial '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∂')"/></xsl:call-template></xsl:when> <!--/partial partial differential -->
+ <xsl:when test="starts-with($content,'∃')"><xsl:value-of select="'\exists '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∃')"/></xsl:call-template></xsl:when> <!--/exists at least one exists -->
+ <xsl:when test="starts-with($content,'∄')"><xsl:value-of select="'\nexists '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∄')"/></xsl:call-template></xsl:when> <!--/nexists - negated exists --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'∅︀')"><xsl:value-of select="'\emptyset
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∅︀')"/></xsl:call-template></xsl:when> <!--/emptyset -
zero, slash -->
+ <xsl:when test="starts-with($content,'∅')"><xsl:value-of select="'\varnothing '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∅')"/></xsl:call-template></xsl:when> <!--/varnothing - circle, slash --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'∇')"><xsl:value-of select="'\nabla '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∇')"/></xsl:call-template></xsl:when> <!--/nabla del, Hamilton operator -->
+ <xsl:when test="starts-with($content,'∈')"><xsl:value-of select="'\in '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∈')"/></xsl:call-template></xsl:when> <!--/in R: set membership -->
+ <xsl:when test="starts-with($content,'∉')"><xsl:value-of select="'\notin '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∉')"/></xsl:call-template></xsl:when> <!--/notin N: negated set membership -->
+ <xsl:when test="starts-with($content,'∋')"><xsl:value-of select="'\ni '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∋')"/></xsl:call-template></xsl:when> <!--/ni /owns R: contains -->
+ <xsl:when test="starts-with($content,'∌')"><xsl:value-of select="'&#x0220C;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∌')"/></xsl:call-template></xsl:when> <!--negated contains
--><!--\not\ni-->
+ <xsl:when test="starts-with($content,'∏')"><xsl:value-of select="'\prod '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∏')"/></xsl:call-template></xsl:when> <!--/prod L: product operator -->
+ <xsl:when test="starts-with($content,'∐')"><xsl:value-of select="'\coprod '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∐')"/></xsl:call-template></xsl:when> <!--/coprod L: coproduct operator -->
+ <xsl:when test="starts-with($content,'∑')"><xsl:value-of select="'\sum '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∑')"/></xsl:call-template></xsl:when> <!--/sum L: summation operator -->
+ <xsl:when test="starts-with($content,'−')"><xsl:value-of select="'&#x02212;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '−')"/></xsl:call-template></xsl:when> <!--B: minus
sign --> <!--\minus-->
+ <xsl:when test="starts-with($content,'∓')"><xsl:value-of select="'\mp '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∓')"/></xsl:call-template></xsl:when> <!--/mp B: minus-or-plus sign -->
+ <xsl:when test="starts-with($content,'∔')"><xsl:value-of select="'\dotplus '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∔')"/></xsl:call-template></xsl:when> <!--/dotplus B: plus sign, dot above --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'∖')"><xsl:value-of select="'\setminus '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∖')"/></xsl:call-template></xsl:when> <!--/setminus B: reverse solidus -->
+ <xsl:when test="starts-with($content,'∗')"><xsl:value-of select="'\ast '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∗')"/></xsl:call-template></xsl:when> <!--low asterisk -->
+ <xsl:when test="starts-with($content,'∘')"><xsl:value-of select="'\circ '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∘')"/></xsl:call-template></xsl:when> <!--/circ B: composite function (small circle) -->
+ <xsl:when test="starts-with($content,'∙')"><xsl:value-of select="'\bullet '"
/><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="'&#x0221A;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '√')"/></xsl:call-template></xsl:when> <!--/surd
radical --><!--\surd-->
+ <xsl:when test="starts-with($content,'∝')"><xsl:value-of select="'\propto '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∝')"/></xsl:call-template></xsl:when> <!--/propto R: is proportional to -->
+ <xsl:when test="starts-with($content,'∞')"><xsl:value-of select="'\infty '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∞')"/></xsl:call-template></xsl:when> <!--/infty infinity -->
+ <xsl:when test="starts-with($content,'∟')"><xsl:value-of select="'&#x0221F;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∟')"/></xsl:call-template></xsl:when> <!--/right (90
degree) angle --><!--\rightangle-->
+ <xsl:when test="starts-with($content,'∠')"><xsl:value-of select="'\angle '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∠')"/></xsl:call-template></xsl:when> <!--/angle - angle -->
+ <xsl:when test="starts-with($content,'∡')"><xsl:value-of select="'\measuredangle '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∡')"/></xsl:call-template></xsl:when> <!--/measuredangle - angle-measured --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'∢')"><xsl:value-of select="'\sphericalangle '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∢')"/></xsl:call-template></xsl:when><!--/sphericalangle angle-spherical --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'∣')"><xsl:value-of select="'\mid '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∣')"/></xsl:call-template></xsl:when> <!--/mid R: -->
+ <xsl:when test="starts-with($content,'∤︀')"><xsl:value-of select="'\nshortmid
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∤︀')"/></xsl:call-template></xsl:when> <!--/nshortmid
--> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'∤')"><xsl:value-of select="'\nmid '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∤')"/></xsl:call-template></xsl:when> <!--/nmid --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'∥')"><xsl:value-of select="'\parallel '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∥')"/></xsl:call-template></xsl:when> <!--/parallel R: parallel -->
+ <xsl:when test="starts-with($content,'∦︀')"><xsl:value-of
select="'\nshortparallel '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∦︀')"/></xsl:call-template></xsl:when>
<!--/nshortparallel N: not short par --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'∦')"><xsl:value-of select="'\nparallel '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∦')"/></xsl:call-template></xsl:when> <!--/nparallel N: not parallel --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'∧')"><xsl:value-of select="'\wedge '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∧')"/></xsl:call-template></xsl:when> <!--/wedge /land B: logical and -->
+ <xsl:when test="starts-with($content,'∨')"><xsl:value-of select="'\vee '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∨')"/></xsl:call-template></xsl:when> <!--/vee /lor B: logical or -->
+ <xsl:when test="starts-with($content,'∩')"><xsl:value-of select="'\cap '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∩')"/></xsl:call-template></xsl:when> <!--/cap B: intersection -->
+ <xsl:when test="starts-with($content,'∪')"><xsl:value-of select="'\cup '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∪')"/></xsl:call-template></xsl:when> <!--/cup B: union or logical sum -->
+ <xsl:when test="starts-with($content,'∫')"><xsl:value-of select="'\int '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∫')"/></xsl:call-template></xsl:when> <!--/int L: integral operator -->
+ <xsl:when test="starts-with($content,'∬')"><xsl:value-of select="'\iint '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∬')"/></xsl:call-template></xsl:when> <!--double integral operator --> <!-- Required
amsmath -->
+ <xsl:when test="starts-with($content,'∭')"><xsl:value-of select="'\iiint '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∭')"/></xsl:call-template></xsl:when> <!--/iiint triple integral operator --> <!-- Required
amsmath -->
+ <xsl:when test="starts-with($content,'∮')"><xsl:value-of select="'\oint '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∮')"/></xsl:call-template></xsl:when> <!--/oint L: contour integral operator -->
+ <xsl:when test="starts-with($content,'∯')"><xsl:value-of select="'&#x0222F;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∯')"/></xsl:call-template></xsl:when> <!-- \surfintegral
--><!--\oiint-->
+ <xsl:when test="starts-with($content,'∰')"><xsl:value-of select="'&#x02230;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∰')"/></xsl:call-template></xsl:when> <!--
\volintegral --><!--\oiiint-->
+ <xsl:when test="starts-with($content,'∱')"><xsl:value-of select="'&#x02231;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∱')"/></xsl:call-template></xsl:when><!--\clwintegral-->
+ <xsl:when test="starts-with($content,'∲')"><xsl:value-of select="'&#x02232;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∲')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{2232}-->
+ <xsl:when test="starts-with($content,'∳')"><xsl:value-of select="'&#x02233;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∳')"/></xsl:call-template></xsl:when><!--\ElsevierGlyph{2233}-->
+ <xsl:when test="starts-with($content,'∴')"><xsl:value-of select="'\therefore '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∴')"/></xsl:call-template></xsl:when> <!--/therefore R: therefore --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'∵')"><xsl:value-of select="'\because '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∵')"/></xsl:call-template></xsl:when> <!--/because R: because --> <!-- Required amssymb -->
+<!-- ? --> <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> <!--/ratio -->
+ <xsl:when test="starts-with($content,'∷')"><xsl:value-of select="'&#x02237;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∷')"/></xsl:call-template></xsl:when> <!--/Colon, two colons
--><!--\Colon-->
+ <xsl:when test="starts-with($content,'∸')"><xsl:value-of select="'&#x02238;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∸')"/></xsl:call-template></xsl:when> <!--/dotminus
B: minus sign, dot above --><!--\dotminus-->
+<!-- <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="'\mathbin{{:}\!\!{-}\!\!{:}}'" /><xsl:call-template name="replaceEntities"><xsl:with-param
name="content" select="substring-after($content, '∺')"/></xsl:call-template></xsl:when> <!-- minus
with four dots, geometric properties -->
+ <xsl:when test="starts-with($content,'∻')"><xsl:value-of select="'&#x0223B;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∻')"/></xsl:call-template></xsl:when> <!--
homothetic --><!--\kernelcontraction-->
+ <xsl:when test="starts-with($content,'∼')"><xsl:value-of select="'\sim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∼')"/></xsl:call-template></xsl:when> <!--/sim R: similar -->
+ <xsl:when test="starts-with($content,'∽')"><xsl:value-of select="'\backsim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'∽')"/></xsl:call-template></xsl:when> <!--/backsim R: reverse similar --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'∾')"><xsl:value-of select="'&#x0223E;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '∾')"/></xsl:call-template></xsl:when> <!--
most positive --><!--\lazysinv-->
+<!-- <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> ac current -->
+ <xsl:when test="starts-with($content,'≀')"><xsl:value-of select="'\wr '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≀')"/></xsl:call-template></xsl:when> <!--/wr B: wreath product -->
+ <xsl:when test="starts-with($content,'≁')"><xsl:value-of select="'\nsim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≁')"/></xsl:call-template></xsl:when> <!--/nsim N: not similar --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'≂̸')"><xsl:value-of select="'\neqsim '"
/><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="'&#x02242;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≂')"/></xsl:call-template></xsl:when> <!--/esim R:
equals, similar --> <!-- Required amssymb --><!--\eqsim-->
+ <xsl:when test="starts-with($content,'≃')"><xsl:value-of select="'\simeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≃')"/></xsl:call-template></xsl:when> <!--/simeq R: similar, equals -->
+ <xsl:when test="starts-with($content,'≄')"><xsl:value-of select="'&#x02244;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≄')"/></xsl:call-template></xsl:when> <!--/nsimeq N:
not similar, equals --><!--\nsime-->
+ <xsl:when test="starts-with($content,'≅')"><xsl:value-of select="'\cong '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≅')"/></xsl:call-template></xsl:when> <!--/cong R: congruent with -->
+ <xsl:when test="starts-with($content,'≆')"><xsl:value-of select="'&#x02246;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≆')"/></xsl:call-template></xsl:when><!-- similar, not equals
--><!--\approxnotequal-->
+ <xsl:when test="starts-with($content,'≇')"><xsl:value-of select="'\ncong '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≇')"/></xsl:call-template></xsl:when> <!--/ncong N: not congruent with --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≈')"><xsl:value-of select="'\approx '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≈')"/></xsl:call-template></xsl:when> <!--/approx R: approximate -->
+<!-- <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> not, vert, approximate -->
+ <xsl:when test="starts-with($content,'≉')"><xsl:value-of select="'&#x02249;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≉')"/></xsl:call-template></xsl:when> <!--/napprox N: not
approximate --><!--\napprox-->
+ <xsl:when test="starts-with($content,'≊')"><xsl:value-of select="'\approxeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≊')"/></xsl:call-template></xsl:when> <!--/approxeq R: approximate, equals --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≋̸')"><xsl:value-of select="'\not\apid
'" /><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="'&#x0224B;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≋')"/></xsl:call-template></xsl:when> <!-- approximately
identical to --><!--\tildetrpl-->
+ <xsl:when test="starts-with($content,'≌')"><xsl:value-of select="'&#x0224C;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≌')"/></xsl:call-template></xsl:when> <!-- /backcong R:
reverse congruent --><!--\allequal-->
+ <xsl:when test="starts-with($content,'≍')"><xsl:value-of select="'\asymp '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≍')"/></xsl:call-template></xsl:when> <!--/asymp R: asymptotically equal to -->
+ <xsl:when test="starts-with($content,'≎̸')"><xsl:value-of select="'\nBumpeq
'" /><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="'\Bumpeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≎')"/></xsl:call-template></xsl:when> <!--/Bumpeq R: bumpy equals --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≏̸')"><xsl:value-of select="'\nbumpeq
'" /><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="'\bumpeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≏')"/></xsl:call-template></xsl:when> <!--/bumpeq R: bumpy equals, equals --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'≐̸')"><xsl:value-of select="'\not\doteq
'" /><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="'\doteq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≐')"/></xsl:call-template></xsl:when> <!--/doteq R: equals, single dot above -->
+ <xsl:when test="starts-with($content,'≑')"><xsl:value-of select="'&#x02251;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≑')"/></xsl:call-template></xsl:when> <!--/doteqdot /Doteq R:
eq, even dots --> <!-- Required amssymb --><!--\Doteq-->
+ <xsl:when test="starts-with($content,'≒')"><xsl:value-of select="'\fallingdotseq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≒')"/></xsl:call-template></xsl:when><!--/fallingdotseq R: eq, falling dots --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≓')"><xsl:value-of select="'\risingdotseq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≓')"/></xsl:call-template></xsl:when> <!--/risingdotseq R: eq, rising dots --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≔')"><xsl:value-of select="'\coloneq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≔')"/></xsl:call-template></xsl:when> <!--/coloneq R: colon, equals -->
+ <xsl:when test="starts-with($content,'≕')"><xsl:value-of select="'\eqcolon '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≕')"/></xsl:call-template></xsl:when> <!--/eqcolon R: equals, colon -->
+ <xsl:when test="starts-with($content,'≖')"><xsl:value-of select="'\eqcirc '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≖')"/></xsl:call-template></xsl:when> <!--/eqcirc R: circle on equals sign --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'≗')"><xsl:value-of select="'\circeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≗')"/></xsl:call-template></xsl:when> <!--/circeq R: circle, equals --> <!-- Required
amssymb -->
+<!-- ? --> <xsl:when test="starts-with($content,'≘')"><xsl:value-of
select="'\stackrel{\frown}{=}'" /><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="'&#x02259;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≙')"/></xsl:call-template></xsl:when> <!--/wedgeq R:
corresponds to (wedge, equals) --><!--\wedgeq-->
+ <xsl:when test="starts-with($content,'≚')"><xsl:value-of select="'&#x0225A;'"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≚')"/></xsl:call-template></xsl:when> <!--logical or, equals --><!--\ElsevierGlyph{225A}-->
+ <xsl:when test="starts-with($content,'≛')"><xsl:value-of select="'&#x0225B;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≛')"/></xsl:call-template></xsl:when> <!--equal, asterisk
above --><!--\starequal-->
+ <xsl:when test="starts-with($content,'≜')"><xsl:value-of select="'\triangleq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≜')"/></xsl:call-template></xsl:when> <!--/triangleq R: triangle, equals --> <!-- Required
amssymb -->
+<!-- ? --> <xsl:when test="starts-with($content,'≝')"><xsl:value-of
select="'\stackrel{\scriptscriptstyle\mathrm{def}}{=}'" /><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="'\stackrel{\scriptscriptstyle\mathrm{m}}{=}'" /><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="'&#x0225F;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≟')"/></xsl:call-template></xsl:when> <!--/questeq R: equal
with questionmark --><!--\questeq-->
+<!-- <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> not equal, dot -->
+ <xsl:when test="starts-with($content,'≠')"><xsl:value-of select="'\ne '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≠')"/></xsl:call-template></xsl:when> <!--/ne /neq R: not equal -->
+<!-- <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> reverse not equivalent -->
+ <xsl:when test="starts-with($content,'≡')"><xsl:value-of select="'\equiv '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≡')"/></xsl:call-template></xsl:when> <!--/equiv R: identical with -->
+ <xsl:when test="starts-with($content,'≢')"><xsl:value-of select="'\nequiv '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≢')"/></xsl:call-template></xsl:when> <!--/nequiv N: not identical with -->
+<!-- <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="'\le '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≤')"/></xsl:call-template></xsl:when> <!--/leq /le R: less-than-or-equal -->
+ <xsl:when test="starts-with($content,'≥')"><xsl:value-of select="'\ge '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≥')"/></xsl:call-template></xsl:when> <!--/geq /ge R: greater-than-or-equal -->
+ <xsl:when test="starts-with($content,'≦')"><xsl:value-of select="'\leqq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≦')"/></xsl:call-template></xsl:when> <!--/leqq R: less, double equals --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≧')"><xsl:value-of select="'\geqq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≧')"/></xsl:call-template></xsl:when> <!--/geqq R: greater, double equals --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≨︀')"><xsl:value-of select="'\lvertneqq
'" /><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="'\lneqq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≨')"/></xsl:call-template></xsl:when> <!--/lneqq N: less, not double equals --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'≩︀')"><xsl:value-of select="'\gvertneqq
'" /><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="'\gneqq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≩')"/></xsl:call-template></xsl:when> <!--/gneqq N: greater, not dbl equals --> <!--
Required amssymb -->
+<!-- <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> not much
less than, variant -->
+ <xsl:when test="starts-with($content,'≪̸')"><xsl:value-of
select="'\NotLessLess '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≪̸')"/></xsl:call-template></xsl:when> <!-- not, vert,
much less than -->
+ <xsl:when test="starts-with($content,'≪')"><xsl:value-of select="'\ll '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≪')"/></xsl:call-template></xsl:when> <!--/ll R: double less-than sign -->
+<!-- <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> not much
greater than, variant -->
+ <xsl:when test="starts-with($content,'≫̸')"><xsl:value-of
select="'\NotGreaterGreater '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≫̸')"/></xsl:call-template></xsl:when> <!-- not, vert,
much greater than -->
+ <xsl:when test="starts-with($content,'≫')"><xsl:value-of select="'\gg '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≫')"/></xsl:call-template></xsl:when> <!--/gg R: dbl greater-than sign -->
+ <xsl:when test="starts-with($content,'≬')"><xsl:value-of select="'\between '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≬')"/></xsl:call-template></xsl:when> <!--/between R: between --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'≭')"><xsl:value-of select="'&#x0226D;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≭')"/></xsl:call-template></xsl:when><!--\not\kern-0.3em\times-->
+ <xsl:when test="starts-with($content,'≮')"><xsl:value-of select="'\nless '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≮')"/></xsl:call-template></xsl:when> <!--/nless N: not less-than --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'≯')"><xsl:value-of select="'\ngtr '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≯')"/></xsl:call-template></xsl:when> <!--/ngtr N: not greater-than --> <!-- Required
amssymb -->
+<!-- <xsl:when test="starts-with($content,'≰⃥')"><xsl:value-of select="'\nleq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≰⃥')"/></xsl:call-template></xsl:when> /nleq N: not less-than-or-equal --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'≰')"><xsl:value-of select="'\nleq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≰')"/></xsl:call-template></xsl:when> <!--/nleqq N: not less, dbl equals --> <!-- Required
amssymb -->
+<!-- <xsl:when test="starts-with($content,'≱⃥')"><xsl:value-of select="'\ngeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≱⃥')"/></xsl:call-template></xsl:when> /ngeq N: not greater-than-or-equal --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≱')"><xsl:value-of select="'\ngeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≱')"/></xsl:call-template></xsl:when> <!--/ngeqq N: not greater, dbl equals --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'≲')"><xsl:value-of select="'\lesssim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≲')"/></xsl:call-template></xsl:when> <!--/lesssim R: less, similar --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'≳')"><xsl:value-of select="'\gtrsim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≳')"/></xsl:call-template></xsl:when> <!--/gtrsim R: greater, similar --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≴')"><xsl:value-of select="'&#x02274;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≴')"/></xsl:call-template></xsl:when> <!--not less, similar
--> <!-- Required amssymb --><!--\ElsevierGlyph{2274}-->
+ <xsl:when test="starts-with($content,'≵')"><xsl:value-of select="'&#x02275;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≵')"/></xsl:call-template></xsl:when> <!--not greater,
similar --> <!-- Required amssymb --><!--\ElsevierGlyph{2275}-->
+ <xsl:when test="starts-with($content,'≶')"><xsl:value-of select="'\lessgtr '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≶')"/></xsl:call-template></xsl:when> <!--/lessgtr R: less, greater --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'≷')"><xsl:value-of select="'\gtrless '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≷')"/></xsl:call-template></xsl:when> <!--/gtrless R: greater, less --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'≸')"><xsl:value-of select="'&#x02278;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≸')"/></xsl:call-template></xsl:when> <!--not less, greater
--> <!-- Required amssymb --><!--\notlessgreater-->
+ <xsl:when test="starts-with($content,'≹')"><xsl:value-of select="'&#x02279;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '≹')"/></xsl:call-template></xsl:when> <!--not greater, less
--> <!-- Required amssymb --><!--\notgreaterless-->
+ <xsl:when test="starts-with($content,'≺')"><xsl:value-of select="'\prec '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≺')"/></xsl:call-template></xsl:when> <!--/prec R: precedes -->
+ <xsl:when test="starts-with($content,'≻')"><xsl:value-of select="'\succ '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≻')"/></xsl:call-template></xsl:when> <!--/succ R: succeeds -->
+ <xsl:when test="starts-with($content,'≼')"><xsl:value-of select="'\preccurlyeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≼')"/></xsl:call-template></xsl:when> <!--/preccurlyeq R: precedes, curly eq --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≽')"><xsl:value-of select="'\succcurlyeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≽')"/></xsl:call-template></xsl:when> <!--/succcurlyeq R: succeeds, curly eq --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≾̸')"><xsl:value-of select="'\nprecsim
'" /><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="'\precsim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≾')"/></xsl:call-template></xsl:when> <!--/precsim R: precedes, similar --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'≿̸')"><xsl:value-of select="'\nsuccsim
'" /><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="'\succsim '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'≿')"/></xsl:call-template></xsl:when> <!--/succsim R: succeeds, similar --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⊀')"><xsl:value-of select="'\nprec '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊀')"/></xsl:call-template></xsl:when> <!--/nprec N: not precedes --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'⊁')"><xsl:value-of select="'\nsucc '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊁')"/></xsl:call-template></xsl:when> <!--/nsucc N: not succeeds --> <!-- Required amssymb
-->
+ <xsl:when test="starts-with($content,'⊂')"><xsl:value-of select="'\subset '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊂')"/></xsl:call-template></xsl:when> <!--/subset R: subset or is implied by -->
+ <xsl:when test="starts-with($content,'⊃')"><xsl:value-of select="'\supset '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊃')"/></xsl:call-template></xsl:when> <!--/supset R: superset or implies -->
+ <xsl:when test="starts-with($content,'⊄')"><xsl:value-of select="'\nsubset '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊄')"/></xsl:call-template></xsl:when> <!--not subset -->
+ <xsl:when test="starts-with($content,'⊅')"><xsl:value-of select="'\nsupset '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊅')"/></xsl:call-template></xsl:when> <!--not superset -->
+ <xsl:when test="starts-with($content,'⊆')"><xsl:value-of select="'\subseteq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊆')"/></xsl:call-template></xsl:when> <!--/subseteq R: subset, equals -->
+ <xsl:when test="starts-with($content,'⊇')"><xsl:value-of select="'\supseteq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊇')"/></xsl:call-template></xsl:when> <!--/supseteq R: superset, equals -->
+ <xsl:when test="starts-with($content,'⊈')"><xsl:value-of select="'\nsubseteq '"
/><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="'\nsupseteq '"
/><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="'\varsubsetneqq '" /><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="'\subsetneq '"
/><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="'\varsupsetneq '" /><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="'\supsetneq '"
/><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="'&#x0228D;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⊍')"/></xsl:call-template></xsl:when><!--\cupdot-->
+ <xsl:when test="starts-with($content,'⊎')"><xsl:value-of select="'\uplus '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊎')"/></xsl:call-template></xsl:when> <!--/uplus B: plus sign in union -->
+ <xsl:when test="starts-with($content,'⊏̸')"><xsl:value-of
select="'\NotSquareSubset '" /><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="'\sqsubset '"
/><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="'\NotSquareSuperset '" /><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="'\sqsupset '"
/><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="'\sqsubseteq '"
/><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="'\sqsupseteq '"
/><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="'\sqcap '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊓')"/></xsl:call-template></xsl:when> <!--/sqcap B: square intersection -->
+ <xsl:when test="starts-with($content,'⊔')"><xsl:value-of select="'\sqcup '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊔')"/></xsl:call-template></xsl:when> <!--/sqcup B: square union -->
+ <xsl:when test="starts-with($content,'⊕')"><xsl:value-of select="'\oplus '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊕')"/></xsl:call-template></xsl:when> <!--/oplus B: plus sign in circle -->
+ <xsl:when test="starts-with($content,'⊖')"><xsl:value-of select="'\ominus '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊖')"/></xsl:call-template></xsl:when> <!--/ominus B: minus sign in circle -->
+ <xsl:when test="starts-with($content,'⊗')"><xsl:value-of select="'\otimes '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊗')"/></xsl:call-template></xsl:when> <!--/otimes B: multiply sign in circle -->
+ <xsl:when test="starts-with($content,'⊘')"><xsl:value-of select="'\oslash '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊘')"/></xsl:call-template></xsl:when> <!--/oslash B: solidus in circle -->
+ <xsl:when test="starts-with($content,'⊙')"><xsl:value-of select="'\odot '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊙')"/></xsl:call-template></xsl:when> <!--/odot B: middle dot in circle --> <!--/bigodot L:
circle dot operator -->
+ <xsl:when test="starts-with($content,'⊚')"><xsl:value-of select="'\circledcirc '"
/><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="'\circledast '"
/><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="'\circleddash '"
/><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="'\boxplus '"
/><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="'\boxminus '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊟')"/></xsl:call-template></xsl:when> <!--/boxminus B: minus sign in box --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⊠')"><xsl:value-of select="'\boxtimes '"
/><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="'\boxdot '"
/><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="'\vdash '"
/><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="'\dashv '"
/><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="'\top '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊤')"/></xsl:call-template></xsl:when> <!--/top top -->
+ <xsl:when test="starts-with($content,'⊥')"><xsl:value-of select="'\perp '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊥')"/></xsl:call-template></xsl:when> <!--/perp R: perpendicular --><!--/bot bottom -->
+<!-- <xsl:when test="starts-with($content,'⊦')"><xsl:value-of select="'\vdash '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊦')"/></xsl:call-template></xsl:when> /vdash R: vertical, dash -->
+ <xsl:when test="starts-with($content,'⊧')"><xsl:value-of select="'\models '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊧')"/></xsl:call-template></xsl:when> <!--/vDash R: vertical, dbl dash --> <!--
Required amssymb -->
+ <xsl:when test="starts-with($content,'⊨')"><xsl:value-of select="'\vDash '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊨')"/></xsl:call-template></xsl:when> <!--/models R: -->
+ <xsl:when test="starts-with($content,'⊩')"><xsl:value-of select="'\Vdash '"
/><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="'\Vvdash '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⊪')"/></xsl:call-template></xsl:when> <!--/Vvdash R: triple vertical, dash --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⊫')"><xsl:value-of select="'\VDash '"
/><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="'\nvdash '"
/><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="'\nvDash '"
/><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="'&#x022AE;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⊮')"/></xsl:call-template></xsl:when><!--\nVdash-->
+ <xsl:when test="starts-with($content,'⊯')"><xsl:value-of select="'\nVDash '"
/><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="'\vartriangleleft '"
/><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="'\vartriangleright
'" /><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="'\trianglelefteq '"
/><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="'\trianglerighteq '"
/><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="'&#x022B6;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⊶')"/></xsl:call-template></xsl:when><!--\original-->
+ <xsl:when test="starts-with($content,'⊷')"><xsl:value-of select="'&#x022B7;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⊷')"/></xsl:call-template></xsl:when><!--\image-->
+ <xsl:when test="starts-with($content,'⊸')"><xsl:value-of select="'\multimap '"
/><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="'&#x022B9;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⊹')"/></xsl:call-template></xsl:when><!--\hermitconjmatrix-->
+ <xsl:when test="starts-with($content,'⊺')"><xsl:value-of select="'\intercal '"
/><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="'\veebar '"
/><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="'&#x022BE;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⊾')"/></xsl:call-template></xsl:when><!--\rightanglearc-->
+ <xsl:when test="starts-with($content,'⋀')"><xsl:value-of select="'\bigwedge '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋀')"/></xsl:call-template></xsl:when> <!--/bigwedge L: logical or operator -->
+ <xsl:when test="starts-with($content,'⋁')"><xsl:value-of select="'\bigvee '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋁')"/></xsl:call-template></xsl:when> <!--/bigcap L: intersection operator -->
+ <xsl:when test="starts-with($content,'⋂')"><xsl:value-of select="'\bigcap '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋂')"/></xsl:call-template></xsl:when> <!--/bigvee L: logical and operator -->
+ <xsl:when test="starts-with($content,'⋃')"><xsl:value-of select="'\bigcup '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋃')"/></xsl:call-template></xsl:when> <!--/bigcup L: union operator -->
+ <xsl:when test="starts-with($content,'⋄')"><xsl:value-of select="'\diamond '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋄')"/></xsl:call-template></xsl:when> <!--/diamond B: open diamond -->
+ <xsl:when test="starts-with($content,'⋅')"><xsl:value-of select="'\cdot '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋅')"/></xsl:call-template></xsl:when> <!--/cdot B: small middle dot -->
+ <xsl:when test="starts-with($content,'⋆')"><xsl:value-of select="'\star '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋆')"/></xsl:call-template></xsl:when> <!--/star B: small star, filled -->
+ <xsl:when test="starts-with($content,'⋇')"><xsl:value-of select="'\divideontimes '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋇')"/></xsl:call-template></xsl:when> <!--/divideontimes B: division on times --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⋈')"><xsl:value-of select="'\bowtie '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋈')"/></xsl:call-template></xsl:when> <!--/bowtie R: -->
+ <xsl:when test="starts-with($content,'⋉')"><xsl:value-of select="'\ltimes '"
/><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="'\rtimes '"
/><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="'\leftthreetimes '"
/><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="'\rightthreetimes '"
/><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="'\backsimeq '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋍')"/></xsl:call-template></xsl:when> <!--/backsimeq R: reverse similar, eq --> <!-- Required
amssymb -->
+ <xsl:when test="starts-with($content,'⋎')"><xsl:value-of select="'\curlyvee '"
/><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="'\curlywedge '"
/><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="'\Subset '"
/><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="'\Supset '"
/><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="'\Cap '"
/><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="'\Cup '"
/><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="'\pitchfork '"
/><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="'\lessdot '"
/><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="'\gtrdot '"
/><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="'&#x022D8;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⋘')"/></xsl:call-template></xsl:when><!--\verymuchless-->
+ <xsl:when test="starts-with($content,'⋙')"><xsl:value-of select="'\ggg '"
/><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="'\lesseqgtr '"
/><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="'\gtreqless '"
/><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="'\curlyeqprec '"
/><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="'\curlyeqsucc '"
/><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="'&#x022E2;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⋢')"/></xsl:call-template></xsl:when><!--\not\sqsubseteq-->
+ <xsl:when test="starts-with($content,'⋣')"><xsl:value-of select="'&#x022E3;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⋣')"/></xsl:call-template></xsl:when><!--\not\sqsupseteq-->
+ <xsl:when test="starts-with($content,'⋥')"><xsl:value-of select="'&#x022E5;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⋥')"/></xsl:call-template></xsl:when><!--\Elzsqspne-->
+ <xsl:when test="starts-with($content,'⋦')"><xsl:value-of select="'\lnsim '"
/><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="'\gnsim '"
/><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="'\precnsim '"
/><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="'\succnsim '"
/><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="'\ntriangleleft '"
/><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="'\ntriangleright '"
/><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="'\ntrianglelefteq '"
/><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="'\ntrianglerighteq
'" /><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="'\vdots '"
/><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="'\cdots '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋯')"/></xsl:call-template></xsl:when> <!--/cdots, three dots, centered -->
+ <xsl:when test="starts-with($content,'⋰')"><xsl:value-of select="'&#x022F0;
'" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content"
select="substring-after($content, '⋰')"/></xsl:call-template></xsl:when> <!-- three dots,
ascending --><!--\adots-->
+ <xsl:when test="starts-with($content,'⋱')"><xsl:value-of select="'\ddots '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⋱')"/></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,'⌈')"><xsl:value-of select="'\lceil '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⌈')"/></xsl:call-template></xsl:when> <!--/lceil O: left ceiling -->
+ <xsl:when test="starts-with($content,'⌉')"><xsl:value-of select="'\rceil '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⌉')"/></xsl:call-template></xsl:when> <!--/rceil C: right ceiling -->
+ <xsl:when test="starts-with($content,'⌊')"><xsl:value-of select="'\lfloor '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⌊')"/></xsl:call-template></xsl:when> <!--/lfloor O: left floor -->
+ <xsl:when test="starts-with($content,'⌋')"><xsl:value-of select="'\rfloor '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'⌋')"/></xsl:call-template></xsl:when> <!--/rfloor C: right floor -->
+ <xsl:when test="starts-with($content,'〈')"><xsl:value-of select="'\langle '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'〈')"/></xsl:call-template></xsl:when> <!--/langle O: left angle bracket -->
+ <xsl:when test="starts-with($content,'〉')"><xsl:value-of select="'\rangle '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'〉')"/></xsl:call-template></xsl:when> <!--/rangle O: right angle bracket -->
+<!-- ====================================================================== -->
+ <xsl:when test="starts-with($content,'□')"><xsl:value-of select="'\square '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'□')"/></xsl:call-template></xsl:when> <!--/square, square --> <!-- Required amssymb -->
+ <xsl:when test="starts-with($content,'▪')"><xsl:value-of select="'\blacksquare '"
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content,
'▪')"/></xsl:call-template></xsl:when> <!--/blacksquare, square, filled --> <!-- Required amssymb
-->
+ <xsl:when test='starts-with($content,"'")'><xsl:value-of select='"\text{'}"'
/><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select='substring-after($content,
"'")'/></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,'   ')"><xsl:value-of
select='"\hspace{0.28em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content"
select="substring-after($content, '   ')"/></xsl:call-template></xsl:when> <!--
ThickSpace - space of width 5/18 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{0.5em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when> <!-- en space (1/2-em) -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{1em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when> <!-- emsp - space of width
1em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{0.33em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when> <!-- emsp13 - space of width
1/3 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{0.25em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when> <!-- ThickSpace - space of
width 1/4 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{0.17em}"' /><xsl:call-template name="replaceMtextEntities"><xsl:with-param name="content"
select="substring-after($content, ' ')"/></xsl:call-template></xsl:when> <!-- ThinSpace - space of
width 3/18 em -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{0.05em}"' /><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> <!--zero width space -->
+ <xsl:when test="starts-with($content,' ')"><xsl:value-of
select='"\hspace{0.22em}"' /><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: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: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>$ </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>$</xsl:text>
+</xsl:template>
+
+<xsl:template match="m:math[ display='block'] | m:math[ mode='display'][not(@display)]">
+ <xsl:text>
\[
	</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>
\]</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='¯'"> <!-- 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='︷'"> <!-- 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='←'"> <!--/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='→'"> <!--/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='↔'"> <!--/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='̲'"> <!-- 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='︸'"> <!-- 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='←'"> <!--/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='→'"> <!--/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='↔'"> <!--/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,'∏∐⋂⋃⊔',
+ '∑∑∑∑∑')='∑'">
+<!-- if $base is operator, such as
+ ∑ /sum L: summation operator
+ ∏ /prod L: product operator
+ ∐ /coprod L: coproduct operator
+ ⋂ /bigcap
+ ⋃ /bigcup
+ ⊔ /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='¯'"> <!-- OverBar - over bar -->
+ <xsl:text>\overline{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$over='︷'"> <!-- OverBrace - over brace -->
+ <xsl:text>\overbrace{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$over='←'"> <!--/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='→'"> <!--/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='↔'"> <!--/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='˜'"> <!-- small tilde -->
+ <xsl:text>\tilde{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$over='✓'"> <!-- /checkmark =tick, check mark -->
+ <xsl:text>\check{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$over='˙'"> <!-- dot above -->
+ <xsl:text>\dot{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$over='¨'"> <!-- 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='̂' or $over='^'"> <!-- 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,'∏∐⋂⋃⊔',
+ '∑∑∑∑∑')='∑'">
+<!-- if $base is operator, such as
+ ∑ /sum L: summation operator
+ ∏ /prod L: product operator
+ ∐ /coprod L: coproduct operator
+ ⋂ /bigcap
+ ⋃ /bigcup
+ ⊔ /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='̲'"> <!-- UnderBar - combining low line -->
+ <xsl:text>\underline{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$under='︸'"> <!-- UnderBrace - under brace -->
+ <xsl:text>\underbrace{</xsl:text>
+ <xsl:apply-templates select="./*[1]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:when test="$under='←'"> <!--/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='→'"> <!--/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='↔'"> <!--/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,'∏∐⋂⋃⊔',
+ '∑∑∑∑∑')='∑'">
+<!-- if $base is operator, such as
+ ∑ /sum L: summation operator
+ ∏ /prod L: product operator
+ ∐ /coprod L: coproduct operator
+ ⋂ /bigcap
+ ⋃ /bigcup
+ ⊔ /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>& </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>& </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 <= 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 <= 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 > 1">
+ <xsl:variable name="last" select="substring-after($text,$char)"/>
+ <xsl:choose>
+ <xsl:when test="$position > 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]