答案1
使用 Ti 来实现这一点相当容易钾Z。
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\newcommand{\tboxed}[2][inner sep=1pt]{\ifmmode
\tikz[baseline=(X.base),outer
sep=0pt]{\node[draw,#1](X){\ensuremath{#2}};}
\else
\tikz[baseline=(X.base),outer
sep=0pt]{\node[draw,#1](X){#2};}
\fi
}
\newcommand{\circled}[2][inner sep=1pt]{\ifmmode
\tikz[baseline=(X.base),outer sep=0pt]{\node[circle,draw,#1](X){\ensuremath{#2}};}
\else
\tikz[baseline=(X.base),outer sep=0pt]{\node[circle,draw,#1](X){#2};}
\fi
}
\newcommand{\rhombed}[2][inner sep=1pt]{\ifmmode
\tikz[baseline=(X.base),outer sep=0pt]{\node[diamond,draw,#1](X){\ensuremath{#2}};}
\else
\tikz[baseline=(X.base),outer sep=0pt]{\node[diamond,draw,#1](X){#2};}
\fi
}
\newcommand{\trapezed}[2][inner sep=1pt]{\ifmmode
\tikz[baseline=(X.base),outer sep=0pt]{\node[trapezium,draw,
trapezium left angle=60,trapezium right angle=120,#1](X){\ensuremath{#2}};}
\else
\tikz[baseline=(X.base),outer sep=0pt]{\node[trapezium,draw,
trapezium left angle=60,trapezium right angle=120,#1](X){#2};}
\fi
}
\begin{document}
\boxed{x} \circled{y} \rhombed{z} \trapezed{u}
\[ \circled{z}~=~
\frac{\tboxed[rounded corners]{x}\trapezed[rounded corners,inner sep=2pt]{y}}{\circled{u}}\]
\end{document}
编辑:增加mathmode
治疗,修正菱形。