OpenMS / OpenMS-docs

OpenMS Documentation.
https://openms.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2 stars 18 forks source link

Use markdown mathematical notations #136

Open tapaswenipathak opened 2 years ago

tapaswenipathak commented 2 years ago

Ref:

  1. [doesn't work] https://github.blog/changelog/2022-06-28-fenced-block-syntax-for-mathematical-expressions/
  2. https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions
  3. https://www.mathjax.org/

Use https://www.wolframalpha.com/ to learn more about mathematical notations:

Screenshot 2022-07-28 at 4 16 44 PM
Vedant-rai commented 2 years ago

Hi, this is my first commit to this repository. I would like to work on this issue. I am new to open-source so please let me know what changes you are expecting.

rwst commented 2 years ago

Hi, just to clarify, the 1st link you give in Ref (as "not working") is about math display on GitHub and it works fine: This sentence uses $ delimiters to show math inline: $\sqrt{3x-1}+(1+x)^2$

The problem is that you want math display on the OpenMS doc webpage not here on github so the link is actually not helpful.

Also the link to Wolfram Alpha is not helpful because, whatever they write, they will always propose their proprietary solution.

In addition to mathjax I'd recommend https://katex.org/. However, both require additional Javascript on the web site, so I think this issue is suited to beginners only when simple formulae are created using Unicode or HTML characters. If you want to have nice LaTeX formulas then SVG images or the abovementioned JS libraries are needed.

As you are using Sphinx mathjax (:math: ) should be directly supported.

rwst commented 2 years ago

Using Sphinx mathjax actually works fine, example: image

This was produced by inserting the code

:math:`a^2 + b^2 = c^2`
Telomelonia commented 1 year ago

@tapaswenipathak I have created a draft PR pls have a look at it.