I want to typeset something like the following picture.
I came up with
\documentclass[oneside,12pt]{article}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
\[
\begin{aligned}
&\neg&(P &\wedge&R)\\
&T&&F&\\
\end{aligned}
\]
\end{document}
How can I typeset a table like the above one?
Best Answer
Logic is not all that well supported in LaTeX, unfortunately. At least, if it is, I haven't managed to track down the support. Everything always seems to involve a solution intended for some other problem and making it do something else.
If you have the patience, you could use something like this. I find
tabular
less hassle than a maths environment because all the Ts and Fs and Ps and Qs and so on need to be in what is essentially a text font anyway. (At least if your text font is also used for operators and so on in maths mode, which is usual.) And switching into maths mode for other things is less of a pain than typing\text{}
all the time for text mode.There are scripts which will produce the tables for you, but if you are learning logic, that's no good because you need to figure out the tables for yourself. If you are teaching logic, on the other hand, they can be very useful. They don't do the spacing adjustments I included here, either. At least, the one I used didn't.