自動的にスケールされる変数の上にあるカスタム シンボルですか?

自動的にスケールされる変数の上にあるカスタム シンボルですか?

変数の上にカスタム シンボルを配置したいのですが、問題は、変数のサイズを変更してもシンボルのサイズが常に同じままであることです。分数などを含むより複雑な数式では、見た目がひどくなります。

ここに例を示します。垂直方向のスペースを減らすために、次のコードを使用しました。\stackrel の垂直間隔を縮小 (または拡大) するにはどうすればよいですか?

\documentclass{minimal}
\usepackage{amsmath}
\usepackage{tikz}

\newcommand{\defeq}{%
  \mathrel{\vbox{\offinterlineskip\ialign{%
    \hfil##\hfil\cr
    $\text{\tikz{\draw[-, line width=0.2ex] (1.6ex,0.5ex) -- (1.6ex,-0.5ex); \begin{scope}[xshift=0ex] \draw[-, line width=0.2ex] (0,0) -- (1.4ex,0); \fill[black] (1.5ex,0) -- (1ex,0.5ex) -- (1ex,-0.5ex) -- cycle; \end{scope} }}$\cr
\noalign{\kern-0.4ex}
}}}}

\begin{document}
\begin{equation}
  B_{\overset{\defeq}{AB}} \overset{\defeq}{AB}
\end{equation}
\end{document}

答え1

ボックス化により下付き文字でのサイズの変更が停止され、異なるサイズを選択するために使用できますが、ここでは vbox を削除するだけで、行が 1 つしかないため何も整列されていないと\mathchoice思います。\ialign

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

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}

\newcommand{\defeq}{%
  \mathrel{\text{\tikz{\draw[-, line width=0.2ex] (1.6ex,0.5ex) -- (1.6ex,-0.5ex); \begin{scope}[xshift=0ex] \draw[-, line width=0.2ex] (0,0) -- (1.4ex,0); \fill[black] (1.5ex,0) -- (1ex,0.5ex) -- (1ex,-0.5ex) -- cycle; \end{scope}}}}}

\begin{document}
\begin{equation}
  B_{\overset{\defeq}{AB}} \overset{\defeq}{AB}
\end{equation}
\end{document}

あるいはもっと近い例:

\newcommand{\defeq}{%
  \mathrel{\text{%
\raisebox{-.4ex}[0pt][0pt]{\tikz{\draw[-, line width=0.2ex] (1.6ex,0.5ex) -- (1.6ex,-0.5ex); \begin{scope}[xshift=0ex] \draw[-, line width=0.2ex] (0,0) -- (1.4ex,0); \fill[black] (1.5ex,0) -- (1ex,0.5ex) -- (1ex,-0.5ex) -- cycle; \end{scope}}}}}}

関連情報