1

Am getting countless error messages for 'Missing $' and Extra }, or 'forgotten $'. I am building a table and trying to fill some cells with dots (\cdots, \vdots etc). The first line in the table with errors is this one - I have defined 7 columns.

\begin{table}[h]
\begin{center}
\caption[Matrix of Demand projections]{Matrix of demandssss.}
\begin{large}
\begin{tabular}{|c|c||c c c c c|} 
\hline
%First row - with errors below
& States \emph{G} & $\ g_{1}$ & \cdots & $\ g_{z}$ & \cdots & $\ g_{Z}$\\

The table constructs correctly, however I am getting loads of error messages. If anyone could help me understand why that'd be appreciated! Error messages are as follows:

Missing $ inserted
Extra }, or forgotten $.
Missing $ inserted
Missing } inserted

.. and so on... repeating itself as it tries to work it out.

1
  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Aug 8, 2012 at 19:28

1 Answer 1

3

\cdots is a math mode command, hence the error. In text mode, use \ldots.

But better yet, use neither. Instead, use the \dots command indiscriminately (i.e. both in text mode and in math mode). The command requires the amsmath package. \dots also has the advantage of doing the right thing in different math contexts (meaning it adjusts its height automatically to fit surrounding context).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.