Farama-Foundation / Gymnasium

An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
https://gymnasium.farama.org
MIT License
7.14k stars 793 forks source link

[Bug Report] [documentation] The LaTeX math is not rendering properly (`$$`) #820

Closed Kallinteris-Andreas closed 10 months ago

Kallinteris-Andreas commented 10 months ago

Describe the bug

example: https://gymnasium.farama.org/main/environments/mujoco/ant/#rewards image

Code example

No response

System info

No response

Additional context

There was a discord thread about that https://discord.com/channels/961771112864313344/1007727212042129409/1133757126808969216

Checklist

pseudo-rnd-thoughts commented 10 months ago

Looking around the Box documentation has properly rendering maths here which uses "math:equation" style. However if I change the Ant documentation to use this style (regenerated the markdown) then build the website again locally and it doesn't apply mathjax, it is just "math:equation".

I suspect that the difference is that sphinx autocode is adding the maths rendering while the markdown to HTML is not.

I found this solution https://github.com/readthedocs/recommonmark/issues/133 but it didn't work either. Also I added 'sphinx.ext.mathjax' to the conf.py and nothing changed either

@mgoulao Any ideas?

Kallinteris-Andreas commented 10 months ago

Here is a fun fact, I found there are 50+ flavors for Markdown https://github.com/commonmark/commonmark-spec/wiki/Markdown-Flavors

This appears to work with python markdown:

{math} `2^2 + 3 = 7`

mgoulao commented 10 months ago

We use MyST as the Markdown parser. I think the problem is now fixed from the sphinx theme side (Celshast), so no need to merge #843 .

Kallinteris-Andreas commented 10 months ago

@mgoulao, but it is not working see https://gymnasium.farama.org/main/environments/mujoco/ant/#rewards

mgoulao commented 10 months ago

I know, we need to wait for the next commit to see if the fix worked

pseudo-rnd-thoughts commented 10 months ago

Any update on this?

Kallinteris-Andreas commented 10 months ago

Appears to be fixed https://gymnasium.farama.org/main/environments/mujoco/ant/#rewards

Thanks! @mgoulao