prooftrees.sty - why are line numbers overlapping and how to avoid?

Why are the "6" and "7" overlapping here and how can I avoid it?

\documentclass[border=10pt]{standalone}
\usepackage{prooftrees}
\begin{document}
\begin{prooftree}{}
[A
[A
[A
[A
[A
[A
[A]
]
]
]
]
]
[A
[A
[A
[A]
[A]
]
]
]
]
\end{prooftree}
\end{document}


I'm aware of the "move by" option, however in a large, complex tree this adds a lot of sometimes quite long single branches which doesn't look very good imo. It seems to me that when a branching rule is applied, the branches should either increase/decrease in size so that this doesn't happen.

Edit - something like this is what I would like:

• Welcome to TeX.SE! Good to see you've provided a minimal working example, that is very helpful. It is however not fully clear (to me) how you would want the output to look, and how automated this should be. Do you want the branching step (7) below the last single row (8 in this case). i.e., extending the edges? Or do you want it to be positioned between 6 and 7 as it is now, with extra space within the single branch? Or maybe something like pushing the 7 a bit to the left and keep the other numbers as they are? – Marijn Oct 22 '18 at 15:19
• Did you try it with \begin{prooftree}{single branches=true} ? Is that output acceptable? – Thruston Oct 22 '18 at 15:24
• Pages 22-23 of the manual (try texdoc prooftrees) suggests that automatically fixing issues like this is not always possible... – Thruston Oct 22 '18 at 15:38
• @Marijn Thank you for your reply. I would either like the branching step (7) extended like you said or preferably I would like it aligned with either 6 or 8. I know the latter would produce the "merge delimiter" / "Merging conflicting justifications" warning, but I don't really mind having multiple justifications on the same line. The problem is I don't know how to tell prooftrees to align it with either 6 or 8. – Ben Loewe Oct 22 '18 at 22:33
• @Thruston Thank you for your reply. I have tried constructing trees with \begin{prooftree}{single branches=true} however this doesn't necessarily fix it. Well that might explain a lot as I have fiddled around with the "move by" along with the "single branches" option quite a bit, and still struggled to to avoid these issues. I can do it, it just ends up adding lots of long single branches, which I don't really want. – Ben Loewe Oct 22 '18 at 22:50

prooftrees should not generate this output by default. That is, I consider it a bug. However, it is unlikely to generate precisely the output you want by default either. That I do not consider a bug.

With current prooftrees, I suggest

\documentclass[border=10pt]{standalone}
\usepackage{prooftrees}
\begin{document}
\begin{prooftree}{}
[A
[A
[A
[A
[A
[A
[A]
]
]
]
]
]
[A
[A
[A
[A, move by=1]
[A, move by=1]
]
]
]
]
\end{prooftree}
\end{document}


Alternatively,

\begin{prooftree}{}
[A
[A
[A
[A
[A, move by=1, edge+={draw=none}% if you don't want an edge
[A
[A]
]
]
]
]
]
[A
[A
[A
[A]
[A]
]
]
]
]
\end{prooftree}


A (just invented) development version, however, avoids overlapping in the default case:

\begin{prooftree}{}
[A
[A
[A
[A
[A
[A
[A]
]
]
]
]
]
[A
[A
[A
[A]
[A]
]
]
]
]
\end{prooftree}


This will make it into the next version of prooftrees if (a) anyone seems interested and (b) it doesn't cause worse effects than those it avoids and which I cannot figure out how to prevent.

• I didn't answer the 'why?' The answer is that when proof line numbers are assigned, the disjunctions on the right have a smaller y than the non-disjunction on the left, because the one on the left has l set to \baselineskip, whereas the ones on the right don't. This avoids overly leggy trees. So the disjunctions get a new line number, because y is less than it is for the non-disjunction, but the l on the right is not twice \baselineskip, so the next number on the left gets another number which overlaps with it. The disjunction should be on line 5. – cfr Nov 11 '18 at 3:57
• Thank you for this solution. Not sure if you've released the updated version or not, but if you have I'll definitely give it a try, otherwise the second solution looks quite elegant too. – Ben Loewe Nov 23 '18 at 3:23
• @BenLoewe I haven't published it yet. If you are prepared to try it, send me an email and I'll send you a copy to test. That way, you can drop it in your working directory and just delete it if things go wrong. And you can let me know if it works OK or you find problems. – cfr Nov 23 '18 at 6:02
• Yeah I'll give it a try, I'm a LaTeX newbie so I don't how well I'll be able to diagnose any problems if they arise. – Ben Loewe Nov 23 '18 at 6:31
• where can I find your email? – Ben Loewe Nov 23 '18 at 7:19