答案1
这是一种可能性。只有文本和显示样式,我希望您不需要在下标、上标或小分数中使用它们。
\documentclass{article}
\usepackage{amsmath,amssymb,graphicx}
\makeatletter
\newcommand*{\sumcirclearrowleft}{%
\DOTSB
\mathop{
\mathchoice
{\rlap{\kern.25em\rotatebox[origin=c]{-90}{$\circlearrowleft$}}{\sum}}
{\vcenter{\rlap{\kern.2em\rotatebox[origin=c]{-90}{$\scriptscriptstyle\circlearrowleft$}}}{\sum}}
{\sum}{\sum}
}\slimits@
}
\newcommand*{\sumcirclearrowright}{%
\DOTSB
\mathop{
\mathchoice
{\rlap{\kern.25em\rotatebox[origin=c]{90}{$\circlearrowright$}}{\sum}}
{\vcenter{\rlap{\kern.2em\rotatebox[origin=c]{90}{$\scriptscriptstyle\circlearrowright$}}}{\sum}}
{\sum}{\sum}
}\slimits@
}
\makeatother
\begin{document}
$\sumcirclearrowleft\displaystyle\sumcirclearrowleft$
$\sumcirclearrowright\displaystyle\sumcirclearrowright$
$\sumcirclearrowleft_{i=1}^n
\displaystyle\sumcirclearrowleft_{i=1}^n$
\end{document}
带封闭圆圈的替代版本
我找到了一个 TikZ 版本(仍然只能在文本和显示样式中使用),其中有 Qrrbrbirlbel 的代码https://tex.stackexchange.com/a/95263/4427(修改的)。
\documentclass{article}
\usepackage{amsmath,amssymb,tikz}
\usetikzlibrary{arrows.meta,bending}
\makeatletter
\tikzset{
/qrr/circle arrow/.cd,
start angle/.initial={},
delta angle/.initial={},
end angle/.initial={},
arrows/.estore in=\qrr@ca@arrow,
arrows=-
}
\pgfdeclareshape{circle arrow}{
\inheritsavedanchors[from=circle] \inheritanchorborder[from=circle]
\inheritanchor[from=circle]{north} \inheritanchor[from=circle]{north west}
\inheritanchor[from=circle]{north east} \inheritanchor[from=circle]{center}
\inheritanchor[from=circle]{west} \inheritanchor[from=circle]{east}
\inheritanchor[from=circle]{mid} \inheritanchor[from=circle]{mid west}
\inheritanchor[from=circle]{mid east} \inheritanchor[from=circle]{base}
\inheritanchor[from=circle]{base west} \inheritanchor[from=circle]{base east}
\inheritanchor[from=circle]{south} \inheritanchor[from=circle]{south west}
\inheritanchor[from=circle]{south east}
\backgroundpath{
\pgfkeysgetvalue{/qrr/circle arrow/start angle}\qrr@ca@s
\pgfkeysgetvalue{/qrr/circle arrow/end angle}\qrr@ca@e
\pgfkeysgetvalue{/qrr/circle arrow/delta angle}\qrr@ca@d
\ifx\qrr@ca@s\pgfutil@empty%
\pgfmathsetmacro\qrr@ca@s{\qrr@ca@e-\qrr@ca@d}%
\else
\ifx\qrr@ca@e\pgfutil@empty%
\pgfmathsetmacro\qrr@ca@e{\qrr@ca@s+\qrr@ca@d}%
\fi%
\fi
\pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfpointpolar{\qrr@ca@s}{\radius}}}%
\pgfpatharc{\qrr@ca@s}{\qrr@ca@e}{\radius}%
\pgfkeys{/tikz/arrows/.expand once=\qrr@ca@arrow}%
}
}
\tikzset{% the first two styles are internal, they do not work alone!
turn left/.style={
/tikz/shape=circle arrow,
/qrr/circle arrow/arrows={->[flex']},
/qrr/circle arrow/delta angle=370
},
turn right/.style={
/tikz/shape=circle arrow,
/qrr/circle arrow/arrows={<[flex']-},
/qrr/circle arrow/delta angle=370},
turn left east/.style = {/tikz/turn left, /qrr/circle arrow/start angle=20},
turn right west/.style = {/tikz/turn right, /qrr/circle arrow/start angle=160},
}
\newcommand*{\sumcirclearrowleft}{%
\DOTSB
\mathop{\mathpalette\sumcirclearrow@{left east}}
\slimits@
}
\newcommand*{\sumcirclearrowright}{%
\DOTSB
\mathop{\mathpalette\sumcirclearrow@{right west}}
\slimits@
}
\newcommand{\sumcirclearrow@}[2]{%
\sbox\z@{$\m@th#1\sum$}%
\dimen@=.14\wd\z@
\makecirclearrow@{#2}
{\sum}%
}
\newcommand{\makecirclearrow@}[1]{%
\rlap{\kern\dimen@$\m@th\vcenter{\hbox{%
\begin{tikzpicture}[
>={Classical TikZ Rightarrow[width=2pt]},
]
\node[draw,inner sep=\dimen@,turn #1] {};
\end{tikzpicture}%
}}$}%
}
\makeatother
\begin{document}
$\sumcirclearrowleft\displaystyle\sumcirclearrowleft$
$\sumcirclearrowright\displaystyle\sumcirclearrowright$
$\sumcirclearrowleft_{i=1}^n
\displaystyle\sumcirclearrowleft_{i=1}^n$
\end{document}
答案2
适用于所有数学风格的替代方法......
修订的解决方案(闭合圆圈箭头)
这有点牵强,所以我将我原来的解决方案保留在下面。原作者希望结果中的圆圈箭头部分是一个封闭的(而不是开放的)圆圈。理想情况下,可以找到这样的字形并将其用于替代另一个。但是,找不到这样的字形。我可以通过叠加来制作一个,但仅限于\displaystyle
,所以我不得不使用额外的技巧来将其缩放为相关的数学样式。因此,我认为这种方法并不理想。
\documentclass{scrartcl}
\usepackage{stackengine,scalerel,graphicx,amssymb,amsmath,wasysym}
\newsavebox\closedcircleleft
\newsavebox\closedcircleright
\savestack\closedcircleleft{\stackinset{c}{}{c}{}{$\Circle$}{$\circlearrowleft$}}
\savestack\closedcircleright{\stackinset{c}{}{c}{}{$\Circle$}{$\circlearrowright$}}
\DeclareMathOperator*{\sumcirclearrowleft}{%
\ThisStyle{\mathop{\ensurestackMath{\stackinset{c}{-1.5\LMpt}{c}{}{%
\rotatebox[origin=lb]{-90}{$\SavedStyle\scalerel*{\closedcircleleft}{%
i}$}}{\SavedStyle\sum}}}}}
\DeclareMathOperator*{\sumcirclearrowright}{%
\ThisStyle{\mathop{\ensurestackMath{\stackinset{c}{-1.5\LMpt}{c}{}{%
\rotatebox[origin=lb]{90}{$\SavedStyle\scalerel*{\closedcircleright}{%
i}$}}{\SavedStyle\sum}}}}}
\begin{document}
$\displaystyle\sumcirclearrowleft_i^n
\textstyle\sumcirclearrowleft_i^n
\scriptstyle\sumcirclearrowleft_i^n
\scriptscriptstyle\sumcirclearrowleft_i^n$
\medskip
$\displaystyle\sumcirclearrowright_i^n
\textstyle\sumcirclearrowright_i^n
\scriptstyle\sumcirclearrowright_i^n
\scriptscriptstyle\sumcirclearrowright_i^n$
\end{document}
原始解决方案(空心圆形箭头)
\documentclass{scrartcl}
\usepackage{stackengine,scalerel,graphicx,amssymb,amsmath}
\DeclareMathOperator*{\sumcirclearrowleft}{%
\ThisStyle{\mathop{\ensurestackMath{\stackinset{c}{-1.7\LMpt}{c}{.4pt}{%
\rotatebox[origin=lb]{-90}{$\SavedStyle\circlearrowleft$}}{\SavedStyle\sum}}}}}
\DeclareMathOperator*{\sumcirclearrowright}{%
\ThisStyle{\mathop{\ensurestackMath{\stackinset{c}{-1.7\LMpt}{c}{.1pt}{%
\rotatebox[origin=lb]{90}{$\SavedStyle\circlearrowright$}}{\SavedStyle\sum}}}}}
\begin{document}
$\displaystyle\sumcirclearrowleft_i^n
\textstyle\sumcirclearrowleft_i^n
\scriptstyle\sumcirclearrowleft_i^n
\scriptscriptstyle\sumcirclearrowleft_i^n$
\medskip
$\displaystyle\sumcirclearrowright_i^n
\textstyle\sumcirclearrowright_i^n
\scriptstyle\sumcirclearrowright_i^n
\scriptscriptstyle\sumcirclearrowright_i^n$
\end{document}
如果你喜欢较小的圆形箭头,
\documentclass{scrartcl}
\usepackage{stackengine,scalerel,graphicx,amssymb,amsmath}
\DeclareMathOperator*{\sumcirclearrowleft}{%
\ThisStyle{\mathop{\ensurestackMath{\stackinset{c}{-1.5\LMpt}{c}%
{\dimexpr.9pt-.3\LMpt}{%
\rotatebox[origin=lb]{-90}{$\SavedStyle_\circlearrowleft$}}{\SavedStyle\sum}}}}}
\DeclareMathOperator*{\sumcirclearrowright}{%
\ThisStyle{\mathop{\ensurestackMath{\stackinset{c}{-1.5\LMpt}{c}{.2pt}{%
\rotatebox[origin=lb]{90}{$\SavedStyle_\circlearrowright$}}{\SavedStyle\sum}}}}}
\begin{document}
$\displaystyle\sumcirclearrowleft_i^n
\textstyle\sumcirclearrowleft_i^n
\scriptstyle\sumcirclearrowleft_i^n
\scriptscriptstyle\sumcirclearrowleft_i^n$
\medskip
$\displaystyle\sumcirclearrowright_i^n
\textstyle\sumcirclearrowright_i^n
\scriptstyle\sumcirclearrowright_i^n
\scriptscriptstyle\sumcirclearrowright_i^n$
\end{document}