# Latex Bussproofs Package Prooftrees on Same Line

I'd like to know how to put two prooftrees on the same line rather than under/ontop of one another. Is that possible?

\documentclass{article}
\usepackage{bussproofs}
\begin{document}
\begin{prooftree}
\AxiomC{$\Gamma\vdash B$}
\RightLabel{K}
\UnaryInfC{$\Gamma,A\vdash B$}
\end{prooftree}

\begin{prooftree}
\AxiomC{$\Gamma,(A,B),B\vdash C$}
\RightLabel{W}
\UnaryInfC{$\Gamma,A,B\vdash C$}
\end{prooftree}
\end{document}

• Could you make an example? Not everybody is acquainted with the package. – egreg Nov 25 '14 at 22:53
• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Nov 25 '14 at 22:57

## 3 Answers

You can define a bprooftree (boxed proof tree) that encloses the proof tree in a box as wide as the tree.

\documentclass{article}
\usepackage{bussproofs}

\usepackage{lipsum} % just for the example

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

\begin{document}

\lipsum*[2]
$\begin{bprooftree} \AxiomC{\Gamma\vdash B } \RightLabel{K} \UnaryInfC{\Gamma,A\vdash B } \end{bprooftree}\qquad \begin{bprooftree} \AxiomC{\Gamma,(A,B),B\vdash C } \RightLabel{W} \UnaryInfC{\Gamma,A,B\vdash C } \end{bprooftree}$
\lipsum[3]

\end{document}


• Sorry. I posted a question here which referred to a different answer. But I'm curious as to what the advantage of this method is. That is, why is a new environment required at all? Why not just use e.g. center? – cfr Nov 26 '14 at 0:27
• @cfr Just preference for a syntax similar to prooftree. – egreg Nov 26 '14 at 0:29
• The documentation says not to use  to centre proofs. I take it that does not apply to your environment? – cfr Nov 26 '14 at 0:30
• @cfr I don't see why math shouldn't be treated as such. ;-) – egreg Nov 26 '14 at 0:31
• No. I can see that. Do you know why the documentation is so adamant? (It is somewhat odd to use a maths environment and then need $...$ everywhere, of course, so I don't really see why center isn't a reasonable approach.) – cfr Nov 26 '14 at 0:32

prooftree is designed to set a proof in a centred, display environment, with appropriate vertical spacing. You don't want that so don't use the environment.

Instead, use \DisplayProof to display the proofs in-line. This can be used to set proofs within text or side-by-side.

I've used a regular center environment to display the two proofs centred and with appropriate vertical spacing. A small horizontal space separates the proofs which you can adjust according to your liking.

\documentclass{article}
\usepackage{bussproofs}
\begin{document}
\begin{center}
\AxiomC{$\Gamma\vdash B$}
\RightLabel{K}
\UnaryInfC{$\Gamma,A\vdash B$}
\DisplayProof
\hskip 1.5em
\AxiomC{$\Gamma,(A,B),B\vdash C$}
\RightLabel{W}
\UnaryInfC{$\Gamma,A,B\vdash C$}
\DisplayProof
\end{center}
\end{document}


If your proofs have differing numbers of lines, you may use \centerAlignProof or \bottomAlignProof if preferred to the default \normalAlignProof. See page 11 of the documentation for details.

A simple solution is to wrap the two proof trees in a minipage each.

\documentclass{article}
\usepackage{bussproofs}
\begin{document}
\begin{minipage}{.45\textwidth}
\begin{prooftree}
\AxiomC{$\Gamma\vdash B$}
\RightLabel{K}
\UnaryInfC{$\Gamma,A\vdash B$}
\end{prooftree}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{prooftree}
\AxiomC{$\Gamma,(A,B),B\vdash C$}
\RightLabel{W}
\UnaryInfC{$\Gamma,A,B\vdash C$}
\end{prooftree}
\end{minipage}
\end{document}


• Why? Why insist on using prooftree and then fighting it every inch of the way to stop it doing what it is supposed to do? Why not just avoid using it in the first place? Could you explain the advantage of doing it this way? – cfr Nov 26 '14 at 0:23