数式内のパラメータを丸で囲む

数式内のパラメータを丸で囲む

以下のように、数式またはテキスト内のパラメータの周囲に円を挿入するにはどうすればよいでしょうか。 ここに画像の説明を入力してください

答え1

コメントにリンクされている回答はすべて、ライブラリtikzmarknodeに追加される前に書かれたものですtikzmark。この追加により、このようなものを入手するのは私見では特に簡単になりました。

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[\mathrm{i}\int\!\mathrm{d}t\,\mathrm{d}\theta\,\mathrm{d}\bar\theta\,
\tikzmarknode[circle,draw,dashed,inner sep=2pt]{tc}{\dfrac{\theta\bar\theta}{\hbar}}
\left(L[\Phi]+\mathbb{J}\right)\]
\end{document}

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

もちろん、 を使用するとさらに多くのことが可能になりますtikzmarknode

\documentclass[fleqn]{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\tikzset{dashed circle/.style={circle,draw,dashed,inner sep=2pt}}
\begin{document}
The conventional \dots
\begin{equation}\label{eq:conventional}
 \mathcal{Z}[\mathbb{J}]=\exp\left[\mathrm{i}\int\!\mathrm{d}t\,\mathrm{d}\theta\,\mathrm{d}\bar\theta\,
 \tikzmarknode[dashed circle]{11}{1}
 \left(L[\Phi]+\mathbb{J}\right)\right]\;.
\end{equation}
The modified \dots
\begin{equation}
 \mathcal{Z}'[\mathbb{J}]=\exp\left[\mathrm{i}\int\!\mathrm{d}t\,\mathrm{d}\theta\,\mathrm{d}\bar\theta\,
 \tikzmarknode[dashed circle]{tc1}{\dfrac{\theta\bar\theta}{\hbar}}
 \left(L[\Phi]+\mathbb{J}\right)\right]\;.\label{eq:Z'}
\end{equation}
\eqref{eq:conventional} except that $\tikzmarknode[dashed circle]{12}{1}$ got replaced by 
$\tikzmarknode[dashed circle]{tc2}{\dfrac{\theta\bar\theta}{\hbar}}$ in \eqref{eq:Z'}.
\begin{tikzpicture}[overlay,remember picture]
\draw[red,latex-latex,thick] (tc1) to[bend left=10] (tc2);
\end{tikzpicture}
\end{document}

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

関連情報