AusDevs Wiki

Wiki LaTeX Demo

This wiki uses KaTeX\KaTeX for rendering LaTeX code. Visit this page to see what LaTeX commands are supported, and check our KaTeX configuration file for the custom macros we use.

To see how the various examples below are implemented, check the source code of the page here.

You can add inline LaTeX code like a2+b2=c2a^2 + b^2 = c^2. Typing out symbols like xx and β\beta can be very helpful for consistency in the document. Though sometimes, you can also just write them out “normally” like x and β.

You can also render “display-style” equations using the DisplayLatex component:

x=b±b24ac2a x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}

We can also tag and reference equations. Notice the (1) over at the right of the equation below. This came from the \tag command. Also, use the Eqref component to reference your equations like this: (1)

cn=1PP2P2f(x)ei2πnPxdx(1) c_n = \frac{1}{P} \int_{-\frac{P}{2}}^{\frac{P}{2}} f \parens{x} e^{-i 2 \pi \frac{n}{P} x} \, dx \tag{1}

However, DisplayLatex isn’t ideal if you need to write out multiple lines. For multiple unaligned lines, you’ll need the GatherLatex component. Note that each line ends with a double-backslash (\\):

xndx=xn+1n+1+C(n1)sinxdx=cosx+Cdxx2+a2=sinh1(xa)+C=ln(x+x2+a2)+C\begin{gather*} \int x^n \, dx = \frac{x^{n + 1}}{n + 1} + C \quad \parens{n \ne -1} \\ \int \sin x \, dx = - \cos x + C \tag{ayy} \\ \int \frac{dx}{\sqrt{x^2 + a^2}} = \sinh^{-1} \parens{\frac{x}{a}} + C = \ln \parens{x + \sqrt{x^2 + a^2}} + C' \tag{lmao} \end{gather*}

For multiple aligned lines, you’ll need the AlignLatex component. Note the ampersand symbols & for the point of alignment:

f(x)=f(a)+f(a)1!(xa)+f(a)2!(xa)2+f(a)3!(xa)3+=n=0f(n)(a)n!(xa)n\begin{align*} f \parens{x} &= f \parens{a} + \frac{f' \parens{a}}{1!} \parens{x - a} + \frac{f'' \parens{a}}{2!} \parens{x - a}^2 + \frac{f''' \parens{a}}{3!} \parens{x - a}^3 + \cdots \\ &= \sum_{n = 0}^\infty \frac{f^\parens{n} \parens{a}}{n!} \parens{x - a}^n \end{align*}

And that’s all there is to know about rendering LaTeX on this wiki! For a more in-depth guide on LaTeX itself, this Wikibooks article can be a good start.