方程式の一部を点線の四角形で囲むにはどうすればよいでしょうか?

方程式の一部を点線の四角形で囲むにはどうすればよいでしょうか?

次の画像を作成する必要があります。

方程式

ams パッケージ内にシンボルは見つかりました\boxdotが、点線のボックスは見つかりません。

答え1

ダッシュボックスパッケージ必要に応じて調整できます:

\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}

ここに画像の説明を入力してください

答え2

tikz を使用すると、次のボックスを描画できます。

\documentclass{article}
\usepackage{tikz}
\newcommand{\smallbox}{\begin{tikzpicture}
\draw[thick,dotted] (0,0) rectangle
(0.3, 0.3);
\end{tikzpicture}
}
\newcommand{\medbox}{\begin{tikzpicture}
\draw[thick,dotted] (0,0) rectangle
(0.5, 0.5);
\end{tikzpicture}
}
\begin{document}

\[\int_{\smallbox}^{\smallbox} {\medbox} \]
\end{document}

おそらく、寸法や間隔を少し調整する必要があるでしょう。

ここに画像の説明を入力してください

関連情報