答案1
这里有一个解决方案,它设置了一个名为的宏\placebelow
,然后使用array
来自\mathclap
包的环境mathtools
。
如果您希望使用较小的字体排版注释(“Z 中的附加内容”等),只需在下面的代码中更改#2
为。\footnotesize #2
\documentclass{article}
\usepackage{mathtools} % for \mathclap macro
\usepackage{newtxtext,newtxmath}
\newcommand\placebelow[2]{\mathbin{%
\begin{array}[t]{@{}c@{}}
#1 \\ \uparrow \\ \mathclap{\textbf{\textsf{#2}}}
\end{array}}}
\begin{document}
\[
f(x\placebelow{+}{Addition in Z}y)=[x+y]=[x]+[y]
=f(x)\placebelow{+}{Addition in Z\textsubscript{6}}f(y)
\]
\end{document}
答案2
仅使用 TeX 原语的解决方案:
\def\type#1#2{\mathbin{\mathop{#1\kern0pt}%
\limits_{\raise2.5ex\hbox to0pt{\hss\strut$\uparrow$\hss}\hbox to0pt{\hss#2\hss}}}}
$$
f(x \type+{Addition in $Z$} y) = [x+y] = [x] + [y] = f(x) \type+{Addition in $Z_6$} f(y)
$$
答案3
\underset
这是一种使用(from amsmath
) 和\bclap
(from )的方法stackengine
:
\documentclass{article}
\usepackage{amsmath}
\usepackage[usestackEOL]{stackengine}
\begin{document}
%
\[ f(x \underset{\uparrow\bclap{\small\sffamily\bfseries Addition in Z}}{+} y) = [x + y] = [x] + [y] ) = f(x) \underset{\uparrow\bclap{\small\sffamily\bfseries Addition in Z\textsubscript{6}}}{+}f( y) \]%
\end{document}
答案4
常规解决方案是tikzmarknode
\documentclass{article}
\usepackage{mathtools} % for \mathclap macro
\usepackage{newtxtext,newtxmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[
f(x\tikzmarknode{a}{+}y)=[x+y]=[x]+[y]
=f(x){+}f(y)
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[%
<-,
very thin,
>=stealth,
red!50
]%
(a.south)--++(0pt,-3em) node [below](X) {X};
\end{tikzpicture}
\end{document}