0

How do I use reStructuredText (rst) directives like math in Gollum?

My Bitbucket wiki has rst files with math content, such as

:math:`1+1`

But any rst directive in Gollum renders like code. Instead it expects $1+1$ (for inline math). I can change the chars defining math code, but it won't work in Bitbucket.

user7384
  • 31
  • 4
  • I did a quick search and turned up [documentation for how to use math in Gollum](https://github.com/gollum/gollum/wiki#mathematics). I did not see anything specific for reST syntax in Gollum. – Steve Piercy Mar 17 '18 at 21:24
  • @StevePiercy yes I found that, but it's not rendered by Bitbucket. Also I have tons of content in the usual rst role for math. Even if I wrote a script to change them all, it would then not render on Bitbucket. – user7384 Mar 18 '18 at 10:15
  • I found this on [bitbucket](https://bitbucket.org/site/master/issues/5420/enable-mathjax-for-restructuredtext-files) where you can add the `math-output` option. Otherwise browse through the issue history to find some help. BitBucket's documentation of this feature is hard to find. https://bitbucket.org/site/master/issues?q=mathjax – Steve Piercy Mar 18 '18 at 11:42
  • @StevePiercy indeed I've been using it, it's part of the question. In Bitbucket I define math via math-output, but Gollum only recognises math via `$...$`. I want to be able to edit my Bitbucket locally with Gollum (to edit fast) and then use it anywhere with Bitbucket wiki hosting. – user7384 Mar 23 '18 at 10:29
  • so right now I only see how to write math for Gollum or Bitbucket, but not for both – user7384 Mar 23 '18 at 10:29

0 Answers0