\otimes 上象限和下象限被“移除”

\otimes 上象限和下象限被“移除”

寻找一种方法来绘制以下稍微整洁的版本,作为类似于$ \otimes$的数学运算符:

在此处输入图片描述

\documentclass{article}

\begin{document}
\center Like this only with upper and lower quadrants removed: \\
\center \Huge$\otimes$
\end{document}

在此处输入图片描述

作为记录:

在此处输入图片描述

答案1

我也和@egreg一样,倾向于手工绘制所需符号的解决方案。借助该halloweenmath包提供的子程序(该程序完全涉及使用pict2e工具绘制数学符号),我们可以提供一个完整的答案,其特点是:

  • 一个名为的二元运算符\curvetie

  • 一个相应的“大”运算符,名为\bigcurvetie

  • 支持bold数学版本。

halloweenmath该答案还可以作为如何通过添加自定义符号来扩充包的示例。

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

% The "halloweenmath" package supplies some useful suroutines and also loads 
% the "amsmath" package:
\usepackage{halloweenmath}

\makeatletter

\newcommand*\@Roly@large@curvetie[1]{%
  \begin{@HwM@bigop@picture}\displaystyle \textfont {6}{-3}%
    \linethickness{#1\@HwM@thickness@units@for \textfont}%
    \moveto(0,0)
    \circlearc{0}{0}{3}{135}{225}%
    \circlearc{0}{0}{3}{45}{-45}
    \closepath
    \strokepath
  \end{@HwM@bigop@picture}%
}
\newcommand*\@Roly@Large@Curvetie{%
  \@HwM@choose@thicknesses \@Roly@large@curvetie
        {{}}%
        {{1.8}}%
}
\newcommand*\@Roly@small@curvetie[3]{%
  \begin{@HwM@bigop@picture}#1#2{4}{-2}%
    \linethickness{#3\@HwM@thickness@units@for #2}%
    \moveto(0,0)
    \circlearc{0}{0}{2}{135}{225}%
    \circlearc{0}{0}{2}{45}{-45}
    \closepath
    \strokepath
  \end{@HwM@bigop@picture}%
}
\newcommand*\@Roly@Small@Curvetie[2]{%
  \@HwM@choose@thicknesses{\@Roly@small@curvetie #1#2}%
        {{}}%
        {{1.6}}%
}
\newcommand*\@Roly@binop@curvetie[3]{%
  \begin{@HwM@oplus@picture}#1#2{2.8284271}{-1.4142135}%
    \linethickness{#3\@HwM@thickness@units@for #2}%
    \moveto(0,0)
    \circlearc{0}{0}{1.4142135}{135}{225}%
    \circlearc{0}{0}{1.4142135}{45}{-45}
    \closepath
    \strokepath
  \end{@HwM@oplus@picture}%
}
\newcommand*\@Roly@Binop@Curvetie[2]{%
  \@HwM@choose@thicknesses{\@Roly@binop@curvetie #1#2}%
        {{}}%
        {{1.5}}%
}
\newcommand*\curvetie{%
  \DOTSB
  \@HwM@general@binary@operation \@Roly@Binop@Curvetie
}
\newcommand*\bigcurvetie{%
  \DOTSB
  \@HwM@general@large@operator \@Roly@Large@Curvetie \@Roly@Small@Curvetie
}

\makeatother



\begin{document}

In-line:
\( \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \).
And in display:
\[ \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \]

Now repeat in boldface type.

\begingroup

\bfseries\boldmath

In-line:
\( \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \).
And in display:
\[ \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \]

\endgroup

\end{document}

输出如下:

代码输出


编辑:我想添加相同代码的不同版本,唯一的区别是笔画的粗细已被调整,以更紧密地模仿\[ big]otimes符号的粗细。

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

% The "halloweenmath" package supplies some useful suroutines and also loads 
% the "amsmath" package:
\usepackage{halloweenmath}

\makeatletter

\newcommand*\@Roly@large@curvetie[1]{%
  \begin{@HwM@bigop@picture}\displaystyle \textfont {6}{-3}%
    \linethickness{#1\@HwM@thickness@units@for \textfont}%
    \moveto(0,0)
    \circlearc{0}{0}{3}{135}{225}%
    \circlearc{0}{0}{3}{45}{-45}
    \closepath
    \strokepath
  \end{@HwM@bigop@picture}%
}
\newcommand*\@Roly@Large@Curvetie{%
  \@HwM@choose@thicknesses \@Roly@large@curvetie
        {{2.2}}% governs thickness for "normal" math version
        {{3}}%   governs thickness for "bold" math version
}
\newcommand*\@Roly@small@curvetie[3]{%
  \begin{@HwM@bigop@picture}#1#2{4}{-2}%
    \linethickness{#3\@HwM@thickness@units@for #2}%
    \moveto(0,0)
    \circlearc{0}{0}{2}{135}{225}%
    \circlearc{0}{0}{2}{45}{-45}
    \closepath
    \strokepath
  \end{@HwM@bigop@picture}%
}
\newcommand*\@Roly@Small@Curvetie[2]{%
  \@HwM@choose@thicknesses{\@Roly@small@curvetie #1#2}%
        {{1,8}}% normal
        {{2.2}}% bold
}
\newcommand*\@Roly@binop@curvetie[3]{%
  \begin{@HwM@oplus@picture}#1#2{2.8284271}{-1.4142135}%
    \linethickness{#3\@HwM@thickness@units@for #2}%
    \moveto(0,0)
    \circlearc{0}{0}{1.4142135}{135}{225}%
    \circlearc{0}{0}{1.4142135}{45}{-45}
    \closepath
    \strokepath
  \end{@HwM@oplus@picture}%
}
\newcommand*\@Roly@Binop@Curvetie[2]{%
  \@HwM@choose@thicknesses{\@Roly@binop@curvetie #1#2}%
        {{.8}}%  normal
        {{1.3}}% bold
}
\newcommand*\curvetie{%
  \DOTSB
  \@HwM@general@binary@operation \@Roly@Binop@Curvetie
}
\newcommand*\bigcurvetie{%
  \DOTSB
  \@HwM@general@large@operator \@Roly@Large@Curvetie \@Roly@Small@Curvetie
}

\makeatother



\begin{document}

In-line:
\( \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \).
And in display:
\[ \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \]

Now repeat in boldface type.

\begingroup

\bfseries\boldmath

In-line:
\( \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \).
And in display:
\[ \bigcurvetie_{i=1}^{n} X_{i} = X_{1}\curvetie\dots\curvetie X_{n} \]

\endgroup

Let us compare the thickness of the strokes:
\( {\bigotimes}{\bigcurvetie} \),
and \( {\otimes}{\curvetie} \).
{\bfseries\boldmath And in bold:
\( {\bigotimes}{\bigcurvetie}\ {\otimes}{\curvetie} \).}
Displayed:
\[ {\bigotimes}{\bigcurvetie} \]

\end{document}

相应的输出如下:

输出较粗的笔画

答案2

;可能pict2e不完美,不适合大尺寸。

\documentclass{article}
\usepackage{pict2e}

\makeatletter
\DeclareRobustCommand{\arcbowtie}{\mathbin{\mathpalette\arc@bow@tie\relax}}
\newcommand{\arc@bow@tie}[2]{%
  \vcenter{\hbox{%
    \sbox\z@{$\m@th#1\otimes$}%
    \sbox\tw@{$\m@th\mkern1mu$}%
    \setlength{\unitlength}{\wd\z@}%
    \linethickness{.4\wd\tw@}%
    \begin{picture}(1,1)
    \polyline(0.7878,0.7878)(0.2122,0.2122)
    \polyline(0.2122,0.7878)(0.7878,0.2122)
    \put(0.5,0.5){\arc[-46,46]{0.4}}
    \put(0.5,0.5){\arc[134,226]{0.4}}
    \end{picture}%
  }}%
}
\makeatother

\begin{document}

$A\arcbowtie B_{\arcbowtie}$

$A\otimes B_{\otimes}$

\end{document}

在此处输入图片描述

答案3

这可能就足够了。我用它来截断顶部/底部象限。我将其声明为数学运算符*,并将其缩放到本地数学样式\clipbox的高度。X

\documentclass{article}
\usepackage{trimclip,amsmath,scalerel}
\DeclareMathOperator*\otimesop{\scalerel*{\clipbox{0pt 1.10pt 0pt 1.04pt}{$\otimes$}}{X}}
\begin{document}
\[
  \otimesop_{i=1}^n x_i = 42
\]
\[
  \otimesop \textstyle \otimesop \scriptstyle \otimesop \scriptscriptstyle \otimesop
\]
\end{document}

在此处输入图片描述

上述方法的一个缺点是它总是将\textstyle的一个版本缩放\otimes到所需的大小。因此,在较小的数学样式下,线宽看起来有点细。一种计算量更大的替代方法是使用\otimes适当的数学样式(并根据需要缩放)。将下面的结果与上面的图像进行比较。

此外,我没有将运算符缩放到 的大小X,而是将其缩放到 的垂直大小\mathop{X}^a,以夸大其词\displaystyle

\documentclass{article}
\usepackage{trimclip,amsmath,scalerel}
\DeclareMathOperator*\otimesop{\scalerel*{\clipbox{%
  0pt \dimexpr0.7\LMpt+0.4pt\relax{} 0pt \dimexpr0.64\LMpt+0.4pt\relax}{%
  $\SavedStyle\otimes$}}{\mathop{X}^a}}
\begin{document}
\[
  \otimesop_{i=1}^n x_i = 42
\]
\[
  \textstyle\otimesop_{i}^n x_i = 42
\]
\[
  \scriptstyle\otimesop_{i}^n x_i = 42
\]
\[
  \scriptscriptstyle\otimesop_{i}^n x_i = 42
\]
\end{document}

在此处输入图片描述

相关内容