4

I would like to customize the weak-star limit as a math operator. It should look like w$^*$-lim. I don't want to use w*-lim or w^*-lim because it looks ugly. But when I write

\DeclareMathOperator*{\wslim}{w$^*$-lim}

I get an error because dollars cannot be used in \mathrm mode. How can I make this happen?

2
  • Welcome to tex.sx. Your question about why MathJax doesn't work here is answered by this meta question: tex.meta.stackexchange.com/q/1272 Jun 16, 2019 at 14:05
  • You commented on the meta question that you don't like mathjax not being enabled, I suggest that you use the site for a while longer to see why that is a good policy. Jun 16, 2019 at 14:50

2 Answers 2

6

* obtains a special mathcode inside the AMS math operator setup, but here you want the standard star which is still available as \ast :

enter image description here

\documentclass{article}

\usepackage{amsmath}
\DeclareMathOperator*{\wslima}{w^{*}-lim}
\DeclareMathOperator*{\wslimb}{w^{\ast}-lim}
\begin{document}
\[\wslima a \quad \wslimb a\]
\end{document}

Note the reason for the redefinition is to make it possible to just use w* which is the intended markup here although as you note it does not produce the same symbol (or use the same font) as a normal math ^*.

enter image description here

\documentclass{article}

\usepackage{amsmath}
\DeclareMathOperator*{\wslim}{w*-lim}
\DeclareMathOperator*{\wslima}{w^{*}-lim}
\DeclareMathOperator*{\wslimb}{w^{\ast}-lim}
\begin{document}
\[\wslim a \quad \wslima a \quad \wslimb a\]
\end{document}
4
  • Finally someone who reads the question carefully. Thanks so much!!!
    – amsmath
    Jun 16, 2019 at 14:38
  • 1
    @amsmath it also helps that I'm the current maintainer of the package and I had an idea what it was doing without needing to read the question that carefully:-) Jun 16, 2019 at 14:39
  • 1
    You're the maintainer of the amsmath package? Then you should like my nick. ;-)
    – amsmath
    Jun 16, 2019 at 14:43
  • 6
    @amsmath actually I was considering asking you to change it, it may be confusing to others. Jun 16, 2019 at 14:47
0

Maybe you'd be interested in this variant:

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\wslim}{w\raisebox{-1.5pt}{${}^{*} $}\mkern-2mu-lim}

\begin{document}

\[ \wslim f \]%

\end{document} 

enter image description here

4
  • I wrote in my question: "I don't want to use w*-lim because it looks ugly"...
    – amsmath
    Jun 16, 2019 at 14:09
  • Sorry, I didn't notice it. I mainly focused on not having compilation errors. For me the exponent is too high w.r.t. a lowercase letter. I even tried a simple \textsuperscript, but I obtained the same result as with math mode.
    – Bernard
    Jun 16, 2019 at 14:15
  • I've modified my code. Is it more like you want?
    – Bernard
    Jun 16, 2019 at 14:56
  • @Bernard I vote instead your answer. Nice :-)
    – Sebastiano
    Jun 17, 2019 at 21:19

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.