1

Is it possible to overlap the center of the node containing the first premiss of proof trees like the ones in the MWE with the vertical center of the page?

Here is the MWE:

\documentclass[openany,oneside,a4paper,11pt]{memoir}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[linguistics]{forest}
\usepackage[tableaux]{prooftrees}

    \begin{document}

    \begin{center}
        \begin{tableau}
            {}
            [\forall x(Fx \rightarrow Bx),just={premiss}
            [Fa,just={premiss}
            [\lnot Ba, just={negated the conclusion}
            [Fa \rightarrow Ba, just={1 $ \forall $}
            [\lnot Fa, just={4 $ \rightarrow $}, close]
            [Ba, close]
            ]
            ]
            ]
            ]
        \end{tableau}
    \end{center}

    \begin{center}
        \begin{tableau}% Adepted from Peter Smith's "LATEX for logicians: Setting tableaux using prooftrees.sty"
            {
                line no sep= 1.5cm,
                just sep= 1.5cm,
                for tree={s sep'=10mm},
                just refs right, % Set where crossreferences go
            }
            [((P \land Q) \rightarrow R), just={Premiss}, name=Prem
            [\neg(P \rightarrow (Q \rightarrow R)), just={Negated conclusion}, name=NegConc
            [P, just={From: NegConc}
            [\neg(Q \rightarrow R), just={From: NegConc},name=Alice
            [Q, just={From: Alice}
            [\neg R, s sep=30mm, just={From: Alice}
            [\neg(P \land Q), just={Alternatives from: Prem},name=Bertie
            [\neg P, close, just={Alternatives from: Bertie}
            ]
            [\neg Q, close
            ]
            ]
            [R, close]
            ]
            ]
            ]
            ]
            ]
            ]
        \end{tableau}
    \end{center}

    \end{document}
4
  • Halfway between the left and right margin? Halfway between the left paper edge and the right paper edge? Or top and bottom margins? Or top and bottom edges? The only way to do it is, I assume, by brute force calculation. Do any tableaux use to prove? For what it is worth, I think this is a bad idea as the numbers of proofs will not be aligned with each other. (But you are centring them anyway, so maybe you're not worried about that.)
    – cfr
    Sep 22, 2017 at 21:47
  • Your second tableau is already too wide for the text block. Centring the first premise will make this worse.
    – cfr
    Sep 22, 2017 at 22:14
  • I was trying to say "halfway between the left and right margin", but couldn't figure out how to say it - linguistic incompetence of a non-english speaker, sorry :)
    – Kutt
    Sep 22, 2017 at 22:57
  • It could well be me. I never know which is the 'vertical centre' and which the 'horizontal centre'. The xcoffins manual uses this kind of terminology and I never get it the right way around.
    – cfr
    Sep 23, 2017 at 0:07

1 Answer 1

1

For the record, I recommend not doing this for both technical and aesthetic reasons.

Caveat emptor.

The tableau is just a box. Whatever you do in the box is, basically, irrelevant to how that box is treated as a whole. So, the only way I can think to do this (without using absolute positioning) is using brute force and ignorance.

centre first premise makes the box bigger by enough to shift the tree such that the centre of the first premise aligns with the point halfway between the left and right margins, provided that the box is placed at the left margin.

The upshot of this is that you must eliminate the center environment and add \noindent if the tableau starts a new paragraph.

Your second tableau is too wide for the text block already. Centring the fist premise as described makes the problem much worse.

showframe is used to illustrate the layout and the problem.

Again I do not recommend trying this at home. Should not be taken internally. Keep out of reach of small children, cats and parakeets. Provided as is. If it breaks, you get to keep all the itsy-bitsy little pieces.

\documentclass[openany,oneside,a4paper,11pt]{memoir}
\usepackage{amssymb}
\usepackage{amsmath,showframe}
\usepackage[linguistics]{forest}
\usepackage[tableaux]{prooftrees}

\begin{document}
\forestset{
  declare dimen register={centring dim},
  centring dim'=0pt,
  centre first premise/.style={
    before drawing tree={
      for nodewalk={
        fake=r,
        1,
        while nodewalk valid={n}{n}
      }{
        tempdima/.process={OOw2+d{max x}{min x}{(##1-##2)/2}  },
      },
      tempdimb/.min={>OOw2+d{x}{min x}{##1+##2}}{tree},
      tikz+={
        \path (current bounding box.west) -- ++({-.5\textwidth-\forestregister{tempdimb}},0);
      }
    },
  },
}

\noindent
\begin{tableau}
  {centre first premise}
  [\forall x(Fx \rightarrow Bx),just={premiss}
  [Fa,just={premiss}
  [\lnot Ba, just={negated conclusion}
  [Fa \rightarrow Ba, just={1 $ \forall $}
  [\lnot Fa, just={4 $ \rightarrow $}, close]
  [Ba, close]
  ]
  ]
  ]
  ]
\end{tableau}

\noindent
\begin{tableau}% Adepted from Peter Smith's "LATEX for logicians: Setting tableaux using prooftrees.sty"
  {
    line no sep= 1.5cm,
    just sep= 1.5cm,
    for tree={s sep'=10mm},
    just refs right, % Set where crossreferences go
    centre first premise,
  }
  [((P \land Q) \rightarrow R), just={Premiss}, name=Prem
  [\neg(P \rightarrow (Q \rightarrow R)), just={Negated conclusion}, name=NegConc
  [P, just={From: NegConc}
  [\neg(Q \rightarrow R), just={From: NegConc},name=Alice
  [Q, just={From: Alice}
  [\neg R, s sep=30mm, just={From: Alice}
  [\neg(P \land Q), just={Alternatives from: Prem},name=Bertie
  [\neg P, close, just={Alternatives from: Bertie}
  ]
  [\neg Q, close
  ]
  ]
  [R, close]
  ]
  ]
  ]
  ]
  ]
  ]
\end{tableau}

\end{document}

ungainly tableaux

2
  • I see your very well made points, and thank you very much for your answer.
    – Kutt
    Sep 22, 2017 at 22:58
  • @Kutt It really makes me happy to know people are using prooftrees, though :-).
    – cfr
    Sep 23, 2017 at 0:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .