Embedding Firefox in Word to display MathML generated by MATLAB

J

JohnCreighton_

---------In Short------------
I want to be able to do atleast one of the following
A) Embed the rendering of MathML produced by firefox in a word document
B) Create a word document from MATLAB (I must be able to both create
text and equaions) I need some kind of API to acess equation editor or
mathtype and the API should except either LateX or MathML as MATLAB can
access maple commands that generate both representations of equations

--------Extra's------------
If A I would like to be able to edit the MathML though firefox and
perhaps some kind of intelligent way of word wrapping equations that
are too long. Perhaps break up the equations on the addition operation.
A simple way to edit them would be perhaps the document object explore.
If I could say right click on part of the equation and it will open the
document object explore to the right part of the tree for me to make
the changes. Graphical what you see is what you get type editors are
nice but not completely necessary.


-----Steps Leading Me to Want these features---------
I am doing symbolic calculations in MATLAB that involve a lot of
recursion. I get more or less the correct answer but there seems to be
a few bugs. In order to debug it I need to be able to see what is going
on and the sequence the steps are executed in the code may not be the
most logical way to present the information. Moreover, they way MATLAB
presents long equation is of limited readability for long equations.

I therefore created a function where I can log the information about
the variables in the code instead of printing the information to the
screen. This allows me to separate the process of reporting what is
going on from the cod in the code from the code.

By choosing different input arguments the function signals three
different events. Entering a section of code, leaving a section of code
and logging information about that section of code.

All logging within a unique section of code is stored in a unique
element of a cell array. One of these events is entering the code. When
the function is used to signal it is entering a section of code it
creates an entry to store information about that section of code. It
records information about the number of times that section of code has
been entered and not exited (one type of recursion depth) and the
number of times any section of code in the log has been entered and not
exited (another type of recursion depth). With respect to both of these
kinds of recursion depth information linking entries up and down in
recursion depth and horizontal in recursion depth is recorded. This
will facilitate different ways of exploring the logical flow of an
algorithm.

Each field contains a structure. Each type of linking information is
stored in a unique filed and the data is stored in a field data which
holds a cell array containing each entry logged within the section of
code. Each entry logged is stored in a structure where the field name
is the variable being logged and the field value is the value of the
variable being loged.

The exit mode clearly tells the function it exited a section of code
some house keeping variables are changed to tell the function where it
is but nothing about the log is changed.

This is kind of getting long so what I will say is I then put that
information into some kind of object oriented data structure to
represent the document and sort the information based on a set of
rules. I sorted it based on the name of the function that was called,
then the recursion depth then the order at which the data was logged.
This is because to me logically it makes sense to look first at the
more general operations at the same level of generality and then if
that doesn't make sense look at the details (operations done at deeper
levels of recursion)

Then from that document generated I printed off each entry as they are
ordered and looked at the output in Mozzila Firefox. I found firefox
gave a much cleaner rendering of the equations of microsoft words
equation editor. However, I am not able to edit the output, I cannot
include the output in a word document anyway I know besides doing a
screen capture and the equations do no word-wrap so I could not print
the info the way it was formatted and do my debugging away from the
computer with a pencil and paper.

I think the formatting with respect to wordraping perhaps could be done
automatically with LaTeX. However, this would take away the hyper
linking between recursion levels I plan to do to make the document
easier to explore. I could use the LaTeX to html converter but there
will be a learning curve and it looks like it will take some effort to
install. If I could figure out how to communicate with microsoft words
equation editor it would allow for easier editing but would not print
as nice a rendering.

Here is my stab at how to do the embedding of fire fox rendering in the
word document. I perhaps could create a macro button that uses as an
icon the screenshot of the fire fox output of the file which the macro
points to. Even fancier perhaps I could write some java script
application that will let me highlight will let a region of the fire
fox out and then convert it to askii using the functions of ASKII math,
type in the changes in ASKII in some form field that pops up, click a
submit button to remove the form field and then convert the section
back to MathML by using the functions of ASKII math. Then once the
changes are made the word macro would update the icon in the word
document to the current firefox representation of the MathML. What is
needed if it already doesn't exist is a MATHML symbol to start a new
line. Does anyone know if I put a line break character in a MATHML
equation if it will break the equation up across two lines?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top