Graphics, Figures & TablesErrors at a very simple tabular

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
valefor
Posts: 12
Joined: Wed Sep 01, 2010 5:24 pm

Errors at a very simple tabular

Post by valefor »

Hi

I never before had problems with tabular. However with this code:

Code: Select all

\documentclass[12pt]{report}
\usepackage{amsmath}

\begin{document}

\begin{tabular}{llll}
+6 & -12 & 7 & $\dfrac{3}{5}$ \\ 
$\dfrac{8]{15}$ & 0 & -4 & -2,5 \\
\end{tabular}

\end{document}
The output has 13 errors,one says that the tabular ended by end{document} and many other say that there are missing { or $ characters.
I've been trying to fix it but i can't see anything. Is there something wrong?
Last edited by valefor on Fri Sep 10, 2010 12:04 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Errors at a very simple tabular

Post by frabjous »

There's a mismatched bracket. Change \dfrac{8]{15} to \dfrac{8}{15}.

I think that's the cause of all the errors. I think you should consider putting some of the other numbers, or maybe all of them, in math mode, to get a minus sign rather than a hyphen. You could also consider using a matrix or array rather than a tabular environment.
Last edited by frabjous on Thu Sep 09, 2010 9:44 pm, edited 1 time in total.
valefor
Posts: 12
Joined: Wed Sep 01, 2010 5:24 pm

Re: Errors at a very simple tabular

Post by valefor »

Thank you for your help.
Post Reply