[Tex/LaTex] How to draw a dotted rectangle around part of equation

boxesequationsframed

I need to produce a following image:

equation

I found a \boxdot symbol in ams package but can not find any dotted box.

Best Answer

The dashbox package can be tweaked to do what you want:

\documentclass{article}

\usepackage{dashbox}
\newcommand\emptydottedbox{%
    \setlength{\dashlength}{1pt}%     % length of dash + gap
    \setlength{\dashdash}{0.5pt}%     % length of dash
    \setlength{\fboxrule}{0.5pt}%     % width of line
    \setlength{\fboxsep}{0pt}%        % separation between box and inner content
    \dbox{\ensuremath{\phantom{x}}}%
    }

\begin{document}

\[
\int_{\emptydottedbox}^{\emptydottedbox} \emptydottedbox
\]

\end{document}

enter image description here