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.

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 = 
  X_{31} & \mbox{if }Y_1 Y_2 \mbox{ >  0} \\\
  X_{32} & \mbox{if }Y_1 Y_2 \mbox{ \le 0} 
share|improve this question

2 Answers 2

up vote 6 down vote accepted
  • 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{...}.

share|improve this answer
Beat me to it! As the question is about MathJaX, the first of these seems the most likely - though I would recommend that the second and fourth \mboxs not be \mboxs at all but simply Y_1 Y_1 \le 0. –  Loop Space Aug 4 '10 at 18:01
Btw. in normal LaTeX I would use \text instead of \mbox with amsmath. –  Stefan Kottwitz Aug 4 '10 at 18:06
I would actually typeset this as follows: $X_3 = \begin{cases} X_{31} & \text{if $Y_1 Y_2 > 0$} \ X_{32} & \text{if $Y_1 Y_2 \le 0$} \end{cases}$ (Yes, the \text contains math.) –  JeffE Aug 5 '10 at 5:30

You need to use the math mode for math symbols; remove extra mbox commands: $ X_3 = \begin{cases} X_{31} & \mbox{if }Y_1 Y_2 > 0 \\ X_{32} & \mbox{if }Y_1 Y_2 \le 0 \end{cases}$

share|improve this answer

Your Answer


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