0

How can I create framed boxes with two columns, where there is a line numbering on every row where there is something written? (if hard or possible then a number for every line in general)

Something like this: enter image description here

  • You should look at logicmatters.net/latex-for-logicians/nd. – cfr Nov 27 '14 at 23:29
  • Related: Boxing some cells in tabular environment – Werner Nov 27 '14 at 23:29
  • Normally, you don't box the premises or the final conclusion but only sub-proofs. If this is based on a system from a book, which book? – cfr Nov 27 '14 at 23:31
  • @cfr Yes sorry, I've updated my question, but the sort of idea is that I wanted boxes inside boxes for some proofs (premises should be excluded yes). Also the latex-for-logicians is very nice but it's now how my lecturers format their proofs, and since this is for an assignment that they would mark I would prefer actual boxes – Panayiotis Nov 27 '14 at 23:49
  • @Werner That looks very promising I will have an attempt at it – Panayiotis Nov 27 '14 at 23:49
2

It is a lot easier to produce the corrected image! Please do bear this in mind when posting future questions. (I came up with a solution for the original even though it made no sense to me to do it that way!)

Boxes are no problem. The page I directed you to includes information about typesetting proofs with boxed sub-proofs in at least three different styles. You should try this one:

\documentclass{article}
\usepackage{logicproof}

\begin{document}

  \begin{logicproof}{1}
    P \lor Q & premise\\
    Z & premise\\
    \begin{subproof}
      P & [assume]\\
        [\dots] &\\
          &
    \end{subproof}
    \begin{subproof}
        Q & [assume]\\
        [\dots] &\\
          &
    \end{subproof}
    (P \lor Q) \land Z & el 3--4 5--6
  \end{logicproof}

\end{document}

boxed proofs

Incidentally, you ought not need sub-proofs at all for this particular question, but you know that, right?

  • Thank you very much! Also, yes I just typed random letters to give you the idea :) I am a bit curious however for your solution to the original and why was it that much harder – Panayiotis Nov 28 '14 at 0:13
  • @Panayiotis The package doesn't allow the final conclusion to be in a sub-proof. (It automatically adds an additional numbered line.) You can, however, box the entire proof after constructing it. I did this using the tikzmark library to mark points in the proof and the fit library to construct a TiKZ node around the proof, overlaying the picture on top of the proof itself. But this is a bit fiddly ;). – cfr Nov 28 '14 at 0:15
  • Ah, thank you! it's seems a really fiddly way to go, and the logic package makes everything much easier – Panayiotis Nov 28 '14 at 0:28
  • @Panayiotis I still used the package. I just used all that stuff to draw the outer box! – cfr Nov 28 '14 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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