sample equ

There several ways to insert equations with latex format instead of image link. Last is the best!

  1. Google Chart Server
     <img src="http://chart.googleapis.com/chart?cht=tx&chl= Latex_Equation" style="border:none;">
    

    Example: <img src="http://chart.googleapis.com/chart?cht=tx&chl=\Large x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}" style="border:none;">
    The result:

    They looks good in normal markdown previews. But, there may be some size problem in different jekyll supported sites because they may be converted to images. Response is reasonable but seems invalid for some complex equations. This can be used in atom and github, but void in YoudaoNote.

  2. forkosh server
    The code with forkosh is:
     <img src="http://www.forkosh.com/mathtex.cgi? Latex_Equation">
    

    Example:
    <img src="http://www.forkosh.com/mathtex.cgi? \Large x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}"> The result:

    The function is useful only when the server is in good condition for dynamic generation of equation for us.
    I don’t use it at all.

  3. MathJax Engine
    Equations on Stackoverflow are very beautiful, which are not generated images. They used MathJax Engine. And it’s easy to add MathJax Engine in Markdown file.
     <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>
    

    Then, we can write equations in Tex format.

    1. $$equations$$ for between-line equations.
    2. \\(equation\\) for in-line equations.
      Originally, we use \(equation\) for in-line equations, however, \ is an escape character, then we use the new code in Markdown, shown below:
       $$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$  
       \\(x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\\)
      

      result:
      between-line:
      \(x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\)
      in-line: \(x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\)
      Moreover, we can edit with right click on the equation.

    Note: I can see the effect on local jekyll web page, but not remote github page, neither in YoudaoNote nor Atom with md plugin.

  4. MathJax engine in jekyll supported Github pages
    If I want to render the equations in jekyll supported sites, I don’t need to use the method in 3. Instead, I should add the following codes to to my template files in /_layout folder, as descirbed in Jekyll website.
     <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>