Re: mathtools: \Aboxed
- From: GL <gouailles@xxxxxxxxx>
- Date: Sat, 11 Jun 2011 21:24:12 +0200
Le 11/06/2011 21:10, GL a écrit :
Le 11/06/2011 20:11, GL a écrit :
However considering that 2 consecutive cells are built there is no
need for any global assignment : everything can be done locally,
and with a greater simplicity :
\newcommand\Aboxed[1]{\let\bgroup{\romannumeral-`}\@Aboxed#1\ENDDNE}
\def\@Aboxed#1\ENDDNE{\ifnum0=`{}\fi
\settowidth\@tempdima{$\displaystyle#1{}\m@th$}%
\advance\@tempdima \fboxsep \advance\@tempdima \fboxrule
\edef\mathtools@temp {% % < or \@tempa *local*>
\kern \@tempdima &\kern -\the\@tempdima
\fboxsep \the\fboxsep
\fboxrule \the\fboxrule
}\mathtools@temp \boxed {#1#2}%
}
Isn't it cleaner after all ?
And the more concise code is often the cleaner :
\newcommand\Aboxed[1]{\let\bgroup{\romannumeral-`}\@Aboxed#1\ENDDNE}
\def\@Aboxed#1\ENDDNE{\ifnum0=`{}\fi \setbox \z@
\hbox{$\displaystyle#1{}\m@th$\kern\fboxsep \kern\fboxrule }%
\edef\@tempa {\kern \wd\z@ &\kern -\the\wd\z@ \fboxsep
\the\fboxsep \fboxrule \the\fboxrule }\@tempa \boxed {#1#2}%
}
6 magic lines !
Regards.
.
- References:
- mathtools: \Aboxed
- From: GL
- Re: mathtools: \Aboxed
- From: GL
- mathtools: \Aboxed
- Prev by Date: Re: mathtools: \Aboxed
- Next by Date: Re: mathtools: \Aboxed
- Previous by thread: Re: mathtools: \Aboxed
- Next by thread: mathtools: \Aboxed again
- Index(es):
Relevant Pages
|