A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Page Layout
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Equation formatting



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2009, 08:31 AM posted to microsoft.public.word.pagelayout
ciaociao
external usenet poster
 
Posts: 5
Default Equation formatting

Hi,

I've been trying to decide whether to use Word 2007 or LaTeX for a long
document that has lots of equations and pictures. I have switched back and
forth a couple of times already, for various reasons.

Despite its arcane technology, I'm now leaning towards LaTeX because I
can't get some of my equations to look nice in Word 2007.

Specifically:
(1) The "sigma" symbols in summations are way too tall (the Cambria Math
font is the source of this trouble, I suppose)
(2) Parentheses around tall objects (like fractions) are generally not tall
enough
(3) Square root symbols are too tall

Is there any way to adjust the formatting in any of these 3 cases ??

thanks

cc

  #2  
Old May 30th, 2009, 09:44 AM posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default Equation formatting

FWIW, you can still use the "old" Design Science equation editor in Word
2007.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"ciaociao" wrote in message
...
Hi,

I've been trying to decide whether to use Word 2007 or LaTeX for a long
document that has lots of equations and pictures. I have switched back and
forth a couple of times already, for various reasons.

Despite its arcane technology, I'm now leaning towards LaTeX because I
can't get some of my equations to look nice in Word 2007.

Specifically:
(1) The "sigma" symbols in summations are way too tall (the Cambria Math
font is the source of this trouble, I suppose)
(2) Parentheses around tall objects (like fractions) are generally not
tall
enough
(3) Square root symbols are too tall

Is there any way to adjust the formatting in any of these 3 cases ??

thanks

cc


  #3  
Old May 30th, 2009, 11:20 AM posted to microsoft.public.word.pagelayout
ciaociao
external usenet poster
 
Posts: 5
Default Equation formatting

Yep, I know. Thanks. But the new 2007 equation editor has lots of advantages,
so I'd like to use it, if I can figure out how to get the formatting I want.

I just discovred that there are concepts of "phantom" and "smash" in the
the new equation editor (which is how you control this sort of thing in
LaTeX).
Maybe those hold the key, but they are almost entirely undocumented.

thanks again

cc

"Suzanne S. Barnhill" wrote:

FWIW, you can still use the "old" Design Science equation editor in Word
2007.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"ciaociao" wrote in message
...
Hi,

I've been trying to decide whether to use Word 2007 or LaTeX for a long
document that has lots of equations and pictures. I have switched back and
forth a couple of times already, for various reasons.

Despite its arcane technology, I'm now leaning towards LaTeX because I
can't get some of my equations to look nice in Word 2007.

Specifically:
(1) The "sigma" symbols in summations are way too tall (the Cambria Math
font is the source of this trouble, I suppose)
(2) Parentheses around tall objects (like fractions) are generally not
tall
enough
(3) Square root symbols are too tall

Is there any way to adjust the formatting in any of these 3 cases ??

thanks

cc



  #4  
Old May 31st, 2009, 02:56 PM posted to microsoft.public.word.pagelayout
ciaociao
external usenet poster
 
Posts: 5
Default Equation formatting

I just discovered that there are concepts of "phantom" and "smash" in the
the new equation editor (which is how you control this sort of thing in
LaTeX). Maybe those hold the key, but they are almost entirely undocumented.


After a bit more research, it seems to me that the phantom and smash commands
don't work at all. Even the examples in the RTF spec are rendered incorrectly.

I found a hack to make parentheses taller ... you can put a slot containing
a space
above the parenthesised item.

No progress on square roots.

It's a pity, really, because the formatting is very good (even better than
LateX)
in some other cases. But I can't live with goofy parentheses, summations,
and square roots.

And another hack for making summation symbols smaller -- you can construct
them "by hand" using a Sigma symbol, which is smaller than the summation
symbol.
  #5  
Old May 31st, 2009, 08:06 PM posted to microsoft.public.word.pagelayout
Yves Dhondt
external usenet poster
 
Posts: 560
Default Equation formatting

The smash command works fine over here.

I created an example macro for you which will create a simple fraction (x/y)
under a square root. You can comment out the omf3 and omf4 parts to see the
different effects of smash.

I've uploaded a screenshot with the result I'm getting at
http://img189.imageshack.us/img189/3366/smash.png

Yves

===============================
Sub MathRadical()

Dim om As OMath
Dim omf As OMathFunction
Dim omf2 As OMathFunction
Dim omf3 As OMathFunction
Dim omf4 As OMathFunction

' Insert a new equation.
WordBasic.EquationInsert

' Set the object.
Set om = Selection.OMaths(1)

' Create a radical.
Set omf = om.Functions.Add(om.Range, wdOMathFunctionRad)

' Hide the degree (assume square root for sample).
omf.Rad.HideDeg = True

' Create a fraction inside the radical.
Set omf2 = omf.Rad.E.Functions.Add(omf.Rad.E.Range, wdOMathFunctionFrac)
omf2.Frac.Type = wdOMathFracBar
omf2.Frac.Num.Range.Text = "x"
omf2.Frac.Den.Range.Text = "y"

' Create a phantom.
Set omf3 = omf2.Frac.Num.Functions.Add(omf2.Frac.Num.Range,
wdOMathFunctionPhantom)
omf3.Phantom.Smash = True

' Create a phantom.
Set omf4 = omf2.Frac.Den.Functions.Add(omf2.Frac.Den.Range,
wdOMathFunctionPhantom)
omf4.Phantom.Smash = True

End Sub
===============================

"ciaociao" wrote in message
...
I just discovered that there are concepts of "phantom" and "smash" in the
the new equation editor (which is how you control this sort of thing in
LaTeX). Maybe those hold the key, but they are almost entirely
undocumented.


After a bit more research, it seems to me that the phantom and smash
commands
don't work at all. Even the examples in the RTF spec are rendered
incorrectly.

I found a hack to make parentheses taller ... you can put a slot
containing
a space
above the parenthesised item.

No progress on square roots.

It's a pity, really, because the formatting is very good (even better than
LateX)
in some other cases. But I can't live with goofy parentheses, summations,
and square roots.

And another hack for making summation symbols smaller -- you can construct
them "by hand" using a Sigma symbol, which is smaller than the summation
symbol.


  #6  
Old June 1st, 2009, 07:08 AM posted to microsoft.public.word.pagelayout
ciaociao
external usenet poster
 
Posts: 5
Default Equation formatting

Thanks very much Yves.

I ran your macros, and at first I thought they didn't work, either.

Next, I ran them on a second computer, and found that they *did* work.

The difference, it turns out, is that, on the second computer,
I had Word's "Show/Hide" parameter set to "Hide".
I didn't realise that this setting impacts the display of phantom and
smash objects. I almost always work with this setting equal to "Show",
so that I can see paragraph marks, spaces, tabs, etc. That's why
I was getting incorrect display.

thanks again

cc
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.