5

I'm using bussproofs and would like my premises always to be left-aligned with the beginning of the inference line. So far when I have a single premise inference, I can only get the premise centered on the inference line, as in:

\documentclass{article}
\usepackage{bussproofs}
\begin{document}
\begin{prooftree} \AxiomC{$\neg A$} \UnaryInfC{$\neg A \lor \neg B$} \end{prooftree}
\end{document}

Is it possible to get the premise be left aligned with the line?

  • What I meant is that normally I get something like this: \begin{prooftree} \AxiomC{$\neg A$} \UnaryInfC{$\neg A \lor \neg B$} \end{prooftree} Now, what I would like to achieve is that when I have a single premise argument, that my premise stand at the left-most side of the inference line, and not in the center as it is now. – bozidarka Feb 13 '12 at 4:17
  • 1
    Sorry, but we need a minimal example that includes also the call to the necessary packages. You can edit your question, in order to add it. – egreg Feb 13 '12 at 8:32
2

Here are two options:

  1. Set the smaller box (your premise \AxiomC) in a box of the same width as the larger box (your conclusion \UnaryInfC), only left-aligned. This can be achieved using \makebox[<width>][l]{...}; or

  2. Use \phantom{<stuff>} to remove <stuff> from the display but still have the appropriate space allocated for it.

enter image description here

\documentclass{article}
\usepackage{bussproofs}% http://ctan.org/pkg/bussproofs
\newlength{\mylen}
\begin{document}
\begin{prooftree}
  \settowidth{\mylen}{$\neg A \lor \neg B$}%
  \AxiomC{\makebox[\mylen][l]{$\neg A$}}
  \UnaryInfC{$\neg A \lor \neg B$}
\end{prooftree}

\begin{prooftree}
  \AxiomC{$\neg A \phantom{\:{\lor}\:\neg B}$}
  \UnaryInfC{$\neg A \lor \neg B$}
\end{prooftree}
\end{document}

In the first example, the width of the conclusion is stored in \mylen (a new length) via \settowidth. \mylen is then used to provide the box width for the premise.

In the second example, a minor correction for the spacing around the binary operator \lor is performed by adding \: around the now atomized {\lor}.

4

This is doable by default in bussproof (rtfm: section 3) using sequent-aligned style, the commands are the same wihout the final "C", they do not take brackets around their argument and the \fCenter command marks the point of alignment.

\documentclass{article}
\usepackage{bussproofs}
\begin{document}
\begin{prooftree}
   \Axiom$\fCenter\neg A$
   \UnaryInf$\fCenter\neg A \lor \neg B$
\end{prooftree}
\end{document}

Will do what you want.

0

You can also use \kernHyps{kern} before the inference command to nudge the hypothesis of that inference by the distance of kern. e.g. .1in or -.1in.

\documentclass{article}
\usepackage{bussproofs}
\begin{document}
\begin{prooftree} \AxiomC{$\kernHyps{-.18in}\neg A$} \UnaryInfC{$\neg A \lor \neg B$} \end{prooftree}
\end{document}

This will give you

enter image description here

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.