0

I want to use a slanted \sum symbol denoting a different meaning from summation. I searched it in the TSE but didn't find a satisfactory answer: @summer gave one with a too large size and @wipet gave one in PDFLaTex only. Then how do I get a slanted \sum symbol with a suitable size in XeLaTex?

enter image description here

M. Logic
  • 4,214
  • 1
    What about placement of limits? Anyway, I don't think that this is a suitable symbol. – egreg Aug 24 '21 at 08:32
  • @egreg Since I need four symbols for different generalized products, then the slanted one may be necessary, and hence the slanted sum is also necessary ... – M. Logic Aug 24 '21 at 12:51

2 Answers2

2

You can use TikZ as suggested in https://tex.stackexchange.com/a/326144/4427

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}

\makeatletter \DeclareRobustCommand{\slantedsum}{\DOTSB\slantedsum@\slimits@} \newcommand{\slantedsum@}[1]{\mathop{\mathpalette\slantedsum@@\relax}} \newcommand{\slantedsum@@}[2]{% \vcenter{\hbox{% \tikz \node[inner sep=0pt,xslant=0.25] {$\m@th#1\sum$};% }}% } \makeatother

\begin{document}

[ \sum\slantedsum ] \begin{center} $\sum\slantedsum$ \ \setlength{\fboxsep}{0pt}% \fbox{$\displaystyle\sum$}% \fbox{$\displaystyle\slantedsum$} \end{center}

\end{document}

enter image description here

egreg
  • 1,121,712
1

This will not work for you in xelatex. But for other users, if they use pdflatex, then use of \slantbox is an option. With scalerel, it is made to work across math styles.

\documentclass{article}
\usepackage{amsmath}
\usepackage{scalerel}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\mbox{%
        \sbox{\foobox}{#2}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
}}
\DeclareMathOperator*{\foo}{\ThisStyle{\slantbox[.15]{$\SavedStyle\sum$}}}

\begin{document} [ \foo_{i=3}^{6}(f^2(i)) ]

This is inline: (\foo_{i=3}^{6}(f^2(i)) ) \end{document}

enter image description here