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

Math rendering #13

Open
sp-droid opened this issue Jan 6, 2023 · 2 comments
Open

Math rendering #13

sp-droid opened this issue Jan 6, 2023 · 2 comments

Comments

@sp-droid
Copy link

sp-droid commented Jan 6, 2023

Why isn't this equation rendering?

$$ \Large \mathbf{\ddot{r}} = -\upsilon \phi _EC_R\frac{A}{m}\mathbf{\widehat{r}} \hspace{2mm};\hspace{2mm} \phi _E = \phi 0\left ( \frac{R{sun}}{r{sun}} \right )^2 \hspace{2mm};\hspace{2mm} \phi 0 = \sigma T{sun}^4 $$

Other equations work fine

@sp-droid
Copy link
Author

sp-droid commented Jan 6, 2023

The issue comes from what works fine on Latex but doesn't on revealJs. Placing an underscore directly after a normal letter like T, before a multiple symbol subscript doesn't work, we have to leave a space in between.
Like this: T _{sun}
Not like this: T_{sun}

This doesn't happen with every equation, which could have to do with the fact that i used HTML spacers before and after the ";" in this eq

@sp-droid sp-droid closed this as completed Jan 6, 2023
@dadoomer
Copy link
Owner

dadoomer commented Jan 6, 2023

Thanks for reporting this error and the solution you found. I've ran into similar problems, and I too think these are quirks of the math rendering library used by Reveal.

As of today, Reveal can change which library is used for math rendering (https://revealjs.com/math/#typesetting-libraries). I think we should provide a way to choose which library will be used. Something like this:

[comment]: # (Values should be one of 'katex', 'mathjax2', 'mathjax3'.)
[comment]: # (MATH_RENDERING = 'katex')

(So it's an option of markdown-slides which determines how the Reveal.initialize call is made).

I'm reopening this issue until I (or somebody else) implements this.

@dadoomer dadoomer reopened this Jan 6, 2023
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