orsharir / github-mathjax

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

Can not show Curly brackets #10

Closed ZhiliangWu closed 7 years ago

ZhiliangWu commented 7 years ago

I write it in markdown like $\Omega={\omega_1, ..., \omega_N}$ However, it does not show the curly bracket. Is there any trick? Thanks in advance.

orsharir commented 7 years ago

This is for LaTeX format, for which curly bracket are part of the syntax, so you'll have to escape them with slash.

ZhiliangWu commented 7 years ago

Thanks for your reply. Actually, I escaped it. The code between $$ are \Omega=\{\omega_1, ..., \omega_N\}. However, the slash before the curly bracket disappeared for some certain reason. The only way to make it to show now is to give double slash. Is it possible to improve it?

orsharir commented 7 years ago

Okay, now I understand what you mean. This is due to Github's use of backslash. You have to escape the backslash first to make it work (otherwise the single slash would show in the comment in the first place). Alternatively, you can use \lbrace and \rbrace, like so $\lbrace 1,2,3 \rbrace$.

ZhiliangWu commented 7 years ago

Great! That's really what I want! Thanks for the solution.