The tree is split between two pages, and text lines are inserted among some tree lines. The tree looks shifted to the left on the next page because the book is two-sided, but I don't typeset two-sided documents. The bottomleft branch skips two lines magically and starts numbering at (9).

How did the author ever do this? If prooftrees made it easy to do it, I'd do it.

enter image description here

  • No. I have no plans at the moment to implement functionality which would typeset this. I think it is illogical. The tree has two lines 9 and two lines 10. That just seems confusing to me. I wouldn't recommend typesetting a tree this way and I don't plan to enable it. If prooftrees happened to be able to do it, I wouldn't go out of my way to stop people doing it. But I see no reason to take positive steps to make it possible. The problem is that no lines are skipped. Rather, there are 2 sets of 2 lines with the same numbers. – cfr Mar 23 '16 at 1:08
  • Does it mean that you plan to implement automatic tree splitting on page breaks and make it possible to insert text lines between tree lines? I personally don't care much about line numbers, either. – crocket Mar 23 '16 at 1:10
  • If that branch really skipped 2 lines and the numbering on the next page started at 11, that would be different. However 'will' is too strong. Right now, prooftrees could not typeset this. If people actually use it and seem interested, the possibility of splitting trees is something I think would be a useful feature. But I'd rather concentrate on getting the current stuff to work without bugs at the moment. (I'm sure there are bugs. If people use it, they'll no doubt report them.) – cfr Mar 23 '16 at 1:11
  • plan is too strong. Haven't really thought about text in between. Splitting at page breaks will not be likely to be automatic. I'd expect to implement a manual option to split a tree at a page break. But, as I say, it may turn out nobody uses even the current version, in which case there won't be any point. And, besides, I don't want to try implementing anything new in it right now. I don't have any confidence in it as it is. There are bound to be cases I've not tried, bugs I've not found. Those get priority. – cfr Mar 23 '16 at 1:15
  • I figured out that manual splitting enables people to insert text lines between tree lines and split trees between pages. So, you can catch two birds with one stone. Where can I submit issues? – crocket Mar 23 '16 at 1:15

It is already possible to do some of this with prooftrees, though due to a bug it is not possible to start line numbering at 6 with the published version yet.

If you are careful, you can use the split here style included in my other answer and based on Sašo Živanović's code to split a prooftrees prooftree once, interjecting some explanation or a page break or whatever in between.

Note: This WILL break. I don't know where, but there is absolutely no question that it will break. It is barely tested on this proof, let alone others.

Indeed, I discovered 2 existing bugs in prooftrees playing with this, even without splitting the proof into pieces. (These will be fixed shortly after the next version of Forest is pushed to CTAN.)

Caveat emptor...

For example:

% Sašo Živanović: https://tex.stackexchange.com/a/296771/
  declare count register={split here level},
  declare toks register={split here interject},
  split here level'=-1,
  split here interject={},
  to widest/.style={
    tikz+={\path (\forestregister{tempdima}, \forestoption{y}) -- (\forestregister{tempdimb}, \forestoption{y});},
  split here/.style={%
    split here level'/.option=level,
    split here interject={#1},
    split tree
  split tree/.code={%
      draw tree stage/.style={
        for root'={
          for tree={%
            to widest,
        for nodewalk/.wrap pgfmath arg={{draw tree processing order/.style={level<=####1}}{}}{split_here_level},
        for root'={draw tree},
        TeX/.wrap pgfmath arg={\bigskip\hiddenparcommand ####1\hiddenparcommand}{split_here_interject},
        for nodewalk/.wrap pgfmath arg={{draw tree processing order/.style={level>=####1}}{}}{(split_here_level)+1},
        for root'={draw tree},
    line no shift=5,
    just refs right,
  [Fa, name=fa
    [{\lnot((Fa \land \forall y (Fy \supset y=a))} \land Ga), checked
      [{\lnot(Fa \land \forall y (Fy \supset y=a))}, checked, split here={So far, so automatic. The right hand branch closes, for we have}
        [\lnot Fa, just={from:!u}, close={:!uuu,!c}
        [{\lnot \forall y (Fy \supset y=a)}, checked
          [{\exists y \lnot (Fy \supset y=a)}, just={from:!u}, checked=b
            [{\lnot (Fb \supset b=a)}, just={from:!u}
      [\lnot Ga
        [Fa \supset Ga, just=from 3
          [\lnot Fa, close={:fa,!c}]
          [Ga, close={:!uu,!c}]

split prooftrees proof tree

  • Remove line no shift=5 to compile this with the current version of prooftrees. This will reveal another bug, but you'll be able to see the basic tree. (There will be a very short vertical line between lines 9 and 10, which there shouldn't be, because I forgot a no edge in the code.) – cfr Mar 24 '16 at 1:36
  • Ok, I'm going to wait until prooftrees enters texlive on manjaro linux. – crocket Mar 24 '16 at 23:51
  • I thought you used Arch? Anyway, no matter. I have a fragile multiple split version working, although not in moving lines. And 'working' is a bit misleading as it adds space. It appears that the tree is still there - it just isn't drawn. – cfr Mar 25 '16 at 0:34

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.