Text FormattingDefine Another Command Like Aboxed but with a Different Colorbox

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Kareem
Posts: 9
Joined: Sat Aug 04, 2012 2:28 pm

Define Another Command Like Aboxed but with a Different Colorbox

Post by Kareem »

The following commands define Aboxed but with a yellow coloured box.

Code: Select all

\def\@Aboxed#1&#2&#3\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 
        \fcolorbox{black}{yellow}{$\displaystyle #1#2$}% changed
}
Now, how can I define another command, say AboxedG, with a green coloured box?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Define Another Command Like Aboxed but with a Different Colorbox

Post by Bartman »

Please link your crossposts.
Post Reply