| View previous topic :: View next topic |
| Author |
Message |
gnubie General User

Joined: 30 Sep 2005 Posts: 6 Location: Wellington, New Zealand
|
Posted: Fri Sep 30, 2005 4:08 pm Post subject: Alignment of multi-line equations |
|
|
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
David
David Harris
3rd year maths/physics/comp student
Wellington, New Zealand |
|
| Back to top |
|
 |
gnubie General User

Joined: 30 Sep 2005 Posts: 6 Location: Wellington, New Zealand
|
Posted: Fri Sep 30, 2005 6:53 pm Post subject: |
|
|
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 |
|
 |
richardf OOo Enthusiast

Joined: 10 Oct 2004 Posts: 107
|
Posted: Sat Oct 01, 2005 9:40 am Post subject: |
|
|
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 |
|
 |
waka General User

Joined: 11 Apr 2005 Posts: 46
|
Posted: Sat Oct 01, 2005 11:04 pm Post subject: alignments |
|
|
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 |
|
 |
Asin General User

Joined: 06 Aug 2005 Posts: 22
|
Posted: Sun Oct 16, 2005 10:10 pm Post subject: |
|
|
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 |
|
 |
Gore General User

Joined: 13 May 2005 Posts: 13 Location: Andalucía
|
Posted: Sat Oct 22, 2005 3:03 am Post subject: alignments |
|
|
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 |
|
 |
RGB Super User


Joined: 25 Nov 2003 Posts: 1743 Location: In Lombardy, near a glass of red Tuscany wine
|
Posted: Mon Oct 24, 2005 12:23 am Post subject: Re: alignments |
|
|
| 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 |
|
 |
|