In array env,
how to add extra space between two columns?
how to enumerate acrossrows?
e.g.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe answer to How to enumerate the rows of a table may not satisfy you, since it numbers all the rows.
I suggest a modification, also for allowing you to refer to the row numbers via the \label
-\ref
mechanism.
\documentclass{article}
\usepackage{array}
\newcounter{formalproof}
\newenvironment{formalproof}
{\setcounter{formalproof}{0}%
\begin{tabular}{
@{}
>{\refstepcounter{formalproof}\theformalproof. $}l<{$}
@{\hspace{2em}}
l
@{}
}
\multicolumn{1}{@{}l@{\hspace{2em}}}{\textbf{Step}} & \multicolumn{1}{@{}l@{}}{\textbf{Reason}}\\}
{\end{tabular}}
\begin{document}
\noindent\begin{formalproof}
\label{ONE} \forall x(D(x)\to C(x)) & Premise \\
\label{TWO} D(\textrm{Marla})\to C(\textrm{Marla}) & Universal instantiation from (\ref{ONE}) \\
\label{THR} D(\textrm{Marla}) & Premise \\
C(\textrm{Marla}) & Modus ponens from (\ref{TWO}) and (\ref{THR})
\end{formalproof}
\end{document}
The labels you use are arbitrary, of course.
add comment
function.