[texhax] minipage conditional

Vafa Khalighi vafa018 at gmail.com
Tue Jun 21 09:49:42 CEST 2011

The minipage environment accepts b, t, and few others as the position of the
minipage. I want \test macro return "true" if it is used inside minipage
with b position and otherwise return "false". I do not know if there is a
better way but this is what I did:

\newif\if at test
  \@begin at tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
    \if#1b\@testtrue\vbox%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% this is where
I made \if at test true
    \else\if #1t\vtop
    \else\@pboxswtrue $\vcenter
       \csname bm@#3\endcsname}%
    \if at pboxsw \m at th$\fi
  \@end at tempboxa}
\def\test{\if at test true\else false\fi}

But it returns "false". Why is this? how can I fix it? Is it a better way
for doing what I want to do?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110621/0d0e1771/attachment.html>

More information about the texhax mailing list