diff --git a/source/_posts/MathJax-Example.md b/source/_posts/MathJax-Example.md new file mode 100644 index 0000000..bcfd4f6 --- /dev/null +++ b/source/_posts/MathJax-Example.md @@ -0,0 +1,68 @@ +title: MathJax Example +date: 2016-07-08 20:07:55 +categories: +- Technology +tags: +banner: /hexo-theme-icarus/gallery/math.jpg +--- + +f(a)=12πiγf(z)zadz + +## Configuration + +To enable MathJax support, just set `plugins.mathjax = true` in your theme `_config.yml` file. + +```yml +# Plugins +plugins: + ... + mathjax: true # options: true, false +``` + +For further MathJax configurations, please edit `/layout/plugin/scripts.ejs`: +```html + <% if (theme.plugins.mathjax) { %> + + + <%- js('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML') %> + <% } %> +``` + +## TeX and LaTeX input +> Please be noted that when you write Tex/LaTeX in Markdown files, you need to use escape characters to prevent certain signs from being processed by Markdown interpreter. + +#### Input +``` +When $a \ne 0$, there are two solutions to \\(ax^2 + bx + c = 0\\) and they are +$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ +``` + +#### Result +When $a \ne 0$, there are two solutions to \\(ax^2 + bx + c = 0\\) and they are +$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ + +## MathML input +> Attention: please be noted that newline characters will be transformed to `
` tag by Markdown interpreter and this will interfere with MathML notation. Please write all MathML inline. + +#### Input +``` +Whena0, there are two solutions to ax2+ bx+ c = 0 and they are +x =b±b24ac 2a . +``` + +#### Result +Whena0, there are two solutions to ax2+ bx+ c = 0 and they are +x =b±b24ac 2a . + +## AsciiMath input +> Attention: please be noted that when you write AsciiMath in Markdown files, you need to use escape characters to prevent certain signs from being processed by Markdown interpreter. + +#### Input +``` +When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are

\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`

+``` + +#### Result +When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are

\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`

\ No newline at end of file diff --git a/source/gallery/math.jpg b/source/gallery/math.jpg new file mode 100644 index 0000000..de03c80 Binary files /dev/null and b/source/gallery/math.jpg differ diff --git a/themes/icarus b/themes/icarus index d961446..7c1b6fa 160000 --- a/themes/icarus +++ b/themes/icarus @@ -1 +1 @@ -Subproject commit d961446f3fa2990a4924e6df0e767a65159f6ab8 +Subproject commit 7c1b6fa0736a7791e7995f5e9e3e8744729d526e