Enable MathJax for ReStructuredText files. (BB-6684)

Issue #5420 resolved
Michael Forbes
created an issue

Could the --math-output option please be enabled for the ReStructuredText interpreter so that MathJax output is supported in the README.rst and similar ReST files. This would be extremely useful for documenting project code on the project overview page.


Comments (30)

  1. Michael Forbes reporter

    Sorry for the noise, but this should be a simple fix since docutils already supports MathJax. Please let us know if this is going to happen or if we need to take math-related projects to github.

    Thanks, Michael.

  2. Michael Forbes reporter

    Is there anything I can do to help get this working quickly? It would be extremely useful, and as an hg user, there is non-trivial inertia for a github migration.

    Thanks, Michael.

  3. Dominique Orban

    Github doesn't allow you to display math using mathjax in a project's README if it's in Markdown (because they use the Sundown library I believe). Do they really allow it in Restructured Text??? I was browsing here because I'm frustrated that Github won't let me display math. Not even in the project pages if they're auto-generated.

  4. Michael Forbes reporter

    Hmm. I could have sworn that this was enabled at some point, but it looks now like github it not an option either. I really hope someone at bitbucket picks this up as it would be extremely useful for some users.

  5. Matthew Knepley

    Yes, this would be the opportunity to beat the crap out of GitHub. These issues have been open on both sites for a long time, and there has been considerable wailing and gnashing of teeth on the science groups. Is this really that hard?

  6. Michael Forbes reporter

    Thanks: That is great!

    The only issue I see so far is that the style somehow causes numbers and a few symbols (like sqrt signs, =, etc.) to be black, while some parts are coloured. I traced the coloring to the following style: .mo { color: #099 } /* Literal.Number.Oct */ in one of the stylesheets... not exactly sure why this is being applied to things like equal signs. (See for example https://bitbucket.org/mforbes/paper_dvrvsho).

    Should I open a new issue for this?

  7. Vladimir Zverev

    MathJax in *.rst not rendered. First noticed it a week ago. I'm able to reproduce this behavior on Win7 with Chrome, Firefox, IE (10,11), Opera and on Ubuntu 14.04 with Firefox (v 30.0)

  8. Michael Frauenholtz staff

    Hi @Daniel Mahler

    Sorry about that. From what I can see, it looks like we are rendering README.rst files as plain text on the repository overview page. Also, when navigating to an .rst file in the source browser, MathJax only renders properly for a README in the directory view, but not the actual file. I'll try to get that fixed up soon. Is there anywhere else that isn't working for you?

  9. Michael Frauenholtz staff

    This is fixed again now for the source view.

    For the repository overview, we are going to reduce how strictly we parse reStructuredText READMEs. You will be less likely to have a rendering error that causes us to show your README as plain text. We will roll this out some time next week.


  10. Daniel Wegmann

    We are having the issue that equations are not rendered in public wikis without being logged in. To be specific: equations render properly in a public wiki if the user is logged in, regardless of whether the user has write or admin access to the wiki. However, equations do not render for visitors without being logged in.

    As illustration, I created a single wiki page at https://bitbucket.org/phaentu/urns/wiki/Home. To replicate out issue check out this page when logged in, log out and check the page again.

    Thanks a lot, Daniel

  11. Log in to comment