On Tue, Jul 3, 2012 at 6:08 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

Am 03.07.2012 um 18:04 schrieb luigi scarso:



On Tue, Jul 3, 2012 at 5:27 PM, Alan BRASLAU <alan.braslau@cea.fr> wrote:
> On Tue, 3 Jul 2012 15:48:43 +0200
> Hans Hagen <pragma@wxs.nl> wrote:
>
>> It's a rather (old) low level boxing macro ...
>>
>> \start
>>      \showboxes
>>      \centerbox width 10cm height 3cm {Alan is surprised}
>> \stop
>
> My TeX culture remains, alas, always limited (even if I have the
> TeXbook on my office bookshelf, indeed \centerbox does not appear in
> plain TeX). Nothing in the ConTeXt manual, either. Of course, a
> leisurely browsing of the source code would reveal many such treasures!
There is also \vcenter

\starttext
xxxxxxxxxxg\ruledvbox{\hsize=5cm\vcenter to 3cm{Alan is surprised}}gxxxxxxxxx \type{\vcenter}\par
xxxxxxxxxxg\ruledvbox{\centerbox width5cm height3cm{Alan is surprised}}gxxxxxxxxx \type{\centerbox}\par
xxxxxxxxxxg\ruledvbox{\vcenter{\centerbox width5cm height3cm{Alan is surprised}}}gxxxxxxxxx\type{\centerbox+\vcenter}\par
\stoptext

(\vcenter is a TeX primitive)

ConTeXt redefines \vcenter because the primitive can only be used in math mode.
yes I know ... and  original TeX primitive is still available as \normalvcenter
(kind of easter egg for Alan..)

--
luigi