TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I have been using online latex editor for generating equations for my blog. I am kind of novice to Latex. Now I want to generate a table for the first time. But when I try to write a greek letter into a table cell I get invalid equation error.

A sample code is:

2 & \alpha & 4 \\

This \alpha generates the "invalid equation" error, I want a greek alpha letter there.

Sorry if it is too simple but after half an hour I am still stuck. Thanks in advance...

share|improve this question

migrated from stackoverflow.com Jul 16 '12 at 8:39

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

Welcome to TeX.sx! Your answer 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 edit your answer. – Martin Schröder Jul 17 '12 at 6:33

Table cells are not in math mode. You need to add a math environment around mathematical contents. Try this:

$2$ & $\alpha$ & $4$ \\
share|improve this answer
I've just tried this with your online editor, but it seems that the language it recognizes is restricted. (This would work with a standard latex compiler). – Stéphane Gimenez Jul 14 '12 at 16:27
still doesn't work, I suppose it is something related with the site or something? – Dogan_79 Jul 14 '12 at 16:29
@Dogan_79: The site you linked to is an equation editor, so if you surround the table with `$\begin{tabular}...\end{tabular}$, this solution generats the desired table. – Peter Grill Jul 14 '12 at 18:22
thank you peter, this works – Dogan_79 Jul 14 '12 at 23:04
@PeterGrill: If it's an equation, array would be better than tabular. – Martin Schröder Jul 16 '12 at 8:14

Your Answer


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