答案1
您可以利用\ooalign
:
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\nand}{\mathbin{\mathpalette\n@and@or\land}}
\DeclareRobustCommand{\nor}{\mathbin{\mathpalette\n@and@or\lor}}
\newcommand{\n@and@or}[2]{%
\vphantom{#2}%
\ooalign{$\m@th#1#2$\cr\hidewidth$\m@th#1\sim$\hidewidth\cr}%
}
\makeatother
\begin{document}
$a \land b$ $a \lor b_{a\lor b\land c}$
$a \nand b$ $a \nor b_{a\nor b\nand c}$
\end{document}