OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Alignment of multi-line equations

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Math
View previous topic :: View next topic  
Author Message
gnubie
General User
General User


Joined: 30 Sep 2005
Posts: 6
Location: Wellington, New Zealand

PostPosted: Fri Sep 30, 2005 4:08 pm    Post subject: Alignment of multi-line equations Reply with quote

Hi,
I am a physicis student and am using oo math for the first time. I have a had a look on this forum but can't find out how to line up the = on multiline equations

For example, I want to be able to do this:
Code:
V = 2 * B
  = 2 * 6
  = 12

(The only reason I have put it in a code block is to get the formating correct!)

If this information is somewhere else, I'm sorry but I assume it won't be too difficult as it is something quite often done.

Thanks in advance Cool
David

David Harris
3rd year maths/physics/comp student
Wellington, New Zealand
Back to top
View user's profile Send private message
gnubie
General User
General User


Joined: 30 Sep 2005
Posts: 6
Location: Wellington, New Zealand

PostPosted: Fri Sep 30, 2005 6:53 pm    Post subject: Reply with quote

Answering my own question, but other people might find this helful

Ive found the best way to do it (after talking to my latex-fanatical friend) is to use matrix, like this:

Code:
matrix{V_{"E"} # "=" # {1 over 2} V_{"CC"} ##
{} # "=" # {1 over 2} times 7.5 ##
{} # "=" # 3.75V} newline


David
Back to top
View user's profile Send private message
richardf
OOo Enthusiast
OOo Enthusiast


Joined: 10 Oct 2004
Posts: 107

PostPosted: Sat Oct 01, 2005 9:40 am    Post subject: Reply with quote

Your solution woks, my problem with it is that it leaves quite some space between the equal sign and the left and right entries. I have not found any way to set that spacing to less.

I use the following work around with dummy fractions to get the right line spacing:

matrix{alignr color white { 1 over 2} {V_{"E"} " = "} ## alignr color white {1 over 2} " = " ## alignr color white {1 over 2} " = " } matrix {alignl {1 over 2} V_{"CC"} ## alignl {1 over 2} times 7.5 ## alignl 3.75V color white {1 over 2}}

Is there a setting to decrease or increase the spaces between entries in a matrix?

Richard
Back to top
View user's profile Send private message
waka
General User
General User


Joined: 11 Apr 2005
Posts: 46

PostPosted: Sat Oct 01, 2005 11:04 pm    Post subject: alignments Reply with quote

try this:
matrix{V_{"E"} # "=" # {1 over 2} V_{"CC "} ## %% <------------ 4 spaces here after the sub CC
{} # "=" # {1 over 2} times 7.5 ##
{} # "=" # 3.75V } newline

%% now the fractions are aligned
%% or eliminate the second set of hash

matrix{V_{"E"} # "=" ` {1 over 2} V_{"CC"} ##
{} # "=" ` {1 over 2} times 7.5 ##
{} # "=" ` 3.75V } newline

addendum:
""=` can also be used, however, it is moot.
Back to top
View user's profile Send private message
Asin
General User
General User


Joined: 06 Aug 2005
Posts: 22

PostPosted: Sun Oct 16, 2005 10:10 pm    Post subject: Reply with quote

Another way to do it is to use the phantom function which acts like a placeholder for whatever argument it takes. That is, it prints out the same amount of space that it would usually take up, but not actually print out the formula.

(alignl is required otherwise phantom acts strangely on newlines. Alternatively, keep creating brand new Equation objects on each new line and then copy and paste the phantom {V_{"E"}} to avoid using alignl.)

Code:
V_{"E"} = {1 over 2} V_{"CC "} newline
alignl phantom {V_{"E"}} = {1 over 2} times 7.5 newline
alignl phantom {V_{"E"}} = 3.75V
Back to top
View user's profile Send private message
Gore
General User
General User


Joined: 13 May 2005
Posts: 13
Location: Andalucía

PostPosted: Sat Oct 22, 2005 3:03 am    Post subject: alignments Reply with quote

Richard wrote:
Quote:
Is there a setting to decrease or increase the spaces between entries in a matrix?


Go to: Format - Spacing - Category - Matrixes - Column spacing

it's work for each individual formula.
_________________
Elías
Back to top
View user's profile Send private message
RGB
Super User
Super User


Joined: 25 Nov 2003
Posts: 1743
Location: In Lombardy, near a glass of red Tuscany wine

PostPosted: Mon Oct 24, 2005 12:23 am    Post subject: Re: alignments Reply with quote

Gore wrote:
it's work for each individual formula.

If you press the "Default" button, this value will be retained for all your new formulas (not for the old ones, those must be changed manually one by one)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Math All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group