Maybe that’s an answer to some exercise for students, which is why you want a tree fully annotated with line numbers, justifications on the right, and justifications too for closing off branches. Previously, getting in all that detail using available LaTeX resources would have been tricky. Now help is at hand. There is a very nice new package prooftrees.sty which will enable you to generate that output easily. And, of course, generate simpler results too, without line numbers and/or justifications, if that’s what you want. The package seems very flexible and to provide, at last, the kind of purpose-built-for-logicians tool that we have needed for a long time. So all credit to Clea Rees for her work on this.