SPS Forum

A place for all SPSians to gather and interact
It is currently Mon Nov 23, 2009 10:25 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
Author Message
 Post subject: Re: LaTeX resources
PostPosted: Thu Nov 05, 2009 11:11 pm 
Offline
Forum Master... I love forum
Forum Master... I love forum
User avatar

Joined: Wed Jan 09, 2008 11:20 pm
Posts: 1722
Someone please help me! I am currently typing something for my ISM, and I run into trouble when I try to put in a 4x4 'matrix'. Below is more or less my code for the relevant part:
$g_{\alpha \beta}$ is the space-time metric:
\begin{center}
\begin{equation*}
$g_{\alpha \beta}$ = \begin{bmatrix} 1 &0 &0 &0 \\ 0 &-1 &0 &0 \\ 0 &0 &-1 &0 \\ 0 &0 &0 &-1 \end{bmatrix} = g^{\alpha \beta}.
\end{equation*}
\end{center}

The result looks nice and all, but the problem is the space... between the '$g_{\alpha \beta}$ is the space-time metric:' line and the equation there is a big gap (like you pressed 'Enter' too many times in a Word Doc). If I remove \begin{center} and \end{center}, then the equation aligns itself to the left (though the problem with the excessive spacing mentioned before this is gone). So I don't know... anyone has any suggestions?

_________________
Warrior of the Mind


Top
 Profile  
 
 Post subject: Re: LaTeX resources
PostPosted: Fri Nov 06, 2009 8:07 am 
Offline
Forum Master... I love forum
Forum Master... I love forum
User avatar

Joined: Thu Jan 10, 2008 9:59 am
Posts: 1096
How come you have dollar signs $ in equation environment?

What if you try \begin{eqnarray} instead of \begin{equation}?

Or nowadays I tend to use \begin{align}, which works better for aligning different lines of equations.


Top
 Profile  
 
 Post subject: Re: LaTeX resources
PostPosted: Fri Nov 06, 2009 2:38 pm 
Offline
Forum Master... I love forum
Forum Master... I love forum
User avatar

Joined: Wed Jan 09, 2008 11:20 pm
Posts: 1722
limyenkh wrote:
How come you have dollar signs $ in equation environment?

What if you try \begin{eqnarray} instead of \begin{equation}?

Or nowadays I tend to use \begin{align}, which works better for aligning different lines of equations.

The dollar sign is a mistake. I've rectified that, but I forgot to change it here... woops...

Thanks for the suggestion. I'll try it out now...

_________________
Warrior of the Mind


Last edited by thongmay on Fri Nov 06, 2009 4:13 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: LaTeX resources
PostPosted: Fri Nov 06, 2009 2:42 pm 
Offline
Forum Master... I love forum
Forum Master... I love forum
User avatar

Joined: Wed Jan 09, 2008 11:20 pm
Posts: 1722
thongmay wrote:
limyenkh wrote:
How come you have dollar signs $ in equation environment?

What if you try \begin{eqnarray} instead of \begin{equation}?

Or nowadays I tend to use \begin{align}, which works better for aligning different lines of equations.

The dollar sign is a typo. I always confuse $ and &. I've rectified that, but I forgot to change it here... woops...

Thanks for the suggestion. I'll try it out now...

Wheee! It works! Thanks, Yen Kheng... ^^

_________________
Warrior of the Mind


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group