Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with <em> block #19

Open
remilepriol opened this issue Feb 27, 2018 · 0 comments
Open

Problem with <em> block #19

remilepriol opened this issue Feb 27, 2018 · 0 comments

Comments

@remilepriol
Copy link

Some of my equations won't be rendered by MathJax for a very simple reason.

I have the following latex formula:

$$n (D(\alpha^+) - D(\alpha)) 
\geq s_i \underbrace{ \big [ \phi(-A_i^Tw) + \phi^*(\alpha_i) + w^T A_i \alpha_i \big ] }_{ \textrm{Fenchel gap}} + s_i \bigg ( \frac{\gamma(1-s_i)}{2} - \frac{s_i \|A_i\|^2_{D\rightarrow D'} }{2 \lambda n} \bigg ) \| \beta_i - \alpha_i \|^2_D$$

It first gets rendered by Github Markdown creating the following HTML code

<p>
    $$n (D(\alpha^+) - D(\alpha)) \geq s_i \underbrace{ \big [ \phi(-A_i^Tw) + \phi^*(\alpha_i) + w^T A_i \alpha_i \big ] }
    <em>
        { \textrm{Fenchel gap}} + s_i \bigg ( \frac{\gamma(1-s_i)}{2} - \frac{s_i |A_i|^2
    </em>
    {D\rightarrow D'} }{2 \lambda n} \bigg ) | \beta_i - \alpha_i |^2_D$$
</p>

MathJax is then unable to process it because the original code has been broken in two parts by the <em> block. There are probably many more problems created by this separate processing of the markdown first and the latex code second. Any idea for a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant