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 laTeX text mode and math mode.

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 in superscript.

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.

PackageCommandOutput
mathabx\Asterisk\Asterisk
mathabx\coasterisk\coasterisk
mathabx\coAsterisk\coAsterisk
mathabx\convolution\convolution
mathabx\boxasterisk\boxasterisk
mathabx\oasterisk\oasterisk
fdsymbol\ast\ast
boisik\coAsterisk\coAsterisk
stix\dingasterisk\dingasterisk
bbding\Asterisk\Asterisk
bbding\AsteriskBold\AsteriskBold
bbding\AsteriskCenterOpen\AsteriskCenterOpen
bbding\AsteriskRoundedEnds\AsteriskRoundedEnds
bbding\AsteriskThin\AsteriskThin
bbding\EightAsterisk\EightAsterisk

Here the bbding package works only in text mode.

Leave a Reply

Your email address will not be published. Required fields are marked *