Hello, I just downloaded LaTeX and know almost nothing about the language. I am trying to get a document created for something school related. I downloaded LaTeX and did some googling for what I was trying to do but I cant get my code to compile. Basically, I am trying to output a Truth table for an implication statement. Here is what I have so far. Any explanations of how to fix what I have wrong and tips on the formatting of LaTeX would be much appreciated.
\documentclass{article}
\begin{document}
\begin{table}
\begin{tabular}{•}
\begin{array}{|c |c|c|}
p & q & p \implies q\\
\hline
T & T & T
T & F & F
F & T & T
F & F & T
\end{array}
\end{tabular}
\end{document}
This results in the following error:
! LaTeX Error: Illegal character in array arg.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \begin{tabular}{•}
?
General ⇒ Unable to compile
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Unable to compile
There are several issues with your code (which is unfortunately also not marked as code using either the Code button in the toolbar or the "Select code" feature):
I've removed the
Please read an introduction to LaTeX. You won't become happy with LaTeX without reading at least a short introduction but I would suggest to read a detailed one.
BTW: Vertical rules/lines in tabulars/tables are awful. See the manual of package booktabs for information how to make nice tabulars/tables.
-
*
is not a valid column declaration fortabular
but a multiplier that expects two arguments. -
array
needs the math mode -
\implies
is undefined without package, that defines it - The array row ends are missing.
-
\begin{table}
without\end{table}
Code: Select all
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
\begin{array}{|c|c|c|}
p & q & p \implies q\\
\hline
T & T & T \\
T & F & F \\
F & T & T \\
F & F & T \\
\end{array}
\]
\end{document}
table
environment, because table
without \caption
mostly does not make sense.Please read an introduction to LaTeX. You won't become happy with LaTeX without reading at least a short introduction but I would suggest to read a detailed one.
BTW: Vertical rules/lines in tabulars/tables are awful. See the manual of package booktabs for information how to make nice tabulars/tables.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 
