How do you type an asterisk(*) in LaTeX?

The asterisk symbol in LaTeX is represented by the \ast command. While the keyboard * may look similar, they serve different purposes in LaTeX.

Using asterisks in LaTeX

Below is a simple example demonstrating the difference between the \ast command and the keyboard *.

\documentclass{article}
\begin{document}
   \[ C\ast de \]
   \[ C*de \]
   \[ G\ast\ast d \]
   \[ G**d \]
\end{document}

Output :

Using * symbol

When using two consecutive *, spacing issues can occur. The following example highlights this problem.

\documentclass{article}
\usepackage{MnSymbol}
\begin{document}
   $ G\ast\ast\; d $\\[6pt]
   G $\ast\;\ast$ d \\[6pt]
   G $*\;*$ d \\[6pt]
   B $*\;*$ k
\end{document}

Output :

Use of asterisk symbol in better way output.

Large asterisk symbol

By default, LaTeX does not provide a \bigast command for a larger * symbol. To achieve this, you need to use the mathabx package.

\documentclass{article}
\usepackage{mathabx}
\begin{document}
   \[ f(\bigast)g \]
   \[ f\bigast_b^a g \]
\end{document}

Output :

Use of big asterisk symbol output.

Using asterisks in superscripts

If you type an * directly in text mode, it behaves as a superscript. However, you can explicitly define this behavior in LaTeX.

\documentclass{article}
\usepackage{amsfonts}
\begin{document}
   $ q=b_1b_2\; \epsilon\; \mathbb{Z}^\ast $ \\[6pt]
   $q=b_1b_2\; \epsilon\; \mathbb{Z}$* \\[6pt]
   2+5*10+9*7
   A * * D
\end{document}

Output :

Using asterisk in superscripts

Different styles of ssterisk symbols

LaTeX offers multiple variations of the asterisk symbol using the bbding and pifont packages. Below is an example showcasing a variety of styled *.

\documentclass{article}
\usepackage{bbding,pifont}
\begin{document}
   % Use bbding package
   \SixFlowerOpenCenter, \SixFlowerPetalRemoved, \Asterisk\\[6pt]
   \AsteriskBold, \AsteriskCenterOpen, \AsteriskRoundedEnds \\[6pt]
   \AsteriskThin, \AsteriskThinCenterOpen, \SixFlowerRemovedOpenPetal\\[6pt]
   % Use pifont package
   \ding{81}, \ding{82}, \ding{83}\\[6pt]
   \ding{91}, \ding{92}, \ding{93}\\[6pt]
\end{document}

Output :

Many type of asterisk symbol output.

This approach allows you to customize the asterisk symbol according to your needs, whether for mathematical expressions or stylistic enhancements in your LaTeX document.

Share tutorial

Leave a Comment

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