% Truthtables Gerben Wierda
% C0ntext file
% filename: truthtable-Wierda.tex
% Gerben Wierda
% W. Egger
% 13-03-2005

\setupoutput[pdftex]
\setupbodyfont[ss,12pt]

\usemodule[bib] % defines \newcommand
\newcommand{\operand}[1]{{\sc #1}}
\newcommand{\ttvalue}[1]{{\sc #1}}
\newcommand{\xttable}[7]{\starttable[|p(2cm)|p(5cm)|p(3cm)|]
\HL %
\NC #1 \NC #2 \NC #1 \operand{#3} #2 \NC\NR
\HL
\NC \ttvalue{false} \NC \ttvalue{false} \NC \ttvalue{#4} \NC\NR %
\NC \ttvalue{false} \NC \ttvalue{true} \NC \ttvalue{#5} \NC\NR %
\NC \ttvalue{true} \NC \ttvalue{false} \NC \ttvalue{#6} \NC \NR %
\NC \ttvalue{true} \NC \ttvalue{true} \NC \ttvalue{#7} \NC\NR\HL %
\stoptable}
\newcommand{\ttable}[5]{\xttable{a}{b}{#1}{#2}{#3}{#4}{#5}}
\starttext
Looks fine:\blank
\midaligned{%
\xttable{Statement X}{Statement Y}{$\Rightarrow$}%
{unknown}{unknown}{invalid (false)}{valid (true)}
}


 This doesn't work:\blank
\midaligned{%
\xttable{Some sort of longer statement}{Another sort of longer statement}%
{$\Rightarrow$}%
{unknown}{unknown}{invalid (false)}{valid (true)}
}

% This doesn't work either:\blank
% \midaligned{%
% \xttable{\framed[width=2cm,frame=off]{Some sort of longer
% statement\par}}{\framed[width=2cm,frame=off]{Another sort of longer
% statement\par}}{$\Rightarrow$}%
% {unknown}{unknown}{invalid (false)}{valid (true)}
% }
\stoptext
