2

I have the following text in a matrix environment. Is there a better way to format it, say with each column being left ordered, and how can this be done?

$$
\begin{matrix}
\Gamma^{i}_{\mbox{ }0i}=\frac{\dot{a}}{a} \mbox{ ,i from 1..3 }
  & \Gamma^{0}_{\mbox{ }11}=\frac{a\dot{a}}{1-kr^{2}}
  & \Gamma^{0}_{\mbox{ }22}=\dot{a}ar^{2}
  & \Gamma^{0}_{\mbox{ }33}=\dot{a}ar^{2}\sin^{2}{(\theta)}
\\
\Gamma^{1}_{\mbox{ }11}=+\frac{kr}{1-kr^{2}}
  & \Gamma^{1}_{\mbox{ }22}=-r(1-kr^{2})
  & \Gamma^{1}_{\mbox{ }33}=-(1-kr^{2})r\sin^{2}{(\theta)}
  & \Gamma^{2}_{\mbox{ }12}=\frac{1}{r}
\\
\Gamma^{3}_{\mbox{ }23}=\cot{(\theta)}
  & \Gamma^{3}_{\mbox{ }13}=\frac{1}{r}
  & \Gamma^{2}_{\mbox{ }33}=-\sin{(\theta)}\cos{(\theta)}
\end{matrix}
$$

enter image description here

2

2 Answers 2

3

I'd change the way you lay out the formulas, reserving a row for the "0i" case, one for \Gamma^1, one for \Gamma^2 and one for \Gamma^3.

The first row is artificially made shorter to TeX's eyes, so that the textual annotation is not taken into consideration for the spacing.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{aligned}
&  \Gamma^{i}{}_{0i}=\frac{\dot{a}}{a}
  \makebox[0pt][l]{\quad($i$ from $1$ to $3$)}
\\
&  \Gamma^{0}{}_{11}=\frac{a\dot{a}}{1-kr^{2}}
&& \Gamma^{0}{}_{22}=\dot{a}ar^{2}
&& \Gamma^{0}{}_{33}=\dot{a}ar^{2}\sin^{2}(\theta)
\\
&  \Gamma^{1}{}_{11}=+\frac{kr}{1-kr^{2}}
&& \Gamma^{1}{}_{22}=-r(1-kr^{2})
&& \Gamma^{1}{}_{33}=-(1-kr^{2})r\sin^{2}(\theta)
\\
&  \Gamma^{2}{}_{12}=\frac{1}{r}
&& \Gamma^{2}{}_{33}=-\sin(\theta)\cos(\theta)
\\
&  \Gamma^{3}{}_{23}=\cot(\theta)
&& \Gamma^{3}{}_{13}=\frac{1}{r}
\end{aligned}
\]
\end{document}

Note that staggering of indices can be obtained more easily with {}_ than with \mbox{ } in the subscript.

enter image description here

Check Why is \[ … \] preferable to $$? for why $$ should never be used.

4
  • 1
    how did that \Gamma^{2}{}_{33} sneak down into the last line? Commented Mar 23, 2013 at 17:17
  • @barbarabeeton Because I didn't see well the superscript. :)
    – egreg
    Commented Mar 23, 2013 at 17:23
  • looks much nicer now. still one niggle -- wouldn't the 13 entry logically make more sense before the 23 one in the last line? Commented Mar 23, 2013 at 17:49
  • @barbarabeeton Maybe. I consider this just an example (and it was so in the original post).
    – egreg
    Commented Mar 23, 2013 at 17:51
1

enter image description here

Please always post complete documents not just fragments. Here I've use align* and also removed the \mbox{ } markup. It's too wide at the standard size, but I don't know what page sizes you are using. It can always be re-arranged to have 3 rather than 4 equations on each line.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
{\Gamma^{i}}_{0i}&=\frac{\dot{a}}{a} \mbox{ ,i from 1..3 }
  & {\Gamma^{0}}_{11}&=\frac{a\dot{a}}{1-kr^{2}}
  & {\Gamma^{0}}_{22}&=\dot{a}ar^{2}
  & {\Gamma^{0}}_{33}&=\dot{a}ar^{2}\sin^{2}{(\theta)}
\\
{\Gamma^{1}}_{11}&=+\frac{kr}{1-kr^{2}}
  & {\Gamma^{1}}_{22}&=-r(1-kr^{2})
  & {\Gamma^{1}}_{33}&=-(1-kr^{2})r\sin^{2}{(\theta)}
  & {\Gamma^{2}}_{12}&=\frac{1}{r}
\\
{\Gamma^{3}}_{23}&=\cot{(\theta)}
  & {\Gamma^{3}}_{13}&=\frac{1}{r}
  & {\Gamma^{2}}_{33}&=-\sin{(\theta)}\cos{(\theta)}
\end{align*}

\end{document}

You must log in to answer this question.