Math & ScienceMath Mode Issue with Array

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
informerica
Posts: 2
Joined: Wed Aug 24, 2011 9:14 am

Math Mode Issue with Array

Post by informerica »

I have the same problem as decribed here, only in arrays.

My code looks like this.

Code: Select all

\begin{array}[H]{ c c c c c c c c c } \label{tablicaPrimjerKaraktRegija}

		    Regija & $A$ & $\overline{i}$ & $\overline{j}$ & $|P|$ & $C_1$ & $C_2$ & $\mi_R$ & $\sigma_R$ \\ \hline
				$1$ & $44$ & $6$ & $11.5$ & $21.2$ & $10.2$ & $15.4$ & $3.33$ & $0.05$ \\
				$2$ & $48$ & $9$ & $1.5$ & $28$ & $16.3$ & $2.5$ & $3.8$ & $2.28$ \\
				$3$ & $9$ & $13$ & $7$ & $8$ & $7.1$ & $5.8$ & $1.2$ & $0.04$ \\
				
		\end{array}
The compiler gets an error for each line of the array.
Last edited by localghost on Wed Mar 06, 2013 7:01 pm, edited 3 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Math Mode Issue with Array

Post by Stefan Kottwitz »

Hi,

don't use $...$ in arrays. In contrast to tabular, array already works inside math mode, so use

Code: Select all

\( \begin{array} ... \end{array} \)
or

Code: Select all

$\begin{array} ... \end{array}$
or for example displayed math

Code: Select all

\[ \begin{array}{...} A & \overline{i} & \overline{j} ... \end{array} \]
Stefan
LaTeX.org admin
informerica
Posts: 2
Joined: Wed Aug 24, 2011 9:14 am

Re: Math Mode Issue with Array

Post by informerica »

Thank you, works ok now.
Post Reply