I'm trying to recreate this table:
How do I align all the truth values beneath these headers as such? My current code is as follows:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\ttfamily{
\begin{tabular}{c|c|cccccc} \hline
$p$ & $q$ & \multicolumn{2}{c}{${\sim}(p\land{q})$} & $\Leftrightarrow$ & \multicolumn{3}{c}{$[({\sim}p)\lor({\sim}q)]$} \\ \hline
T & T & F & T & T & F & F & F \\
T & F & T & F & T & F & T & T \\
F & T & T & F & T & T & T & F \\
F & F & T & F & T & T & T & T \\ \hline
\end{tabular}}
\end{document}
Which gives me this:
It appears that every column is centered but not evenly split between the headings.
As a bonus question: Also looking to generate that box around the \iff
column but haven't researched to find an answer for that yet.
\ttfamily
is a macro without an argument --\ttfamily{}
would not delimit the font change to the table only. Most likely, you meant{\ttfamily...}
– user31729 Dec 28 '17 at 5:48