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

Mathematical formula support is terrible #997

Closed
6cdh opened this issue Aug 5, 2019 · 2 comments
Closed

Mathematical formula support is terrible #997

6cdh opened this issue Aug 5, 2019 · 2 comments

Comments

@6cdh
Copy link

6cdh commented Aug 5, 2019

Question

I use Katex to render Mathematical formula

$$
E[\mathrm{cost}] = \sum_{i=0}^{n}(\mathrm{depth}_T(k_i)+1)p_i + \sum_{i=0}^{n}(\mathrm{depth}_T(d_i)+1)q_i
$$

It can't be displayed correctly. In fact, it is converted to the following HTML

<p>$$
E[\mathrm{cost}] = \sum_{i=0}^{n}(\mathrm{depth}<em>T(k_i)+1)p_i + \sum</em>{i=0}^{n}(\mathrm{depth}_T(d_i)+1)q_i
$$</p>

_ was incorrectly converted to <em>

Then I switched to MathJax, the result has not changed. I use <p> to surround $$...$$ in source code to solve this problem. But it is not portable and redundant. Is there any other easy way to fix it?

Of course there are other issues, such as having to use \\\\ instead of \\ to break line, but they are easy to handle

@ehuss
Copy link
Contributor

ehuss commented Aug 8, 2019

I think these are known issues. See #400 and #662 and #651.

@6cdh
Copy link
Author

6cdh commented Aug 9, 2019

Wrapping the math equations with HTML tags seems to work only for block equations. For inline equations, this method doesn't work. If you write a*b*c, you can insert a space after * to render correctly such as a* b*c or a * b * c. Using HTML tag is ineffective.

@6cdh 6cdh closed this as completed Aug 25, 2019
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

2 participants