/framebox and /fbox

<..latex ltboxes..>+
 \long\def\:temp#1{\a:fbox\gobble:fbox\o:fbox:{\hbox{{#1}}}\b:fbox}
 \HLet\fbox=\:temp
 \let\gobble:fbox=\empty
 \def\:tempc#1{}
 \HLet\gobble:fbox=\:tempc
 -_-_-

<..config latex.ltx utilities..>+
 \NewConfigure{fbox}{2}
 -_-_-

<..latex ltboxes..>+
 \long\def\:temp[#1][#2]#3{%
    \em:dim\frameboxWidth{#1}\def\frameboxAlign{#2}%
    \a:framebox \gobble:frame\o:@iframebox:[#1][#2]{#3}\b:framebox}
 \HLet\@iframebox=\:temp
 \NewConfigure{framebox}{2}
 \let\gobble:frame=\empty
 \def\:tempc#1[#2][#3]{\hbox}
 \HLet\gobble:frame=\:tempc
 -_-_-

We need the ‘[]’ above, because the picture contains an mbox that may include pictorial symbols that will cause nested images in ALT of xref.

<..latex ltboxes..>+
 \def\em:dim#1#2{%
   \tmp:dim=#2\tmp:cnt=0 \em:int \edef#1{\the\tmp:cnt}%
   \tmp:dim=10\tmp:dim \tmp:cnt=0 \em:int \edef#1{#1.\the\tmp:cnt}%
   \tmp:dim=10\tmp:dim \tmp:cnt=0 \em:int \edef#1{#1\the\tmp:cnt}%
   \edef#1{#1em}%
 }
 \def\em:int{\relax
   \ifdim \tmp:dim>1em
      \advance\tmp:cnt by 1  \advance\tmp:dim by -1em
      \expandafter\em:int
   \fi
 }
 -_-_-