===============
The original message seems to be lost, thus this is a repost.
===============


Hello Alfredo and all others as well!


I'm, the developer and maintainer of OOo Math.

I'm going to write a bit about Math in general and it's
code because for there is an actual current interest (thanks
Alfredo!) and also because it is sth. I should have done
already a long time ago. ^^°


=======================================
About the source code
=======================================

First of all I'll give an introduction to the code and where
to find it. Those who have access to the cvs tree of OOo
it is located as a sub project of sw in sw/starmath.
The source code may also be seen at
  http://sw.openoffice.org/source/browse/sw/starmath/

The code can be found in the inc and source sub-directories.
Since Math is the smallest appication of OOo it has a rather
short number of code files (about 70) and should be rather
easy to get familiar with it compared to any other of OOo's
applications.

- accessibility.hxx, accessibility.cxx
    Those contain all the code that has to do with Math's
    accessibility implementation.
- action.hxx, action.cxx
    Contains a small helper class that gets used with undo/redo
- applicat.hxx
    Two small application specific classes (usually of no further
    interest).
- cfgitem.hxx, cfgitem.cxx
    All code required to read/write Math specific entries to
    OOo's configuration (the place where e.g. application settings
    get stored).
- commands.src
    The resource data that hold the text to be inserted in the
    edit window when entries in the "Selection" floating
    window or the context of the edit window get selected.
    Also here is the complete resource for the above context menu.
- config.hxx, config.cxx
    This code is related to the "Tools/Options/OpenOffice Math
    /Settings" tab page.
- detreg.cxx
    Code required to run (register and call) Math as a component.
- dialog.hxx, dialog.cxx, dialog.hrc
    Basically the code for all of Math's specific dialogs.
- document.hxx, document.cxx
    Holds the class that represent a Math document.
- edit.hxx, edit.cxx
    The code for the edit or command window where you type the
    formulas text.
- eqnolefilehdr.hxx, eqnolefilehdr.cxx
    Code needed to determine the version number of embedded
    MathType objects. (MathType objects are those that are called
    "Microsoft Equation 3.x" in Microsoft Word.)
    Note: 'embedded' means embedded in other applications than Math,
      e.g. a text document or presntation document.
- format.hxx, format.cxx
    Hold the class that is used to store all the formating options
    that can be set via Math's dialogs.
- localize.sdf
    Translations of UI strings. Not to be edited manually!
- makefile.mk
    The make file for the application.
- math_pch.cxx
    Pre-compiled headers.
- mathml.hxx, mathml.cxx
    All the code related to read/write MathML.
- mathtype.hxx, mathtype.cxx
    The code related to MathType import/export.
- menu_tmpl.src
    Holds the definition for some Math specific accelerator keys.
- node.hxx, node.cxx
    All the node classes that represent a formula after it has
    been parsed. Those nodes get organized in a tree by the parser.
    A node also has a member that stores the position where it's
    content is to be displayed later on.
    The tree object will then be used later to do the layout.
- parse.hxx, parse.cxx
    The parser that takes the text from the command window and
    generates the nodes tree.
- rect.hxx, rect.cxx
    The basic class for layout purposes it can hold a rectangles
    position and size and can be move or merged with other rectangles.
    The layout is basically done by re-arranging those rectangles
    which are part of a node.
- register.cxx
    Other code required to run Math as a component.
- smdetect.hxx, smdetect.cxx
    Math specifc filter detection code.
- smdll.hxx, smdll.cxx
    Code related to initializinh and exiting the DLL.
- smmod.hxx, smmod.cxx
    The SmModule class is shared by all Math documents and thus
    holds or give access to objects, or provides some functionality
    that need/should not be document specific, or holds objects that
    should exist only once.
    For example it holds an SmSymSetManager object that is used to
    share all the user-defined symbols between all the documents or
    gives access to the configuration.
- smres.src
    The source for all the dialogs.
- starmath.hrc
    Holds UI related defines used in the resources.
- symbol.hxx, symbol.cxx, symbol.src
    All the code and resources (aside from UI) for managing
    user-defined symbols.
- toolbox.hxx, toolbox.cxx, toolbox.hrc
    The code and resources for the "Selection" floating window.
- typemap.cxx
    Some general UI related defines. (There should be no need to
    look at these)
- types.hxx, types.cxx
    Defines for all the characters used in Math and some converion
    functions.
- unodoc.cxx
    A minor set o fUNO related functions
- unomodel.hxx, unomodel.cxx
    The UNO implementation for the Math model.
- utility.hxx, utility.cxx
    Set of various helper classes.
- view.hxx, view.cxx
    The implementation of the view shell along with some other
    classe the allow access to the edit and toolbox window.
- viewhdl.cxx
    Clipboard related functions.


=======================================
History / present time / available time
=======================================

Basically (aside from adding some minor improvemants) Math had
reached it's current state about the time of StarOffice 5 and 5.2.
That is now about 8 years ago.
Since with StarOffice 5.2 was basically found useful and functional
it was right after the release decidec that this project is now
finished.

That of course some things were not done that could still have
done, and even some things that really should have done are still
not available today. :-(

And having always only a few developers and other applications and
new features to implement or bugs to fix at hand this is basically
how it has remained in such a way ever since.

And nowadays with even less developers than years ago this is
probably unlikely to change in the foreseeable furure as well. :-(

Thus if anyone is interested in coding for Math I have to say that
it is unlikely that I myself will have significant time to spend
for coding in Math at all. Thus aside from some small coding task
the only thing I can offer is support in anwering questions and
point wo where to look at if specific things are to be done.
Of course I will also be available for reviews and similar tasks.


=======================================
Most missing features
=======================================

If I were to say what is missing the most I would say:

1) It should be possible to horizontaly align text in two
   or more consecutive lines.
   It should be easy to gets formulas displayed where the '"'
   charcters or other similar charcters are aligned above each
   other. E.g:
        a + b = x - 2 y
              < a2*b2
              < 100
   The only way to do this now would be by using of the phantom comman
        alignl a+b = c newline
        alignl phantom {a+b} = x - y newline
   or make use of the matrix command as use for fomatting
        matrix{ a+b # {}={} # alignl c ## {} # {}={} # alignl x-y}
   Both of them are awkward and tedious to use over time.

2) The next issue is not about Math alone but about Math embedded in
   another application e.g. a text document.
   If [a+b < c] is to denote a formula that is embedded as character
   in paragraph one would like it to automatically happen that the
   baseline of the surrounding text in the paragraph matches the
   baseline of the formuala (and maybe that it can not moved vertically
   anymore).
   Currently it is just by chance dur to most formulas having only a
   single line or a line like [a over b] that will make it look like
   this is already the case but it is not. You can actually move
   the formula as you like. And if you happen to reformat you paragraph
   e.g. by giving it a new font size you may well end up being
   required to vertically justify all the formulas manually to for the
   new font size especially if you need to justify your formula in the
   first place ( e.g. for {int _a^b f(x)} over d  ).

3) I would be really nice if when a formula is selected as part of a
   text and the font changes (e.g. size or color) the formula
   would automatically take part in that change.

4) A functionality that applies the format setting of a specific
   formula to all formula in the document will be quite useful as
   well. Since Math objects have no styles there is no good place
   to change settings for all of them when the formulas already
   do exist.

For both of 1) and 2), if not already known right after 5.2 those are
at least known and not taken care of for about the last 5 or 6 years.
For 2) we already tried to have time for it in the last two years
but in the end it never worked out. -_-
For 2), 3) and 4) some more knowledge with embedding objects
would be required as well.

Of course there is also quite a number of bugs that could be fixed.
But I think it will be to much to list them here.


=======================================
Some notes about MathType and MathML
=======================================

MathType is supported for version 3.0 / 3.1 which is almost what most
Windows user will have gotten along with their MS Word installation.

MathML is supported for version 1.01.
Basically Math can write MathML and read that very
same file again. But if you try to use some of the more elaborate
syntax of MathML you may encounter that Math will fail to notice that
syntax element or may have problems with the specific nesting of
elements.
Thus I would say there is definetly room for improvement here.
However some of the MathML functionality would probably require
some improvements / additonal things to be added to the Math
engine in the first place to make use of.
This is because neither is the functionality of Math (in terms of
formatting and layout) a subset of MathML nor is it vice versa!
(BTW: The same hols for Math and MathType)

