Boxes and text\fbox

\fboxCommand

Used to draw a rectangular border (box) around mathematical or text content.

\fbox{a}
Available in
base
Kind
prefix
Allowed mode
both
Frequency
<0.01% of corpus formulasrank 184 of 263
Commonality
high
Tags
presentation
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\fboxm:T{a}text content

Argspec m:T — one mandatory argument. Reading argspecs

Examples#

\fbox{x $y$}
\raisebox{1ex}{\fbox{$x^2$}}

In TeXForm#

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

Equivalent forms#

  • \boxed{...}approximate

    \boxed provides a similar framed box specifically intended for math-mode contents, but typically ensures contents remain in display/text style as appropriate, and is part of amsmath rather than standard LaTeX.

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\fbox{a}Positive · baselinePassPassPass
\fbox aPositive · bare[0]PassPassPass
\fbox{a^2}Negative · neg:T[0]PassFailFail
All 21 in Boxes and text