| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| wiki:formulas [2019/03/21 01:40] – [Greeks] ttzhou | wiki:formulas [2019/06/03 01:12] (current) – external edit 127.0.0.1 |
|---|
| ====== Formulas ====== | ====== Formulas ====== |
| The functionality is provided by [[doku>plugin:mathpublish| Mathpublish plugin]]. | |
| |
| To toggle to the math mode, you must use the ''%%<m>...</m>%%'' tag. The math commands must be separated by a space character or surrounded by {}. | The functionality is provided by [[doku>plugin:mathjax|MathJax Plugin]]. |
| |
| <m>x in bbR \ { 1; 2 }</m> | <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 in bbR \ { 1; 2 }</m> | |
| |
| You can also size the formula by specifying the base glyph size in pixels - default value: 12. | ===== Inline formulas ===== |
| |
| <m 24>x in bbR \ { 1; 2 }</m> | Simply place LaTex codes in ''%%<m> ...... </m>%%'' or ''%%\%%( ...... %%\%%)'' to render inline formulas. |
| |
| <m 24>x in bbR \ { 1; 2 }</m> | <alert info>Use [[https://www.codecogs.com/latex/eqneditor.php|LaTeX Equation maker]] if you don't know how to write Latex codes.</alert> |
| |
| ===== Typical commands ===== | For example, |
| |
| | ''%%<m>x+y</m>%%'' | <m>x+y</m> | | <code> |
| | ''%%<m>x-y</m>%%'' | <m>x-y</m> | | \(E=MC^2\), equation in German-born physicist Albert Einstein’s theory of special relativity ...... |
| | ''%%<m>x*y</m>%%'' | <m>x*y</m> | | </code> |
| | ''%%<m>x/y</m>%%'' | <m>x/y</m> | | or |
| | ''%%<m>x^y</m>%%'' | <m>x^y</m> | | <code> |
| | ''%%<m>x_y</m>%%'' | <m>x_y</m> | | <m>E=MC^2</m>, equation in German-born physicist Albert Einstein’s theory of special relativity ...... |
| | ''%%<m>x<>y</m>%%'' | <m>x<>y</m> | | </code> |
| | ''%%<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 ===== | The above will be rendered as: |
| |
| ^ Code ^ Output ^ Description ^ | <m>E=MC^2</m>, equation in German-born physicist Albert Einstein’s theory of special relativity ...... |
| | ''%%<m>(x+y)</m>%%'' | <m>(x+y)</m> | Visible | | |
| | ''%%<m>{x+y}</m>%%'' | <m>{x+y}</m> | Invisible | | |
| |
| ===== Space ===== | ===== Display Math ===== |
| ^ Code ^ Output ^ Description ^ | Wrap LaTex codes in ''%%<math> ...... </math>%%'' or ''%%\%%[ ...... %%\%%]'' to display math formulas on its own line: |
| | ''%%<m>a~b</m>%%'' | <m>a~b</m> | 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> |
| |
| ===== Greeks ===== | <code> |
| ^ Code ^ Output ^ Description ^ | \[ \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \] |
| | ''%%<m>alpha</m>%%'' | <m>alpha</m> | Alpha | | </code> |
| | ''%%<m>beta</m>%%'' | <m>beta</m> | Beta | | or |
| | ''%%<m>gamma</m>%%'' | <m>gamma</m> | Gamma | | <code> |
| | ''%%<m>delta</m>%%'' | <m>delta</m> | Delta | | <math> \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] </math> |
| | ''%%<m>epsilon</m>%%'' | <m>epsilon</m> | Epsilon | | </code> |
| | ''%%<m>varepsilon</m>%%'' | <m>varepsilon</m> | Epsilon | | |
| | ''%%<m>zeta</m>%%'' | <m>zeta</m> | Zeta | | |
| | ''%%<m>eta</m>%%'' | <m>eta</m> | Eta | | |
| | ''%%<m>theta</m>%%'' | <m>theta</m> | Theta | | |
| | ''%%<m>vartheta</m>%%'' | <m>vartheta</m> | Theta | | |
| | ''%%<m>iota</m>%%'' | <m>iota</m> | Iota | | |
| | ''%%<m>kappa</m>%%'' | <m>kappa</m> | Kappa | | |
| | ''%%<m>lambda</m>%%'' | <m>lambda</m> | Lambda | | |
| | ''%%<m>mu</m>%%'' | <m>mu</m> | Mu | | |
| | ''%%<m>nu</m>%%'' | <m>nu</m> | Nu | | |
| | ''%%<m>xi</m>%%'' | <m>xi</m> | Xi | | |
| | ''%%<m>pi</m>%%'' | <m>pi</m> | Pi | | |
| | ''%%<m>varpi</m>%%'' | <m>varpi</m> | Varpi | | |
| | ''%%<m>rho</m>%%'' | <m>rho</m> | Rho | | |
| | ''%%<m>varrho</m>%%'' | <m>varrho</m> | Rho | | |
| | ''%%<m>sigma</m>%%'' | <m>sigma</m> | Sigma | | |
| | ''%%<m>varsigma</m>%%'' | <m>varsigma</m> | Sigma | | |
| | ''%%<m>tau</m>%%'' | <m>tau</m> | Tau | | |
| | ''%%<m>upsilon</m>%%'' | <m>upsilon</m> | Upsilon | | |
| | ''%%<m>phi</m>%%'' | <m>phi</m> | Phi | | |
| | ''%%<m>varphi</m>%%'' | <m>varphi</m> | Phi | | |
| | ''%%<m>chi</m>%%'' | <m>chi</m> | Chi | | |
| | ''%%<m>psi</m>%%'' | <m>psi</m> | Psi | | |
| | ''%%<m>omega</m>%%'' | <m>omega</m> | Omega | | |
| | ''%%<m>Gamma</m>%%'' | <m>Gamma</m> | Gamma | | |
| | ''%%<m>Lambda</m>%%'' | <m>Lambda</m> | Lambda | | |
| | ''%%<m>Sigma</m>%%'' | <m>Sigma</m> | Sigma | | |
| | ''%%<m>Psi</m>%%'' | <m>Psi</m> | Psi | | |
| | ''%%<m>Delta</m>%%'' | <m>Delta</m> | Delta | | |
| | ''%%<m>Xi</m>%%'' | <m>Xi</m> | Xi | | |
| | ''%%<m>Upsilon</m>%%'' | <m>Upsilon</m> | Upsilon | | |
| | ''%%<m>Omega</m>%%'' | <m>Omega</m> | Omega | | |
| | ''%%<m>Theta</m>%%'' | <m>Theta</m> | Theta | | |
| | ''%%<m>Pi</m>%%'' | <m>Pi</m> | Pi | | |
| | ''%%<m>Phi</m>%%'' | <m>Phi</m> | Phi | | |
| |
| ===== Symbols ===== | The above will be rendered as: |
| ^ Code ^ Output ^ Description ^ | |
| | ''%%<m>infty</m>%%'' | <m>infty</m> | Infty | | |
| | ''%%<m>in</m>%%'' | <m>in</m> | In | | |
| | ''%%<m>notin</m>%%'' | <m>notin</m> | Notin | | |
| | ''%%<m>forall</m>%%'' | <m>forall</m> | Forall | | |
| | ''%%<m>exists</m>%%'' | <m>exists</m> | Exists | | |
| | ''%%<m>notexists</m>%%'' | <m>notexists</m> | Not exists | | |
| | ''%%<m>partial</m>%%'' | <m>partial</m> | Partial | | |
| | ''%%<m>approx</m>%%'' | <m>approx</m> | Approx | | |
| | ''%%<m>pm</m>%%'' | <m>pm</m> | Pm | | |
| | ''%%<m>inter</m>%%'' | <m>inter</m> | Inter | | |
| | ''%%<m>union</m>%%'' | <m>union</m> | Union | | |
| | ''%%<m>ortho</m>%%'' | <m>ortho</m> | Ortho | | |
| | ''%%<m>parallel</m>%%'' | <m>parallel</m> | Parallel | | |
| | ''%%<m>backslash</m>%%'' | <m>backslash</m> | Backslash | | |
| | ''%%<m>prime</m>%%'' | <m>prime</m> | Prime | | |
| | ''%%<m>wedge</m>%%'' | <m>wedge</m> | Wedge | | |
| | ''%%<m>vert</m>%%'' | <m>vert</m> | Vert | | |
| | ''%%<m>lbrace</m>%%'' | <m>{</m> | Lbrace | | |
| | ''%%<m>rbrace</m>%%'' | <m>}</m> | Rbrace | | |
| | ''%%<m>circ</m>%%'' | <m>circ</m> | Circ | | |
| | ''%%<m>varnothing</m>%%'' | <m>varnothing</m> | Varnothing | | |
| | ''%%<m>subset</m>%%'' | <m>subset</m> | Subset | | |
| | ''%%<m>notsubset</m>%%'' | <m>notsubset</m> | Notsubset | | |
| | ''%%<m>cdots</m>%%'' | <m>cdots</m> | Cdots | | |
| | ''%%<m>vdots</m>%%'' | <m>vdots</m> | Vdots | | |
| | ''%%<m>ddots</m>%%'' | <m>ddots</m> | Ddots | | |
| |
| ===== Arrows ===== | <math> \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] </math> |
| ^ Code ^ Output ^ Description ^ | |
| | ''%%<m>left</m>%%'' | <m>left</m> | Left | | |
| | ''%%<m>right</m>%%'' | <m>right</m> | Right | | |
| | ''%%<m>leftright</m>%%'' | <m>leftright</m> | Left right | | |
| | ''%%<m>doubleleft</m>%%'' | <m>doubleleft</m> | Double left | | |
| | ''%%<m>doubleright</m>%%'' | <m>doubleright</m> | Double right | | |
| | ''%%<m>doubleleftright</m>%%'' | <m>doubleleftright</m> | Double left right | | |
| | ''%%<m>nearrow</m>%%'' | <m>nearrow</m> | Ne arrow | | |
| | ''%%<m>searrow</m>%%'' | <m>searrow</m> | Se arrow | | |
| |
| ===== Sets ===== | A wide range of math environments will work as well: |
| ^ Code ^ Output ^ | |
| | ''%%<m>bbR</m>%%'' | <m>bbR</m> | | |
| | ''%%<m>bbN</m>%%'' | <m>bbN</m> | | |
| | ''%%<m>bbZ</m>%%'' | <m>bbZ</m> | | |
| | ''%%<m>bbC</m>%%'' | <m>bbC</m> | | |
| |
| ===== Roots and limits ===== | <code> |
| ^ Code ^ Output ^ | \begin{align*} |
| | ''%%<m>sqrt{a}</m>%%'' | <m>sqrt{a}</m> | | e^x & = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots \\ |
| | ''%%<m>root{n}{a}</m>%%'' | <m>root{n}{a}</m> | | & = \sum_{n\geq 0} \frac{x^n}{n!} |
| | ''%%<m>lim{a}{x}</m>%%'' | <m>lim{a}{x}</m> | | \end{align*} |
| | </code> |
| |
| ===== Big operators ====== | \begin{align*} |
| ^ Code ^ Output ^ | e^x & = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots \\ |
| | ''%%<m>int{a}{b}{x}</m>%%'' | <m>int{a}{b}{x}</m> | | & = \sum_{n\geq 0} \frac{x^n}{n!} |
| | ''%%<m>doubleint{a}{b}{x}</m>%%'' | <m>doubleint{a}{b}{x}</m> | | \end{align*} |
| | ''%%<m>tripleint{a}{b}{x}</m>%%'' | <m>tripleint{a}{b}{x}</m> | | |
| | ''%%<m>oint{a}{b}{x}</m>%%'' | <m>oint{a}{b}{x}</m> | | |
| | ''%%<m>sum{a}{b}{x}</m>%%'' | <m>sum{a}{b}{x}</m> | | |
| | ''%%<m>prod{a}{b}{x}</m>%%'' | <m>prod{a}{b}{x}</m> | | |
| | ''%%<m>bigcup{a}{b}{x}</m>%%'' | <m>bigcup{a}{b}{x}</m> | | |
| | ''%%<m>bigcap{a}{b}{x}</m>%%'' | <m>bigcap{a}{b}{x}</m> | | |
| |
| ===== Delimiters ===== | |
| ^ Code ^ Output ^ | |
| | ''%%<m>delim{[}{x}{]}</m>%%'' | <m>delim{[}{x}{]}</m> | | |
| | ''%%<m>delim{]}{x}{]}</m>%%'' | <m>delim{]}{x}{]}</m> | | |
| | ''%%<m>delim{[}{x}{[}</m>%%'' | <m>delim{[}{x}{[}</m> | | |
| | ''%%<m>delim{]}{x}{[}</m>%%'' | <m>delim{]}{x}{[}</m> | | |
| | ''%%<m>delim{lbrace}{x}{rbrace}</m>%%'' | <m>delim{lbrace}{x}{rbrace}</m> | | |
| | ''%%<m>delim{|}{x}{|}</m>%%'' | <m>delim{|}{x}{|}</m> | | |
| | ''%%<m>delim{vert}{x}{vert}</m>%%'' | <m>delim{vert}{x}{vert}</m> | | |
| |
| ===== Constructions ===== | |
| ^ Code ^ Output ^ | |
| | ''%%<m>vec{express}</m>%%'' | <m>vec{express}</m> | | |
| | ''%%<m>{express}under{foo}</m>%%'' | <m>{express}under{foo}</m> | | |
| | ''%%<m>{express}over{foo}</m>%%'' | <m>{express}over{foo}</m> | | |
| | ''%%<m>overline{express}</m>%%'' | <m>overline{express}</m> | | |
| | ''%%<m>underline{express}</m>%%'' | <m>underline{express}</m> | | |
| | ''%%<m>hat{express}</m>%%'' | <m>hat{express}</m> | | |