答案1
以下是一个建议:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\ljoinrel}[1]{\mathrel{\mspace{-#1mu}}}
\newcommand{\negljoinrel}[1]{\mathrel{\mspace{#1mu}}}
\newcommand{\One}{%
\relbar\ljoinrel{4}\relbar\ljoinrel{4}\relbar
\ljoinrel{14}\mapstochar\negljoinrel{14}%
}
\newcommand{\Many}{%
\relbar\ljoinrel{4}\relbar\ljoinrel{4}\relbar
\ljoinrel{14}<%
}
\newcommand{\Oone}{%
\relbar\ljoinrel{7}\relbar\ljoinrel{7}\relbar\ljoinrel{6}\relbar
\ljoinrel{14}\mapstochar\negljoinrel{6}\mapstochar\negljoinrel{6}%
}
\newcommand{\Onemany}{%
\relbar\ljoinrel{4}\relbar\ljoinrel{4}\relbar
\ljoinrel{14}\mapstochar<%
}
\newcommand{\Zeroone}{%
\relbar\ljoinrel{11}\relbar\joinrel
\mathrel{\circ}\joinrel
\relbar\ljoinrel{8}\mapstochar\negljoinrel{8}%
}
\newcommand{\Zeromany}{%
\relbar\ljoinrel{11}\relbar\joinrel
\mathrel{\circ}\joinrel
\relbar\ljoinrel{14}<%
}
\begin{document}
\sbox0{$\One$}\showthe\wd0
\sbox0{$\Many$}\showthe\wd0
\sbox0{$\Oone$}\showthe\wd0
\sbox0{$\Onemany$}\showthe\wd0
\sbox0{$\Zeroone$}\showthe\wd0
\sbox0{$\Zeromany$}\showthe\wd0
$A \One B$
$A \Many B$
$A \Oone B$
$A \Onemany B$
$A \Zeroone B$
$A \Zeromany B$
\end{document}