[texhax] Behavior of \vtop,\vbox, and \vcenter
Michael Barr
barr at math.mcgill.ca
Fri Dec 21 18:08:44 CET 2007
The following works even better.
$$ \vtop{\kern-\baselineskip\hrule height 100pt width 1pt}\eqno(*) $$
Oddly enough,
$$ \vtop{\baselineskip0pt \kern0pt\hrule height 100pt width 1pt}\eqno(*) $$
makes no difference.
But the first does exactly what I want.
--MB
On Fri, 21 Dec 2007, Geoff Russell wrote:
> $$ \vtop{\kern0pt\hrule height 100pt width 1pt}\eqno(*) $$ % added \kern0pt
>
> will give you what you want by inserting a zero height line in top
> of the box.
>
> Geoff.
>
> On 12/20/07, Geoff Russell <geoffrey.russell at gmail.com> wrote:
>> On Dec 20, 2007 11:05 AM, Michael Barr <barr at math.mcgill.ca> wrote:
>>> The funny behavior is clear from the example below:
>>>
>>> $$ \vbox{\hrule height 100pt width 1pt}\eqno(*) $$
>>> $$ \vtop{\hrule height 100pt width 1pt}\eqno(*) $$
>>
>> \vtop aligns the baseline of the first line in a box with the next
>> baseline. So its doing
>> what it is supposed to do.
>>
>> Cheers,
>> Geoff Russell
>>
>>
>>
>>> $$ \vcenter{\hrule height 100pt width 1pt}\eqno(*) $$
>>> \bye
>>>
>>> a plain tex file. The first one aligns the eqno with the bottom of the
>>> rule, as expected and the third one aligns it along the center, also as
>>> expected. But the second one also aligns it with the bottom, not the top
>>> of the rule, not as I expect at any rate. The problem I have is not, of
>>> course, with rules, but with xy-pic diagrams, but it is evidently not an
>>> xy-pic problem. But any solution that involves giving the rules depth
>>> instead of height is not relevant.
>>>
>>> Michael Barr
>>> _______________________________________________
>>> TeX FAQ: http://www.tex.ac.uk/faq
>>> Mailing list archives: http://tug.org/pipermail/texhax/
>>> More links: http://tug.org/begin.html
>>>
>>> Automated subscription management: http://tug.org/mailman/listinfo/texhax
>>> Human mailing list managers: postmaster at tug.org
>>>
>>
>>
>>
>> --
>> 6 Fifth Ave,
>> St Morris, S.A. 5068
>> Australia
>> Ph: 041 8805 184 / 08 8332 5069
>>
>
>
>
More information about the texhax
mailing list