6

I am writing my report using TeXnicCenter, and it has been going very well.

However, I want to write max* in the equation mode, but all i code get is the asterisk right about the a in max

if I write $\max*$ in normal inline equation I get what I want which is max*. but when I write it using the equation command which is

\begin{equation} \label{eq:a}
\max^{*}(a,b)
\end{equation}

I get max(a,b) and the astrik is right above 'a', like I am using \limits. using \mbox will put the asterisk way after the max.

this is an image showing my dilemma, it shows what I want, then what I get for using \mbox{*} then what I get for using \max^*

picture

4

What you want is a new math operator; however there's a slight TeXnical complication with a naïf \DeclareMathOperator and ^{\ast} should be used instead of ^{*}.

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\smax}{max^{\ast}}

\begin{document}

\[
\smax_{(s'\to s)\Rightarrow u_{i}=1}\bigl(\tilde{\delta}_{i}(s',s)\bigr)
\]

\end{document}

enter image description here

  • the amsmath \newmcodes@ should have gotten a lifting ... (and happy users of mathastext get it for free -- although I went a bit too radical, and at some point should make it better). – user4686 Dec 15 '15 at 17:54
  • @jfbu What they want to avoid is * used as a binary operation symbol, but the result is that it becomes a raised asterisk as in text. I tried \DeclareMathOperator{\smax}{max*}, but the asterisk comes out different from the math mode one (at least in the CM fonts). – egreg Dec 15 '15 at 17:58
  • for the CM fonts, it seems the difference is only one of size : \DeclareMathOperator{\smax}{max{\scriptstyle*}} produces visually a glyph very similar to the math * (but not raised enough...) . Using \ast is clearly the good workaround. – user4686 Dec 15 '15 at 18:23
  • amsmath could have done \count255\mathcode`\* \divide\count255 "1000 \multiply\count255 -"1000 \advance\count255 \mathcode`\*\mathcode`\* \count255 – user4686 Dec 15 '15 at 18:23
  • but that would have been a problem with a math active * ... – user4686 Dec 15 '15 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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