From 87152a8fc9dc1d743213614da2ba279c8975fd09 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Thu, 19 Jun 2003 15:25:33 +0000 Subject: [PATCH] New version 0.0.2: * Bug fixed: - the *PushLexer reset method did not notify the PushParser of the buffer reset - the reset() method of the ocaml binding did not reset the Lexer. Closes #85 and #86 - Even if the cursor is not visible, its value should be rendered in MathML Presentation and it should be printed in TeX. Fixed both xml-mmlp.xsl and tml-tex.xsl * New stuff: - the LPushLexer now recognized \/ as a long identifier character. - Added a new tml-litex.xsl stylesheet from TML to TeX + long identifiers. It should be (but it is not yet) the inverse function of the parser --- helm/DEVEL/mathml_editor/configure.ac | 2 +- helm/DEVEL/mathml_editor/debian/changelog | 6 + .../mathml_editor/ocaml/c_mathml_editor.cc | 1 + helm/DEVEL/mathml_editor/src/LPushLexer.cc | 4 +- helm/DEVEL/mathml_editor/src/TPushLexer.cc | 2 + helm/DEVEL/mathml_editor/src/TPushParser.cc | 1 + helm/DEVEL/mathml_editor/xsl/tml-litex.xsl | 158 ++++++++++++++++++ helm/DEVEL/mathml_editor/xsl/tml-mmlp.xsl | 25 +-- helm/DEVEL/mathml_editor/xsl/tml-tex.xsl | 6 +- 9 files changed, 191 insertions(+), 14 deletions(-) create mode 100644 helm/DEVEL/mathml_editor/xsl/tml-litex.xsl diff --git a/helm/DEVEL/mathml_editor/configure.ac b/helm/DEVEL/mathml_editor/configure.ac index 1defca274..4cc45b00a 100644 --- a/helm/DEVEL/mathml_editor/configure.ac +++ b/helm/DEVEL/mathml_editor/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(editex, [0.0.1]) +AC_INIT(editex, [0.0.2]) AC_CONFIG_SRCDIR(src/TToken.hh) AM_INIT_AUTOMAKE($AC_PACKAGE_NAME, $AC_PACKAGE_VERSION) diff --git a/helm/DEVEL/mathml_editor/debian/changelog b/helm/DEVEL/mathml_editor/debian/changelog index 7d1e3421b..c17361844 100644 --- a/helm/DEVEL/mathml_editor/debian/changelog +++ b/helm/DEVEL/mathml_editor/debian/changelog @@ -1,3 +1,9 @@ +editex (0.0.2-1) unstable; urgency=low + + * New upstream release. + + -- Claudio Sacerdoti Coen Thu, 19 Jun 2003 12:58:21 +0200 + editex (0.0.1-1) unstable; urgency=low * Initial Release. diff --git a/helm/DEVEL/mathml_editor/ocaml/c_mathml_editor.cc b/helm/DEVEL/mathml_editor/ocaml/c_mathml_editor.cc index 8ab2a05cc..6a4eacad1 100644 --- a/helm/DEVEL/mathml_editor/ocaml/c_mathml_editor.cc +++ b/helm/DEVEL/mathml_editor/ocaml/c_mathml_editor.cc @@ -197,6 +197,7 @@ extern "C" void c_mathml_editor_reset(Editor* editor) { assert(editor); + editor->lexer->reset(); editor->parser->reset(); } diff --git a/helm/DEVEL/mathml_editor/src/LPushLexer.cc b/helm/DEVEL/mathml_editor/src/LPushLexer.cc index 8a22d6678..414dd7826 100644 --- a/helm/DEVEL/mathml_editor/src/LPushLexer.cc +++ b/helm/DEVEL/mathml_editor/src/LPushLexer.cc @@ -41,6 +41,8 @@ LPushLexer::reset() { buffer.erase(); state = ACCEPT; + + displayCursor(); } void @@ -188,7 +190,7 @@ LPushLexer::push(char ch) } break; case ESCAPED_CHARACTER: - if ((ch == '-') || (ch == '_')) + if ((ch == '-') || (ch == '_') || (ch == '/')) { buffer.push_back(ch); state = IDENTIFIER; diff --git a/helm/DEVEL/mathml_editor/src/TPushLexer.cc b/helm/DEVEL/mathml_editor/src/TPushLexer.cc index ee884cfe9..3d2abc097 100644 --- a/helm/DEVEL/mathml_editor/src/TPushLexer.cc +++ b/helm/DEVEL/mathml_editor/src/TPushLexer.cc @@ -40,6 +40,8 @@ TPushLexer::reset() { buffer.erase(); state = ACCEPT; + + displayCursor(); } void diff --git a/helm/DEVEL/mathml_editor/src/TPushParser.cc b/helm/DEVEL/mathml_editor/src/TPushParser.cc index 1a4770785..31b6e9867 100644 --- a/helm/DEVEL/mathml_editor/src/TPushParser.cc +++ b/helm/DEVEL/mathml_editor/src/TPushParser.cc @@ -55,6 +55,7 @@ TPushParser::reset() { nextId = 1; if (cursor.parent()) cursor.remove(); + cursor["val"] = ""; doc.reset(); doc.root().append(cursor); if (factory && !frozen()) factory->documentModified(doc); diff --git a/helm/DEVEL/mathml_editor/xsl/tml-litex.xsl b/helm/DEVEL/mathml_editor/xsl/tml-litex.xsl new file mode 100644 index 000000000..a39c6f03b --- /dev/null +++ b/helm/DEVEL/mathml_editor/xsl/tml-litex.xsl @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $$$$ + $$ + + + + + + \ + + + + + + + + + \ + + + + + + + + + \ + + + + + + + + + + + + + + + __ + + + _ + + + + + + + + ^^ + + + ^ + + + + + {} + + {} + + + + + + + \cr + + + + & + + + + + + \ + + + + + \ + + + + + + + + + + + + + + + diff --git a/helm/DEVEL/mathml_editor/xsl/tml-mmlp.xsl b/helm/DEVEL/mathml_editor/xsl/tml-mmlp.xsl index cd4ee601f..f5e1b6f74 100644 --- a/helm/DEVEL/mathml_editor/xsl/tml-mmlp.xsl +++ b/helm/DEVEL/mathml_editor/xsl/tml-mmlp.xsl @@ -176,7 +176,7 @@ - + @@ -209,23 +209,26 @@ - I + + I + - - - - - - I + + + + + + + + I + + - - - diff --git a/helm/DEVEL/mathml_editor/xsl/tml-tex.xsl b/helm/DEVEL/mathml_editor/xsl/tml-tex.xsl index 553172d14..ea0a6b94e 100644 --- a/helm/DEVEL/mathml_editor/xsl/tml-tex.xsl +++ b/helm/DEVEL/mathml_editor/xsl/tml-tex.xsl @@ -26,6 +26,10 @@ or send an email to --> + + + + - + -- 2.39.2