在积分符号上叠加和符号的命令是什么?

在积分符号上叠加和符号的命令是什么?

我想表达所有离散状态的总和以及所有连续状态的积分。通常,这个符号是$\sum$叠加在 上的$\int$。是否有命令可以制作这个符号?如果没有,可以通过某种方式组合总和和积分符号来制作它吗?

答案1

这是Unicode字符 ‘带积分的求和’ (U+2A0B)(⨋)。它可用于STIX 字体. (LaTeX 支持目前正在进行 beta 测试。)相关命令是\sumint

答案2

您可以构建符号:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\DeclareMathOperator*{\SumInt}{%
\mathchoice%
  {\ooalign{$\displaystyle\sum$\cr\hidewidth$\displaystyle\int$\hidewidth\cr}}
  {\ooalign{\raisebox{.14\height}{\scalebox{.7}{$\textstyle\sum$}}\cr\hidewidth$\textstyle\int$\hidewidth\cr}}
  {\ooalign{\raisebox{.2\height}{\scalebox{.6}{$\scriptstyle\sum$}}\cr$\scriptstyle\int$\cr}}
  {\ooalign{\raisebox{.2\height}{\scalebox{.6}{$\scriptstyle\sum$}}\cr$\scriptstyle\int$\cr}}
}
\begin{document}

$\SumInt_{\SumInt} \displaystyle\SumInt$

\end{document}

在此处输入图片描述

MnSymbol包提供\sumint(使用它某些符号会改变):

\documentclass{article}
\usepackage{MnSymbol}

\begin{document}

$\sumint_{\sumint} \displaystyle\sumint$

\end{document}

在此处输入图片描述

答案3

其他选项是mathtools包:

\documentclass{article}
  \usepackage{mathtools}
\begin{document}
  $\int\mathllap{\sum}$

  $\mathclap{\displaystyle\int}\mathclap{\textstyle\sum}$ 

  $F(y)=\mathclap{\displaystyle\int}\mathclap{\textstyle\sum}\;\;\; f(y)\,\mathrm dy$

\end{document}

MWE 输出

由于 tohecz 评论指出符号周围的间距问题,此 tex 文件中有更多有用的例子。大字符中的第一个示例获得的输出与使用\ooalign{$\textstyle\sum$\cr\hidewidth$\displaystyle\int$\hidewidth\cr}

\documentclass[10]{article}
  \usepackage{mathtools}
  \usepackage{xcolor}

% Reference shadow equation without \int
\newcommand{\refereq}{
\textcolor{cyan}{
$F(y)= \sum f(y)\,\mathrm dy$
}\par\vspace{-1.41\baselineskip}\par}

\begin{document}

\bigskip  
Test inside formula \emph{vs} 
normal position of $\scriptstyle\sum$ 
(cyan shadow without 
$\scriptstyle\int$):
\bigskip 

{\Huge \refereq
$F(y)=
\mathrlap{\displaystyle\int}
\mathrlap{\textstyle\sum}
\phantom{\mathrlap{\displaystyle\int}
\textstyle\sum}
f(y)\,\mathrm dy$}

\bigskip 
Note that different symbol combinations
with {\tt mathtools} have different
spacing effects: \\
\bigskip 

\begin{tabular}{l|l|ll}
 & Symbol & Size & Alignment \\
1 & $\sum$ x 
&  \textbackslash{textstyle} 
& normal  \\
& $\displaystyle\sum$ x 
&  \textbackslash{display} 
& normal\\
2 & $\int$ x 
& \textbackslash{textstyle} 
& normal \\
& $\displaystyle\int$ x 
&  \textbackslash{display} 
& normal\\
3 & $\int\mathllap{\sum}$ x 
& \textbackslash{textstyle} 
& \textbackslash{}math{\bf l}lap
\{$\scriptstyle\sum$\} \\   
4 & $\displaystyle\int\mathllap{\sum}$ x 
& \textbackslash{displaystyle} 
& \textbackslash{}math{\bf l}lap
\{$\scriptstyle\sum$\} \\ 
5 & ${\displaystyle\int}
\mathllap{\sum}$ x 
& mixed 
& \textbackslash{}math{\bf l}lap
\{$\scriptstyle\sum$\} \\
6 & $\mathclap{\displaystyle\int}\mathclap{\textstyle\sum}$ x 
& mixed 
& \textbackslash{}math{\bf c}lap (both) \\
7 & $\mathrlap{\displaystyle\int}\textstyle\sum$ x 
& mixed 
&  \textbackslash{}math{\bf r}lap\{$\int$\}\\
8 & $\mathrlap{\displaystyle\int}\mathrlap{\textstyle\sum} $ x 
& mixed 
& \textbackslash{}math{\bf r}lap (both) \\
9 & $\mathllap{\displaystyle\int}\mathllap{\textstyle\sum}$ x 
& mixed 
& \textbackslash{}math{\bf l}lap (both) \\
\end{tabular}

\bigskip
Comments:

Note that there are little differences
inside the combined symbol. With respect
(8) in (5) and (9) and even in (6) the
$\int$  is lightly displaced to the
rigth, but in (7) is left displaced.  
\bigskip

\refereq
$F(y)=
{\displaystyle\int}\mathllap
{\textstyle\sum}
f(y)\,\mathrm dy$ 
(5) f is spaced from 
$\scriptstyle\int$ but is too
near to $\scriptstyle\sum$ 

\refereq
$F(y)=
\hspace{.5em}\mathclap{\displaystyle
\int}\mathclap{\textstyle\sum} 
\hspace{.5em}
f(y)\,\mathrm dy$ 
(6) Need extra .5em in both sides 
to look as (5).

\refereq
$F(y)=
\mathrlap{\displaystyle\int}
\textstyle\sum
f(y)\,\mathrm dy$ 
(7) f well spaced from 
$\scriptstyle\sum$ (but 
$\scriptstyle\int$ is too left?) 

\refereq
$F(y)=
\mathrlap{\displaystyle\int}
\mathrlap{\textstyle\sum}
\phantom{\mathrlap{\displaystyle
\int}\textstyle\sum}
f(y)\,\mathrm dy$ 
(8) Need recover right space 
but then fit perfectly.

\refereq
$F(y)=
\phantom{\textstyle\sum}
\mathllap{\displaystyle\int}
\mathllap{\textstyle\sum}
\phantom{\mathrlap{
\displaystyle\int}}
f(y)\,\mathrm dy$ 
(9) Need recover left space 
to see just as (5).

So, better approach (with 
{\tt mathtools}, of course), 
seem to be (8) 

\end{document}

在此处输入图片描述

答案4

这不是一个非常详尽的答案,但调整字距可能是一个选择:

\int\kern-1em\sum f(x)dx

在此处输入图片描述

另外,一定要经常询问解析2首先,它通常会为您提供您正在寻找的符号,但不幸的是,在这种情况下不是。

相关内容