Also OOo's MathML has that famous (well I'm not to sure about that ^^°)
  <math:annotation math:encoding="StarMath 5.0">
tag which basically holds the text from the edit window.
The point about this is if you modify that MathML formula e.g. with
a MathML editor and than save it and have the formula read with
OOo Math again you will surprisingly notice that your latest (external)
changes did no matter at all. That is due to that tag!
If Math encounters that tag when reading MathML it will simply disregard
whatever MathML is present and use the text within that tag and have it
parsed again to get the result.
Well, it's long time since that was introduced I don't remember
completly about the why?
I think it is due to exporting a Math formula to MathML and then
re-importing it will usually result in the orignial formula text being
cluttered now. The formatting (line break and indentions) gone,
comments gone, additional braces etc... And you will basically not
realize the same formula that was saved some minutes ago.


Since MathType and MathML import/export was not written by me. I'm
just a beginner regarding both of them and my experience is mostly
limited to case studies in the course of bug fixes.

MathML can be looked up at
  http://www.w3.org/Math/
and MathType documentation can be found
  http://www.dessci.com/en/reference/sdk/
however the already online documentation can be found at
  http://www.dessci.com/jp/support/tech/MTEF4.STM
  (MTEF3 doumentation seems not to be available here anymore.)


=======================================
Future of Math
=======================================

Taking into account that Math was basically already left alone for
some years now I think there is no much reason to think that this
will change anytime soon.

Thus if Math is to actually gain some ground in anyway I see only
about 2 ways combinations may be possible.

1) Actually we will be lucky and through this posting we will
   find a dedicated OOo Math developer.
   (Not that many have asked over the years, though there were one
   or two.)

2) In the long run replace the current Math with something else
   that is out there and has it's own developing ongoing and is
   likely to continue.
   That would be:
   2a) replace Math with MathType or at least have that along as well.
       The problem is that to my understanding MathType is commercial
       and thus it should probably only offered as add-on for those
       who like to have this.
   2b) Make use of Amaya (W3C's official MathML web browser) as
       rendering machine.
       (Since in previous versions IE 5.0 was plugged, though for
       other purposes, it should be possible to plug Amaya for Math.)
       The advantage would be it will always be up-to-date with the
       MathML development and we need not take care of layout anymore.
       On the other hand
       - an import for existing formulas must be provided
       - we need some kind of reasonable UI to enter formulas for
         Amaya. (Don't know if sth like that already exists.)
         Also would that UI be a click-them-together or a
         type-it-by-keyboard interface?
         I know many person would like to have the first but also
         there were many people as well that complimented Math for
         is somewhat TeX like input syntax that is all text based.

3) Find another OpenSource project that is working on displaying
   mathematical formulas and can be expected to be still alive
   and supported for years to come, and join forces if possible.
   For most projects I know of, the latter part about the 'support
   for years to come' will be the critical point where it seems
   quite doubtful if that can be expect.
   Thus I can currently think only of one project in this category
   and that would be KFormula from KOffice!
   They are also implementing ODT and thus there are already some
   things in common.

   Things that should be possible to share are
   - a MathML import/export functionality.
     The result from the import (and source for the export) should
     be a common node represetation of the formula.
   - a layout engine.
     It should pe possible to have a common layout engine that uses
     the above node representation.
   - If there is a common node structure for the formula
     import/export for MathType (or basically any other format) could
     also become shared code.


For points 2) and 3) (especially if it is about replacing Math with
some other technology) I have to explicitly note that 2 requirements
must be met:

a) Whatever editor or tools is used to modify the formulas MathML
   the result saved must be ODF compliant.
   (I'm no specialist in this field thus I cannot tell what this
   explicitly means but there might be some problems in details.)
b) For use of formulas as embedded object we need to have a
   replacement image available. This has to be a performant
   implementation of a vector grafic format!
   Currently this our vcl-gdi image but that can most probably
   read only be OpenOffice itself.


=======================================
Building OOo
=======================================

For anyone that got interested in seeing in building for
oneself there are the following links:

http://wiki.services.openoffice.org/wiki/Building_vanilla
http://wiki.services.openoffice.org/wiki/Building_with_ooobuild


Kind Regards,
Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to