I want to use a slanted \sum
symbol denoting a different meaning from summation. How do I get a slanted \sum
symbol?
-
3What is the intended meaning? Please reconsider this as the use of 2 very similar symbols, only distinguished by the fact that one is slanted, will be extremely confusing, as well as typographically bad. In mathematical typesetting, things of the same kind get typeset in similar ways e.g. all functions, all operators, all variables... in upright, in italic, in ...– cfrJan 3, 2015 at 2:45
-
Can you draw what you're looking for? If it's a simple rotation, then the linked answers your question. If it's truly 'oblique', then perhaps not.– Sean AllredJan 3, 2015 at 4:27
-
2@cfr This is not duplicate, because rotating isn't slanting.– wipetJan 3, 2015 at 7:54
4 Answers
If you are using pdfTeX then you can try this code:
\def\itsum{\mathop{\mathpalette\itsumA{}\phantom\sum}}
\def\itsumA#1#2{\pdfsave\pdfliteral{1 0 .2 1 0 0 cm}\rlap{$#1\sum$}\pdfrestore}
$\sum_i^5 \itsum_j^{\,7} a_{ij}$
-
1Also works with LuaTeX 'out of the box' (those primitives are carried forward as-is)– Joseph Wright ♦Jan 3, 2015 at 14:23
-
1@JosephWright Of course. I "assume" :-) that LuaTeX users know that pdfTeX is included here.– wipetJan 3, 2015 at 14:26
-
1Actually you can generalize it with something like
{if pdf}{<\pdfliteral code>}{<\special code>}
– percusseJan 4, 2015 at 3:37 -
1@percusse I do something similar in my macros. If
\pdfliteral
isn't accessible then I define it as\def\pdfliteral#1{\special{pdf:literal #1}}
. This allows me to keep the\pdfliteral
-dependent macros unchanged.– wipetJan 4, 2015 at 6:58
One way to do it is to use a slanted capital sigma. By using the scalerel
package, one can make that symbol (approximately) the same size as the original \sum
operator:
\documentclass{article}
\usepackage{amsmath}
\usepackage{scalerel}
\DeclareMathOperator*{\itsum}{\scalerel*{\mathit{\Sigma}}{\sum}}
\begin{document}
\[
\sum_i x_i\quad\itsum_i x_i
\]
\end{document}
-
1
-
1@cfr The reason the slanted one is larger can be determined by executing
\fboxsep=0pt\fbox{$\mathit{\Sigma}$}\fbox{$\displaystyle\sum$}
(with thescalerel
package loaded). The\sum
has a built in padding above and below the glyph, which is absent in the\Sigma
(\mathit
or otherwise). Thus, the\scalrel
ed\Sigma
is grown to the size of the padded\sum
, which is slightly larger than the actual glyph. Jan 3, 2015 at 4:20
-
1Included in the
amsmath
package, but strangely not in the Comprehensive list.– Sandy GJan 9 at 16:35 -
@SandyG Interesting. Maybe because the uppercase slanted Greek letters are just part of the OML encoding, but that's not really a reason not to mention them.– campaJan 9 at 17:16
With l3draw
(and the standard \mathpalette
)
\documentclass{article}
\usepackage{amsmath}
\usepackage{l3draw}
\makeatletter
\NewDocumentCommand{\slsum}{}{%
\DOTSB
\mathop{\vphantom{\sum}\mathpalette\slsum@\relax}
\slimits@
}
\NewDocumentCommand{\slsum@}{mm}{%
\vcenter{\hbox{%
\xslantobject{$\m@th#1\sum$}{0.4}%
}}%
}
\makeatother
\ExplSyntaxOn
\NewDocumentCommand{\xslantobject}{mm}
{
\draw_begin:
\draw_transform_xslant:n { #2 }
\hbox_set:Nn \l_tmpa_box { #1 }
\draw_box_use:N \l_tmpa_box
\draw_end:
}
\ExplSyntaxOff
\begin{document}
\[
\sum_{i\ge0}\slsum_{i\ge0}
\]
\begin{center}
$\sum\slsum$
\end{center}
\end{document}