How do I make a math-mode asterisk that works like sum or product operator? (To represent the convolution.)
Asked
Active
Viewed 3.0k times
1 Answers
22
The simplest would be to use \Asterisk from the mathabx package, and also the \coAsterisk (not sure what the differences are as they look identical to me).
Alternatively, you could use \scalebox from the graphicx package to re-size the standard \ast to suit. Here is a comparison of these three (\Conv is the custom version) showing the behavior in inline and display mode with indices:

\documentclass[fleqn]{article}
\usepackage{mathabx}
\usepackage{graphicx}
\newcommand{\Conv}{\mathop{\scalebox{1.5}{\raisebox{-0.2ex}{$\ast$}}}}%
\begin{document}
{\small\verb|\Asterisk| \verb|\coAsterisk | \verb| \Conv|}
\hspace{0.35cm}% to simply comparrison
$
f \Asterisk^{a}_{b} g \qquad
f \coAsterisk^{a}_{b} g \qquad
f \Conv^{a}_{b} g
$
\[
f \Asterisk^{a}_{b} g \qquad
f \coAsterisk^{a}_{b} g \qquad
f \Conv^{a}_{b} g
\]
\end{document}
Peter Grill
- 223,288
-
Thanks. Will it work like a "sum" operator that puts the indicies below and above the symbol? – Neil G Jan 15 '12 at 21:39
-
In that case you can use
\mathop. How do you want this to be shown in display mode and inline mode? – Peter Grill Jan 15 '12 at 21:48 -
I was only using display mode. Will it do as "sum" does in inline mode? – Neil G Jan 15 '12 at 21:52
-
Is there a trick that is looks like a tabluar, or just a luck that it looks like matrix 3x3 ? I can't see any tabular or matrix in your code, could you explain the trick ? – Grzegorz Wierzowiecki Feb 04 '12 at 09:40
-
1@GrzegorzWierzowiecki: Nope, I am not that much of a genius. I used
\hspace{0.35cm}' to get the inline math to align with the display math, and the\qquad` is just about the right size to align them. So it just looks almost like a table. – Peter Grill Feb 04 '12 at 22:45 -
Thanks Peter. As I am learning LaTeX I get ensured, there there are so plenty of possibilities, that you never know all of it and may miss sth :). Even thou, nicely aligned example with low effort - clear code is important for educative purposes, your is for sure. All Best, Greg – Grzegorz Wierzowiecki Feb 04 '12 at 23:16
-
1@GrzegorzWierzowiecki: Thanks for the complement. I think I originally thought about doing a table, but then when I saw that the output looked reasonable enough as is, I decided not to. You're definitely at the right place to learn -- I've learned almost everything I know about TeX from this site. BTW, I still consider myself at the advanced beginner level, even though my rep may make you believe otherwise, so feel free to ask more questions. I certainly wish I had asked more when I started making my choices on how to do things as it would have saved a lot of grief later. – Peter Grill Feb 04 '12 at 23:48
-
3
-
@Egbert: Wow, can't belive I never noticed that. Thanks for pointing that out. – Peter Grill Nov 30 '16 at 21:22