Asterisk (*) symbol in LaTeX
In this tutorial, I will show you how to get the asterisk symbol in LaTeX with the default command and other packages. how to get an asterisk symbol in superscript.
In order to get the asterisk symbol in LaTeX you can use the default command \ast
in math mode. For textmode, you can use the \textasteriskcentered
command but if you get any error then you have to load the textcomp
package.
\documentclass{article} \begin{document} Asterisk symbol in math mode: $$ A\ast B $$ $$ A\ast \ast B $$ Asterisk symbol in text mode: \begin{center} A\textasteriskcentered B \\[4pt] A\textasteriskcentered \textasteriskcentered B \end{center} \end{document}
Output:
Asterisk symbol in superscript
I know you’re thinking I have a Asterisk symbol on my keyboard so what if I use it? If you type the Asterisk symbol on the keyboard, it will automatically print in the superscript position. But you have to use the *
symbol outside math mode or you can use \text{*}
to use this inside math mode.
Also, you can use the ^\ast
command to put the Asterisk symbol in superscript. For text mode, you can use the \textsuperscript\textasteriskcentered
command.
\documentclass{article} \usepackage{amsmath} \begin{document} Asterisk symbol in superscript position in math mode: $$ A^\ast $$ $$ a^\ast $$ $$ A\text{*} $$ % Load amsmath for \text \begin{center} $ A $* % From keyboard \end{center} Asterisk symbol in superscript position in text mode: \begin{center} A\textsuperscript\textasteriskcentered \\[4pt] a\textsuperscript\textasteriskcentered \\[4pt] Q* % from keyboard \end{center} \end{document}
Output:
Asterisk symbol with other packages
You can also use other packages to get different styles of Asterisk symbols. I have listed all of these, you can choose whatever you want.
Package | Command | Output |
---|---|---|
mathabx | \Asterisk | ![]() |
mathabx | \coasterisk | ![]() |
mathabx | \coAsterisk | ![]() |
mathabx | \convolution | ![]() |
mathabx | \boxasterisk | ![]() |
mathabx | \oasterisk | ![]() |
fdsymbol | \ast | ![]() |
boisik | \coAsterisk | ![]() |
stix | \dingasterisk | ![]() |
bbding | \Asterisk | ![]() |
bbding | \AsteriskBold | ![]() |
bbding | \AsteriskCenterOpen | ![]() |
bbding | \AsteriskRoundedEnds | ![]() |
bbding | \AsteriskThin | ![]() |
bbding | \EightAsterisk | ![]() |
Here the bbding
package works only in text mode.
Leave a Reply