How to show math equations in general github's markdown(not github's blog)

后端 未结 10 1506
Happy的楠姐
Happy的楠姐 2020-11-29 14:36

After investigating, I\'ve found mathjax can do this. But when I write some example in my markdown file, it doesn\'t show the correct equations:

I have added this in

10条回答
  •  眼角桃花
    2020-11-29 15:29

    I use the below mentioned process to convert equations to markdown. This works very well for me. Its very simple!!

    Let's say, I want to represent matrix multiplication equation

    Step 1:

    Get the script for your formulae from here - https://csrgxtu.github.io/2015/03/20/Writing-Mathematic-Fomulars-in-Markdown/

    My example: I wanted to represent Z(i,j)=X(i,k) * Y(k, j); k=1 to n into a summation formulae.



    Referencing the website, the script needed was => Z_i_j=\sum_{k=1}^{10} X_i_k * Y_k_j

    Step 2:

    Use URL encoder - https://www.urlencoder.org/ to convert the script to a valid url

    My example:

    Step 3:

    Use this website to generate the image by copy-pasting the output from Step 2 in the "eq" request parameter - http://www.sciweavers.org/tex2img.php?eq=paste-output-here&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=

    - My example:
    http://www.sciweavers.org/tex2img.php?eq=Z_i_j=\sum_{k=1}^{10}%20X_i_k%20*%20Y_k_j&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=

    Step 4:

    Reference image using markdown syntax - ![alt text](enter url here)

    - Copy this in your markdown and you are good to go:

    ![Z(i,j)=X(i,k) * Y(k, j); k=1 to n](http://www.sciweavers.org/tex2img.php?eq=Z_i_j%3D%5Csum_%7Bi%3D1%7D%5E%7B10%7D%20X_i_k%20%2A%20Y_k_j&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=)

    Image below is the output of markdown. Hurray!!


提交回复
热议问题