orsharir / github-mathjax

Chrome extension for rendering LaTeX equations in GitHub with MathJax
Other
153 stars 49 forks source link

cases environment doesn't render #4

Closed IreneCrisologo closed 7 years ago

IreneCrisologo commented 7 years ago

When i'm using the cases environment, it just shows the raw equation snippet.

PS. This extension was suggested in this thread.

orsharir commented 7 years ago

Hey,

What exactly is your issue? The cases environment is working fine for me, with the minor caveat that you have to use \cr instead of a double slash for separating cases.

Here's a working example: $f(x) = \begin{cases}a & x < c \cr b & x \ge c\end{cases}$ and its source:

f(x) = \begin{cases}a & x < c \cr b & x \ge c\end{cases}

And thank you for the reference, I wasn't aware.

orsharir commented 7 years ago

Closing the issue. Just an update for future reference, the issue with double slash is that due to Github's post-processing, double slash simply outputs a single slash, so you'd have to use four slashes to produce a double slash in your final post. Here's an example:

Rendered equation: $f(x) = \begin{cases}a & x < c \\ b & x \ge c\end{cases}$ Code:

f(x) = \begin{cases}a & x < c \\\\ b & x \ge c\end{cases}