How can I achieve a result similar to the image below?

I tried a mixture of boxes and tabular, but the box didn't allow the tabular enviroment.
Thank you
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass{article}\usepackage{KMcalc}\renewcommand{\KMproveword}{}\renewcommand{\KMProveword}{}\newlength{\linelength}\setlength{\linelength}{2cm}\newcommand{\myline}[2]{\KMline{\qquad\makebox[\linelength][l]{$#1$}#2}{}}\newcommand{\mylineboxunder}[2]{\KMprove{\qquad\makebox[\linelength][l]{$#1$}#2}{}}\begin{document}\begin{KMcalc}%\mylineboxunder{\lnot p \lor q}{}\mylineboxunder{\lnot p}{premise}\myline{p}{assumption}\myline{\bot}{$\lnot$e 3,\,2}\myline{q}{$\bot$e 4}\KMclose\myline{p \rightarrow q}{~~$\rightarrow$i 3--5}\KMclose\myline{p \rightarrow q}{}%\end{KMcalc}\end{document}
Code: Select all
\documentclass[]{article}\usepackage{KMcalc}\renewcommand{\KMproveword}{}\renewcommand{\KMProveword}{}\newlength{\linelength}\setlength{\linelength}{2cm}\newcommand{\myline}[2]{\KMline{\qquad\makebox[\linelength][l]{$#1$}#2}{}}\newcommand{\mylineboxunder}[2]{\KMprove{\qquad\makebox[\linelength][l]{\hspace{-0.27cm}$#1$}#2}{}}\begin{document}\begin{KMcalc}%\myline{p \rightarrow q}{premissa}\mylineboxunder{r \rightarrow s}{premissa}\myline{p}{hipótese}\myline{q}{$\rightarrow_e 1,3$}\myline{q \lor s}{$\lor_{i_1} 4$}\KMclose\mylineboxunder{p \rightarrow q \lor s}{$\rightarrow_i$ 3--5}\myline{r}{hipótese}\myline{s}{$\rightarrow_e$ 2,7}\myline{q \lor s}{$\lor_{i_2}$ 8}\KMclose\myline{r \rightarrow q \lor s}{$\rightarrow_i$ 7--9}\myline{p \lor r \rightarrow q \lor s}{\hspace{0.5cm}$\lor_e$ 3-5, 7-9}%\end{KMcalc}\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.