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'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?

share|improve this question
2  
It would be nice to have an example of the code you've got up to now. –  egreg Jan 28 '12 at 16:12
    
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 Answers 2

up vote 1 down vote accepted

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}.

share|improve this answer

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.

share|improve this answer
    
Welcome to TeX.SX! –  Papiro Jun 12 '13 at 18:55

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.