答案1
选择要替换的名称\jung
。
\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}
\makeatletter
\DeclareRobustCommand{\jung}{% find a better name
\mathbin{\vphantom{+}\mathpalette\jung@\relax}%
}
\newcommand{\jung@}[2]{%
\vcenter{%
\sbox\z@{$\m@th#1{+}$}%
\hb@xt@\wd\z@{\hss
\setlength{\unitlength}{0.8\wd\z@}%
\begin{picture}(1,1)
\linethickness{\jung@thickness{#1}}
\roundcap
\Line(0,0.25)(0.75,1)
\Line(0.25,0)(1,0.75)
\Line(0,0.75)(0.75,0)
\Line(0.25,1)(1,0.25)
\end{picture}\hss
}%
}%
}
\newcommand{\jung@thickness}[1]{%
\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 3
}
\makeatother
\begin{document}
$A+B$
$A\jung B$
$\scriptstyle A\jung B$ $\scriptscriptstyle A\jung B$
{\ooalign{$+$\cr$\jung$\cr}}
{\ooalign{$\scriptstyle+$\cr$\scriptstyle\jung$\cr}}
{\ooalign{$\scriptscriptstyle+$\cr$\scriptscriptstyle\jung$\cr}}
\end{document}
在最后一行,我将新符号与加号叠加在一起,以便直观地进行比较。如您所见,它占据相同的空间,并且线宽也相同。
答案2
这是tikz
使用scalerel
来匹配尺寸的解决方案+
。适用于所有尺寸。要使线条变细,请增加scale=.1
(例如.12
)。要使线条变粗,请减少scale=.1
(例如.08
)
\documentclass{article}
\usepackage{tikz,scalerel}
\newcommand{\ttt}{\mathbin{\scalerel*{\tikz[rotate=45, line cap=round, scale=.1]
{\draw(0,1)--(3,1)(0,2)--(3,2)(1,0)--(1,3)(2,0)--(2,3);}}{+}}}
\begin{document}
$\mathbf{A\ttt B_{A\ttt B_{A\ttt B}}}$
\end{document}