Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using bussproofs package to provide some type proofs. According to bussproofs manual, it is impossible to use prooftree inside math mode. However, I would like to insert prooftree in the cases environment. If there are any tricks I can do to overcome this?

The minimal working example:

\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{bussproofs}
\begin{document}
    \[\epsilon=
    \begin{cases}
        \AxiomC{$\alpha$}
        \UnaryInfC{$\beta$}
        \DisplayProof
        %\begin{prooftree}
            %\AxiomC{$\alpha$}
            %\AxiomC{$\beta$}
            %\BinaryInfC{$\gamma$}
        %\end{prooftree}
    \end{cases}\]
\end{document}

I want the commented section to compile as well.

share|improve this question
    
Welcome to TeX.sx! –  Peter Jansson Mar 11 '13 at 20:20
add comment

1 Answer

up vote 1 down vote accepted

While using bussproofs may simplify logical proofs as a standalone environment, you have to treat it with care when things become more complex. In general, if you're able to box and store the content, you can always use the box inside your more complex structure.

However, an alternative is to avoid the bussproofs package altogether, and stick to traditional array constructions to match your logic expressions:

enter image description here

\documentclass{article}
\usepackage{amssymb,amsmath}% http://ctan.org/pkg/{amssymb,amsmath}
\usepackage{bussproofs,varwidth}% http://ctan.org/pkg/{bussproofs,varwidth}
\newsavebox{\mypt}
\begin{document}
\begin{lrbox}{\mypt}% Store prooftree in \mypt
\begin{varwidth}{\linewidth}
\begin{prooftree}
  \AxiomC{$\alpha$}
  \AxiomC{$\beta$}
  \BinaryInfC{$\gamma$}
\end{prooftree}
\end{varwidth}
\end{lrbox}

\[
  \epsilon =
    \begin{cases}
      \AxiomC{$\alpha$}
      \UnaryInfC{$\beta$}
      \DisplayProof & \text{ if $x$} \\
      \usebox{\mypt} & \text{ if $y$}
    \end{cases}
\]

\hrulefill

\[
  \epsilon = \left\{\begin{array}{@{}l@{}l@{}}
    \dfrac{~\alpha~}{\beta} & \text{ if $x$} \\
    \dfrac{~\alpha \qquad \beta~}{\gamma} & \text{ if $y$}
  \end{array}\right.
\]
\end{document}

At this point it's a case of playing around with the spacing, although the output is very similar in structure to that of bussproofs.

share|improve this answer
    
Thanks! This is quite helpful. –  Pavel Zaichenkov Mar 12 '13 at 11:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.