2

Consider the following code:

\documentclass{article}
\usepackage{graphicx}

\usepackage{bussproofs}
\newenvironment{bprooftree}
  {\leavevmode\hbox\bgroup}
  {\DisplayProof\egroup}

\begin{document}

\[
  \begin{bprooftree}
  \AxiomC{$ $}
  \LeftLabel{R1:}
  \UnaryInfC{s}
  \end{bprooftree}
\qquad
  \begin{bprooftree}
  \AxiomC{$s_1,\cdots,s_n$}
  \LeftLabel{R2:}
  \UnaryInfC{s}
  \end{bprooftree}
\]

\end{document}

The result is the following: enter image description here

As you can see from the picture R1 and R2 are not vertically aligned (at least not in the way a would like). How can I achieve a correct alignment?

Note: I do not remember exactly why I added the line with \newenvironment but I think that it was due to the conflict with another package that I use: qtree.

1

Each tree is vertically centered on the math axis with respect to its contents. If you want two of them to have the same size, you need to use phantoms.

I also added a different style, with better control of the space between the trees.

\documentclass{article}
\usepackage{graphicx}

\usepackage{bussproofs}
\newenvironment{bprooftree}
  {\leavevmode\hbox\bgroup}
  {\DisplayProof\egroup}

\begin{document}

\[
  \begin{bprooftree}
  \AxiomC{$\vphantom{s_1,\cdots}$}
  \LeftLabel{R1:}
  \UnaryInfC{s}
  \end{bprooftree}
\qquad
  \begin{bprooftree}
  \AxiomC{$s_1,\cdots,s_n$}
  \LeftLabel{R2:}
  \UnaryInfC{s}
  \end{bprooftree}
\]

\[
  \AxiomC{$\vphantom{s_1,\cdots}$}
  \LeftLabel{R1:}
  \UnaryInfC{s}
  \DisplayProof
\qquad
  \AxiomC{$s_1,\cdots,s_n$}
  \LeftLabel{R2:}
  \UnaryInfC{s}
  \DisplayProof
\]

\end{document}

enter image description here

1
  • thank you for the workaround. why does not the bprooftree environment inform the math environment over the position of the baseline of the single proof? there should be some similar mechanism to align \[ a\quad\frac{1}{2}\]? Feb 8 '19 at 11:36

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.