Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2006

Tip: Looking for answers? Try searching our database.

Equation editor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DrX - 10 Aug 2006 02:57 GMT
Can I create a Macro to translate from symbolic notation in math to text, or
vise versa?  I would like to be able to type in text in English, and have the
macro convert it into equation form, or vise versa.

I.E. since Im doing a lot of math, Id like to type in something like "The
Integral of f with respect to x -  and have it put that into equation editor
using the proper symbols.
Robert M. Franz (RMF) - 10 Aug 2006 09:45 GMT
Hi DrX

> Can I create a Macro to translate from symbolic notation in math to text, or
> vise versa?  I would like to be able to type in text in English, and have the
[quoted text clipped - 3 lines]
> Integral of f with respect to x -  and have it put that into equation editor
> using the proper symbols.

So, you would have to code something (sophisticated) which parses what
you write and converts it into Word fields to match your desired
expression (or to create the EquationEdit object from it -- but I don't
think there is an easy programmatic access from Word into EE, since OLE
objects seem to be pretty much black boxes as far as the receiving
application is concerned).

You would have to define the whole "grammar" of your new
formula-description language. Sounds pretty enormous a task, and it
could become a constant work-in-progress since you might find other math
symbols/expressions you want to describe as time goes by.

I don't say it cannot be done, but I don't see a "business case" for it,
especially since

- you can either click your way through EE pretty easily (yes, it's not
as fast as typing, but OTOH you don't have to learn or build a whole
syntax), or
- for the really typing fans, you might use something like LaTeX in the
first place.

I'm sure you could even keep Word if that's your desire, create all
equations in TeX and export them into something you can then insert in
Word again.

0.2cents
Robert
Signature

 /"\  ASCII Ribbon Campaign |   MS
 \ /                        |  MVP
  X        Against HTML     |  for
 / \     in e-mail & news   | Word

DrX - 10 Aug 2006 14:32 GMT
creating a parser is about what I want.

You see, Outside of the OFFICE package, Id like to learn how to make a
parser, so I can then create my own compiler.  I don't want to get overyly
specific about it - in that the one I want , as you said , would be very
comples.

Yes, Id like to learn how to define my own language.
Jay Freedman - 11 Aug 2006 18:27 GMT
> creating a parser is about what I want.
>
[quoted text clipped - 4 lines]
>
> Yes, Id like to learn how to define my own language.

This is _not_ the kind of project you should try to do in VBA.  :-)

There are entire college-level courses on the subject of parsers and
compilers. Probably the most popular textbook for it is "Compilers" by Aho,
Sethi, and Ullman
(http://www.amazon.com/gp/product/0201100886/002-0947409-0647224?v=glance&n=283155),
better known as "the dragon book".

As Bob pointed out, the Equation Editor in Word 2003 doesn't have an
interface for control by VBA, so that's pretty much a dead issue from the
start. You might want to try out the Word 2007 beta, which has a new editor.
There you can write linear text (not quite the English description you had
in mind, but at least it's all text) and then tell it to switch to math
mode. OpenOffice Writer also has a linear text entry method for its equation
editor.

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.