TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

\caption[Matrix of Demand projections]{Matrix of demandssss.}
\begin{tabular}{|c|c||c c c c c|} 
%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.

share|improve this question

migrated from stackoverflow.com Aug 8 '12 at 19:23

This question came from our site for professional and enthusiast programmers.

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 '12 at 19:28
up vote 3 down vote accepted

\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).

share|improve this answer
Thanks - sorry what noob mistake! – Edward Byers Aug 7 '12 at 11:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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