Math & ScienceWhat is wrong with this?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
charlejs
Posts: 3
Joined: Sat Oct 08, 2011 1:04 am

What is wrong with this?

Post by charlejs »

I'm new to Latex and all it's glory.
What am I doing wrong here?

\begin{eqnarray}
\left[ \begin{array}{c}
C_{\alpha}^{+} (x_o +\ell) \\
. \\
. \\
_____ \\
C_{\alpha}^{-} (x_o) \\
. \\
. \\
\end{array} \right]

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

What is wrong with this?

Post by Stefan Kottwitz »

Hi charlejs,

welcome to the board!
  • you used _____, however the underscore _ has a meaning in LaTeX for writing subscripts
  • you forgot to close the eqnarray environment
  • the code is incomplete, \documentclass missing etc.
  • you don't need eqnarray for a simple expression with an array
  • eqnarray is obsolete, see eqnarray vs. align
  • you could use a matrix environment instead of array
Example:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
  \begin{bmatrix}
    C_{\alpha}^{+} (x_o +\ell) \\
    . \\
    . \\
    . \\
    C_{\alpha}^{-} (x_o) \\
    . \\
    . \\
  \end{bmatrix}
\]
\end{document}
Stefan
LaTeX.org admin
charlejs
Posts: 3
Joined: Sat Oct 08, 2011 1:04 am

Re: What is wrong with this?

Post by charlejs »

Thanks for the response. I'll look at using the bmatrix structure that you gave me the example for. I have plenty of matrices to write. And good to know eqnarray is obsolete. Some background, I'm making changes to a 9 year old Latex document.
Post Reply