Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In array env,

  1. how to add extra space between two columns?

  2. how to enumerate acrossrows?

e.g.

enter image description here

share|improve this question
    
Please take a look at the How to Ask-page and try to improve your question according to the guidance found there. This may require you to show some effort on your part in terms of attempting a solution. If you have questions about what to do or if you don't quite understand what this means, please ask for clarification using the add comment function. –  egreg Nov 18 '12 at 16:13
    
About adding the number, look at tex.stackexchange.com/questions/58138/… –  egreg Nov 18 '12 at 16:16
    
About padding the columns with some space, see Column padding in tables. –  Werner Nov 18 '12 at 16:20
    
@egreg: Thanks for the link. How to not to enumerate the first row? –  user21916 Nov 18 '12 at 16:27
    
\setcounter mentioned in tex.stackexchange.com/questions/58138/… can't be used to skip a row. –  user21916 Nov 18 '12 at 16:33

1 Answer 1

The 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.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.