# The text “height” keeps popping up in tables

In my LaTeX document, I have some simple code for the simplest of tables. But, when I let TeXnicCenter output it to PDF, the text 'height' is suddenly in the first cell and on the first cell in a new row I didn't define. Of course googling for the height and table gives lots of results, but not to this question

\begin{table}[h]
\begin{tabular}{|l|l|l|l|l|}
\hline
~ & $\theta$      & d   & a  & $\alpha$ \\ \hline
1 & 0             & 100 & 0  & $\pi$    \\
2 & 0             & 0   & 90 & 0        \\
3 & $\frac{\pi}{2}$ & 50  & 0  & 0      \\
\hline
\end{tabular}
\end{table}


-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem (i.e. not just the table, but the preamble too). –  Joseph Wright Nov 6 '11 at 17:02

It seems that you must have something like the following in your code, where you have height instead of \hline:

\documentclass{article}
\begin{document}
\begin{table}[h]
\begin{tabular}{|l|l|l|l|l|}
height
~ & $\theta$      & d   & a  & $\alpha$ \\ \hline
1 & 0             & 100 & 0  & $\pi$    \\
2 & 0             & 0   & 90 & 0        \\
3 & $\frac{\pi}{2}$ & 50  & 0  & 0      \\
height
\end{tabular}
\end{table}
\end{document}


The above produces the output you provided. With height in the above replaced with \hline (as per your MWE), I get the following. So, your MWE is correct, but check your actual code.

-
If that is not the case, try \show\hline in the tabular. It should stop the compilation and give the following message: > \hline=macro: ->\noalign {\ifnum 0=}\fi \hrule \@height \arrayrulewidth \futurelet \reserved @a \@xhline . If it says something else (especially height), \hline has been redefined somewhere. –  Stephen Nov 6 '11 at 18:09
@Stephen: I thought of that, but the \hline on the second line seems to have worked so don't think that is the case. –  Peter Grill Nov 6 '11 at 20:04
Somehow, pasting in your code, with the 'height' text included, then replacing that by \hline works... I completely los on why that woudld happen, because the code is now again exactly as before, how I posted it in the original question. –  Loy Nov 7 '11 at 8:10
Maybe you have some active unicode character in it, which causes trouble. –  Martin Scharrer Nov 7 '11 at 14:57
@PeterGrill: Ah, right, I missed that one \hline`! –  Stephen Nov 7 '11 at 17:09