1
\documentclass[12pt,a4paper]{article}

\usepackage{amsmath}

\begin{document}

  $$W_{max}(T)$$
     or
       $$W_{\mbox{max}}(T).$$    
      \end{document}

I ask if I should write $W_{max}(T)$ of $W_{\mbox{max}}(T)$ or there are athers commands.

Thanks

Student
  • 1,134
  • 2
  • 9
  • 27

1 Answers1

1

Your best option is to use W_\max. Another possibility is W_{\text{max}}.

  • 1
    Both should not be used. First should at least have braces (bit of a fluke that is works), \text should never (ever) be used like this. It will be italic if used in a context where the surrounding text is italic (for example in a theorem). It us better to use \textup or \textnormal – daleif Jan 07 '18 at 10:15
  • @daleif I understand (and agree with) your comment concerning the use of the \text command, but not the other one. What do you mean with “bit of a fluke”? It works, doesn't it? – José Carlos Santos Jan 07 '18 at 10:28
  • Basic users does not understand why it works with this particular macro and not with the one they made them self, having to explain them the difference is IMO a waste of time, so promoting this use without braces should not be encouraged. – daleif Jan 07 '18 at 10:30
  • 1
    Try $W_\notin$ to understand why it’s good practice to use braces. – egreg Jan 07 '18 at 10:31
  • When there exists text in mathematical equation like $$......\mbox{and}......$$. It is better to use \mbox{} or \text{}? Thank you – Student Jan 07 '18 at 10:59
  • @Student \text is better. Check the difference between \[\overbrace{A\times A\times\cdots\times A}^{n\text{ times}}\]and what you get if you use \mbox instead. – José Carlos Santos Jan 07 '18 at 11:03