Probably I'm missing something, but I'm really struggling to find an answer to this simple question:
How to center text within a \parbox?
Side note: I don't want to switch to any other environment like minipage. In particular, I use \pbox, an auto-sizing version of \parbox. There don't seem to be an analogue for minipage.
Ok, so \centering as presented in one of the posts is working for the given simple example. I'm however somehow unable to adapt it to my concrete case that is:
\usepackage{pbox}
\usepackage{bussproofs}
...
\pbox{1\textwidth}{
\AxiomC{$ Rule premise $}
\UnaryInfC{$ Rule conclusion $}
\DisplayProof (Rule name) \\
Some text here in new line
}
It seems \pbox indeed works differently with respect to \centering than \parbox. In particular this works:
\usepackage{bussproofs}
...
\parbox{1\textwidth}{\centering
\AxiomC{$ Rule premise $}
\UnaryInfC{$ Rule conclusion $}
\DisplayProof (Rule name) \\
Some text here in new line
}
I'll probably have to use the original \parbox after all or perhaps switch to a varwidth.
I thank you all for your help. I think I'll be able to solve my issue somehow using a combination of the ideas that you presented.
\pboxnorvarwidthbut a plaintabular. Without knowing more details about your macros it's difficult to say more. Please write down a complete minimal example of usage. – egreg May 14 '12 at 22:53\pbox. If required you can add----to get a visible separator. – Martin Scharrer May 15 '12 at 07:44