Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I was looking back at some of the equations that I had written and noticed that the asterisks weren't behaving how I was expecting it to (I also understand that my expectations may differ from other users).

The point is, I'm trying to get Q* but instead I get something like this Q✶. I've tried using the caret (^) for superscript but it looks awfully small.

Does anyone know a way to get the asterisk to behave as if it is in the normal text environment while in the equation mode?

share|improve this question
3  
The text asterisk is raised, while the math asterisk is used for denoting an operation; \mbox{*} or \text{*} if you load amsmath will do. But in general $Q^{*}$ is preferred. –  egreg Jun 9 '12 at 12:17
    
would that work if I needed it in equation mode?, i.e. \begin{equation} .... \end{equation} –  Reuben L. Jun 9 '12 at 12:20
    
\mbox does it. thanks! just copy your comment as an answer and i will accept it. –  Reuben L. Jun 9 '12 at 12:22
add comment

1 Answer

up vote 13 down vote accepted

The text asterisk is raised, while the math asterisk is used for denoting an operation.

You can use \mbox{*} or \text{*} (if you load amsmath).

However, in general $Q^{*}$ is preferred.

You can get the behavior automatically:

\documentclass{article}
\usepackage{amsmath}

%%% magic code starts
\mathcode`*=\string"8000
\begingroup
\catcode`*=\active
\xdef*{\noexpand\textup{\string*}}
\endgroup
%%% magic code ends

\begin{document}
$a^{\ast} Q*$
\end{document}

I've added \ast that is the usual math asterisk for a comparison.

enter image description here

I'd recommend using the first form.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.