1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #7908 open

Enable mathjax in markdown (BB-9086)

created an issue

I think you use python markdown, don't you? Just drop this trivial extension https://github.com/mayoff/python-markdown-mathjax in your pythonpath and include the mathjax js properly configured. Very low cost with high profits, don't you think? Why just rst while the sci community is moving towards markdown in tools like knitr and the ipython notebook.

Comments (40)

  1. Mike Hughes

    I'd really like to see this feature added! reStructured text is annoying to work with and requires looking up the syntax every few sentences, I'd much rather use Markdown.

  2. K L

    This should be fairly easy to add. Just take the MathJax js and stick it into pages header. Then the regular user can just use $$...$$ notation for LaTeX in their markdown. It really has nothing to do with Markdown. It's just a transformation done in the user's browser.

    I do this in my github page Jekell blog posts.

  3. Tommaso Grassi

    Hi all, a workaround I'm using to put equations in the wiki with Markdown.
    It's not the best solution in the world, but it works.
    If you have something more effective please let me know.

    To add equations I use this online editor https://www.codecogs.com/latex/eqneditor.php

    • Prepare the equations and then select PNG, (I usually set resolution to 150dpi)
    • Then at the bottom of the page select "URL encoded" and copy the URL from the field
    • Paste the URL into this Markdown command here below
    ![alternative text](URL "some comment text")

    For example, equation x = y - Lambda will be

    ![x=y-Lambda](https://latex.codecogs.com/png.latex?%5Cdpi%7B150%7D%20x%3Dy-%5CLambda "define x")

    that will render as


  4. Avraham Adler

    Yes, but that is a user-based "pull"-type solution, and it is much more elegant (and shouldn't be that hard) to implement a Bitbucket "push"-type implementation of MathJax which would then work for everyone regardless of browser and addin.

  5. Victor Sluiter

    Please, please implement this feauture.... I'm using markdown and Mathjax with mkdocs and with pandoc. Sometimes I copy-paste stuff to our wiki, but formulas are always unreadable on bitbucket. The solution proposed by Tomasso is a workaround, but depends on 3rd parties and is very user-unfriendly when you want to edit.

  6. cbensf

    Well, GitHub doesn't render math in .md files either, nor in .rst or any format: https://github.com/github/markup/issues/897 (They do parse math in Github Pages via kramdown, and they render .ipynb notebooks which may include math.)

    GitLab renders math in .md and .asciidoc: https://docs. gitlab.com/ee/user/markdown.html#math (implemeted in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8003) The $x$ inline syntax they used is clever — renders as $x$ in parsers that don't understand it — but alas different from anything else out there (survey of syntaxes out there: https://github.com/cben/ mathdown/wiki/math-in-markdown)

  7. Log in to comment