Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:formulas [2019/03/18 00:32] – [Table] ttzhouwiki:formulas [2019/06/03 01:12] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Formulas ====== ====== Formulas ======
-The functionality is provided by [[doku>plugin:mathpublish| Mathpublish plugin]]. 
  
-The followings are syntax defined for different formulas.+The functionality is provided by [[doku>plugin:mathjax|MathJax Plugin]].
  
-===== Typical commands =====+<alert info>Use [[https://www.codecogs.com/latex/eqneditor.php|LaTeX Equation maker]] if you don't know how to write Latex codes.</alert>
  
-| ''%%<m>x+y</m>%%''   | <m>x+y</m>   | 
-| ''%%<m>x-y</m>%%''   | <m>x-y</m>   | 
-| ''%%<m>x*y</m>%%''   | <m>x*y</m>   | 
-| ''%%<m>x/y</m>%%''   | <m>x/y</m>   | 
-| ''%%<m>x^y</m>%%''   | <m>x^y</m>   | 
-| ''%%<m>x_y</m>%%''   | <m>x_y</m>   | 
-| ''%%<m>x<>y</m>%%''  | <m>x<>y</m>  | 
-| ''%%<m>x>y</m>%%''   | <m>x>y</m>   | 
-| ''%%<m>x>=y</m>%%''  | <m>x>=y</m>  | 
-| ''%%<m>x<y</m>%%''   | <m>x<y</m>   | 
-| ''%%<m>x<=y</m>%%''  | <m>x<=y</m>  | 
  
-===== Parenthesis =====+===== Inline formulas =====
  
-^ Code ^ Output ^ Description ^ +Simply place LaTex codes in ''%%<m> ...... </m>%%'' or ''%%\%%( ...... %%\%%)'' to render inline formulas.
-''%%<m>(x+y)</m>%%''  | <m>(x+y)</m>  | Visible | +
-''%%<m>{x+y}</m>%%''  | <m>{x+y}</m>  | Invisible |+
  
-===== Space ===== +<alert info>Use [[https://www.codecogs.com/latex/eqneditor.php|LaTeX Equation maker]] if you don't know how to write Latex codes.</alert> 
-^ Code                ^ Output      ^ Description + 
-''%%<m>a~b</m>%%''  | <m>a~b</m | Space        |+For example, 
 + 
 +<code> 
 +\(E=MC^2\), equation in German-born physicist Albert Einstein’s theory of special relativity ...... 
 +</code> 
 +or 
 +<code> 
 +<m>E=MC^2</m>, equation in German-born physicist Albert Einstein’s theory of special relativity ...... 
 +</code> 
 + 
 +The above will be rendered as: 
 + 
 +<m>E=MC^2</m>, equation in German-born physicist Albert Einstein’s theory of special relativity ...... 
 + 
 +===== Display Math ===== 
 +Wrap LaTex codes in ''%%<math...... </math>%%'' or ''%%\%%[ ...... %%\%%]'' to display math formulas on its own line: 
 +<alert info>Use [[https://www.codecogs.com/latex/eqneditor.php|LaTeX Equation maker]] if you don't know how to write Latex codes.</alert> 
 + 
 +<code> 
 +\[ \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \] 
 +</code> 
 +or 
 +<code> 
 +<math> \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] </math> 
 +</code> 
 + 
 +The above will be rendered as: 
 + 
 +<math> \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] </math> 
 + 
 +A wide range of math environments will work as well: 
 + 
 +<code> 
 +\begin{align*} 
 +e^x & = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots \\ 
 +    & = \sum_{n\geq 0} \frac{x^n}{n!} 
 +\end{align*} 
 +</code> 
 + 
 +\begin{align*} 
 +e^x & = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots \\ 
 +    & = \sum_{n\geq 0} \frac{x^n}{n!} 
 +\end{align*}