Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple problem with alignment in Latex table

Tags:

latex

I have a simple alignment question for Latex tables. At the moment it looks as follows:

\begin{center}
  \begin{tabular}{| c | l | l | }
   \hline
    \tt {a} & $a = b + c + d + e + f + g + $ \\ 
        & $    e + f + g + h + i + j$ \\ \hline
    \end{tabular}
\end{center}

The problem is, that the output looks as follows:

a = b + c + ...
e + f + ....

However, I would like to have it looks as

a = b + c + ...
    e + f + ...

Anyone an idea how I could do that in a table?

Thanks, Klaus

like image 224
Klaus Avatar asked Feb 23 '10 12:02

Klaus


1 Answers

Please use the align environment for multiline equations.


You can add a \phantom{a = } to indicate the should-be-existing spaces.

    & $\phantom{a = }e + f + g + h + i + j$ \\ \hline
like image 165
kennytm Avatar answered Oct 29 '22 03:10

kennytm