[Tex/LaTex] Why does the less than equal to symbol not appear as intended in the following code

math-modemathjaxsymbols

When I use the following code on stats.stackexchange.com (which is powered by MathJax) the \le does not render properly. Is this a bug in MathJax or am I not using the \le symbol properly?

$X_3 = 
\begin{cases} 
  X_{31} & \mbox{if }Y_1 Y_2 \mbox{ >  0} \\\
  X_{32} & \mbox{if }Y_1 Y_2 \mbox{ \le 0} 
\end{cases}$

Best Answer

  • use \le in math mode, e.g. \mbox{if $Y_1 Y_2 \le 0$} (yes, that's math mode inside text)

  • use T1 font encoding to get the > symbol correctly typeset in text mode: \usepackage[T1]{fontenc} Otherwise, with standard OT1 encoding, the output wouldn't be > except you use math mode as well: $>$

  • On standard LaTeX you should also use \text{...} rather than \mbox{...}.

Related Question