0

How can I change the width of the following prooftree without changing its font size? I would like to remove the big space between T1 and T5

\begin{prooftree}
    %T1
    \AxiomC{$\langle {\tt y:=1}, s \rangle \to s_{13}$}
    %T2
    \AxiomC{$\langle {\tt y:=y \star x}, s_{13} \rangle \to s_{33}$}
    \AxiomC{$\langle {\tt x:=x-1}, s_{33} \rangle \to s_{32}$}
    \BinaryInfC{$\langle {\tt y:=y \star x; x:=x-1)}, s_{13} \rangle \to s_{32}$}
    %T3
    \AxiomC{$\langle {\tt y:=y \star x}, s_{32} \rangle \to s_{62}$}
    \AxiomC{$\langle {\tt x:=x-1}, s_{62} \rangle \to s_{61}$}
    \BinaryInfC{$\langle {\tt y:=y \star x; x:=x-1}, s_{32} \rangle \to s_{61}$}
    %T4
    \AxiomC{$\langle {\tt while \ \neg(x=1) \ do \ (y:=y \star x; x:=x-1)}, s_{61} \rangle \to s_{61}$}
    \BinaryInfC{$\langle {\tt while \ \neg(x=1) \ do \ (y:=y \star x; x:=x-1)}, s_{13} \rangle \to s_{61}$}

    %T5
    \BinaryInfC{$\langle {\tt while \ \neg(x=1) \ do \ (y:=y \star x; x:=x-1)}, s_{13} \rangle \to s_{61}$}
    \BinaryInfC{$\langle {\tt y:=1; \ while \ \neg(x=1) \ do \ (y:=y \star x; x:=x-1)}, s \rangle \to s_{61}$}
\end{prooftree}
2

The space between T1 and T5 can be reduced by adding a negative space at the end of T1, e.g.:

%T1
\AxiomC{$\langle {\tt y:=1}, s \rangle \to s_{13}$\kern-3em}

Full example:

\documentclass{article}
\usepackage{bussproofs}
\usepackage[a3paper,margin=0pt]{geometry}

\begin{document}
\begin{prooftree}
    %T1
    \AxiomC{$\langle {\tt y:=1}, s \rangle \to s_{13}$\kern-3em}
    %T2
    \AxiomC{$\langle {\tt y:=y \star x}, s_{13} \rangle \to s_{33}$}
    \AxiomC{$\langle {\tt x:=x-1}, s_{33} \rangle \to s_{32}$}
    \BinaryInfC{$\langle {\tt y:=y \star x; x:=x-1)}, s_{13} \rangle \to
    s_{32}$}
    %T3
    \AxiomC{$\langle {\tt y:=y \star x}, s_{32} \rangle \to s_{62}$}
    \AxiomC{$\langle {\tt x:=x-1}, s_{62} \rangle \to s_{61}$}
    \BinaryInfC{$\langle {\tt y:=y \star x; x:=x-1}, s_{32} \rangle \to
    s_{61}$}
    %T4
    \AxiomC{$\langle {\tt while \ \neg(x=1) \ do \ (y:=y \star x; x:=x-1)},
s_{61} \rangle \to s_{61}$}
    \BinaryInfC{$\langle {\tt while \ \neg(x=1) \ do \ (y:=y \star x;
x:=x-1)}, s_{13} \rangle \to s_{61}$}

    %T5
    \BinaryInfC{$\langle {\tt while \ \neg(x=1) \ do \ (y:=y \star x;
x:=x-1)}, s_{13} \rangle \to s_{61}$}
    \BinaryInfC{$\langle {\tt y:=1; \ while \ \neg(x=1) \ do \ (y:=y \star
x; x:=x-1)}, s \rangle \to s_{61}$}
\end{prooftree}
\end{document}

Result

However, the text alone of the longest line (line 2) sums up to approximately 20cm. Unless the prooftree is set in landscape or larger paper size, other methods are necessary to decrease the width:

  • Scaling, but the font might end up too small.
  • Multi-line entries, e.g. via environment array.
  • ...
  • How would you do this with an array and what would it look like? – Oskar Persson Sep 7 '15 at 14:18
  • @Oskar $\begin{array}abc\\def\\ghi\end{array}$. It is centered by default, \begin{array}[t] and \begin{array}[b] are top-aligned and bottom-aligned. – Heiko Oberdiek Sep 7 '15 at 14:21

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.