Learning to Edit |
The purpose of this page is allow community members to learn how to include equations in their discussions and pages. If you're looking for basic comment and discussion editing (devil's advocate and toy problem fonts), go to the Text formatting rules. In the WikiIn the wiki, you can use the basic LaTeX environmental delimiters: backslash then ( to start and ) to end inline equations and double dollar signs or backslash then [ to start and ] to end for standalone equations. If you put the equation in its own paragraph (marked by a blank line above and below) you can put curly brackets on the outsides of the dollar signs to support equation labeling and references. In the WordPress CommentsIf you'd like to add an equation to a WordPress comment, you'll need to use doubled backslashes and reload the page for inline comments, and double dollar signs on their own line to display standalone centered equations. The editor supports LaTeX input via MathJax, so inline, standalone and labeled equations can be displayed. References
What Not To DoMake sure you don't use HTML markup as part of your equations, since the HTML parser sees the text before MathJax can get to it: HTML vs. Tex How To Get Equations In Your ContentEdit this page to see the raw text used in the wiki to generate the equations, but please do not change its content. Using a backslash and round parentheses to bracket the LaTeX markup If you want to generate that equation as a standalone equation, use double dollar signs: $$ \sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6} $$ or use square brackets with backslashes in front of them: \[ \sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6} \] Equation labeling example:In Equation \eqref{eq:gamma} below I will define a famous special function. {$$ \label{eq:gamma} \Gamma(z) = \int_0^{\infty} t^{z-1} e^{-t} dt $$} Equation \eqref{eq:gamma} defines the \( \Gamma \) (Gamma) function, an extension of the factorial function. Note that while curly brackets around the dollar signs that generate the labeled standalone equation are necessary for the labeling to work, they are not necessary for the unlabeled standalone equations. If you choose to use curly brackets with your standalone unlabeled equations, make sure you put an extra blank line on either side: {$$ x=\frac{a}{b+2} $$} |