**Preface**Some people will have observed the different typeface I generally use on the maths forum. A lot of people will also have noticed how Jamon directly types "maths" into the forum as well. The software that enables this to be used is called LaTeX.

There are many uses for LaTeX. Its functions are so wide ranged that some have even used it to build their own resumes! But for the purpose of this post, I will centralise it on how it can be used to type in a proper, maths formatting.

I started using LaTeX via

**Daum Equation Editor**. You can use this software to plug in maths equations as well. However, be careful if you do this - Daum inserts a ton of unnecessary space bars into its command window and ATARnotes' LaTeX package can't read it sometimes! If you do so, there may be a need to open up Microsoft Word, replace space bars with nothing (blank).

To use this guide, compare the given code to the output.

~~Warning: It appears that when the CODE command is used under the SPOILER tags, the entire code is not displayed and you have to scroll down the code.~~ Edit: I've decided to remove the spoiler tags because readability is probably more important. I may add more colour coding later.(Interestingly enough, I have also noted a set of resources in the VCE maths section. However, there's no point just copying and pasting that here.)

**LaTeX Fundamentals***Using LaTeX*Much like typing in bold font on a forum, to commence usage of LaTeX you must wrap your text around the corresponding tags. On ATARnotes (and a lot of other forums typically), this is done so using:

`[tex]Your LaTeX script goes here [/tex]`

***NEW** Multiple LaTeX formats*Following a forum update some time ago, there are also alternate ways of accessing LaTeX. Depending on which you use, you go into either text style, or display style. The text style will put your LaTeX in the same line as your text, \( \text{like this} \). To access it,

`\( Your in-line LaTeX script goes here \) `

On the other hand, the display style can be accessed the same way as above, or by using these tags instead.

`\[ Your display-style LaTeX script goes here \]`

As this is a relatively new section, whatever follows will not involve these formats.

*Fundamentals of mathematics*Typing the 10 basic Arabic numbers is done in the old fashioned way. The same goes for the operations of plus and minus.

Recall that the times sign can be written as a cross, or as a dot. The cross is shown below (dot to come). As for the (generally useless) divide sign, it also has it's own specific code. The equal sign is trivial.

`[tex]1234567890+-\times\div =[/tex]`

*Brackets (i)*The braces { } are used to enclose arguments which you will see demonstrated soon. However, every bracket (parentheses, square brackets, braces and absolute value brackets) can be interpreted by LaTeX when correctly used.

`[tex] ( ), [ ], \{ \}, | |[/tex]`

Observe that to generate the braces, a backslash needed to be inserted before it.

*Spacing*To seperate certain text from each other, LaTeX also offers commands that inputs a space between the script. There are four commands (plus a negative space) in the full package, however it seems like this forum mainly supports a small space, and a large space (which are all you need for maths really). The separation distance can be compared as I will use the letter "a" between the two space commands.

`[tex]a \, a \quad a[/tex]`

*Changing lines*The enter key does not work on LaTeX. To move down a line, you will need to use the double slash \\.

`[tex]y=2x+1 \\ 2y=4x+2[/tex]`

*Superscript (exponentiation) and subscript*Conventionally, the symbols ^ and _ have been used for superscript and subscript respectively. A similar concept still applies here. We enclose the base in an argument, then we also enclose the superscript/subscript in another argument as follows.

`[tex]y=x^3+(x+2)^2\\ S_n=\frac{n}{2}(2a+(n-1)d)[/tex]`

If you need to put more than one alphanumeric character/symbol in the superscript or subscript, you will need to enclose the entire exponent as an argument:

`[tex]x^{2x+1}\text{ v.s. }x^2x+1[/tex]`

*Fractions*Careful readers will have identified the fraction in the above partial sum of an A.P. formula. A fraction commences on the \frac command, however because you need a numerator and denominator you obviously require two arguments here.

`[tex]\frac{x^3-x}{x^2-1}=x [/tex]`

*Brackets (ii)*If you attempt to enclose fractions in brackets the ordinary way you get something unpleasant

`[tex](\frac{1}{x})[/tex]`

Fixing this up requires the \left and \right commands just before the bracket. This makes your LaTeX much neater.

`[tex]\left(\frac{1}{x}\right)[/tex]`

*Surds*Whilst fractional powers can be done by simply combining superscript with fractions, some may choose to leave their answers under a root. Indeed, the square root command allows this to be done. One may just want the ordinary square root (power of a half), or some arbitrary root. The arbitrary root is achieved by inserting that value in square brackets before the argument as follows.

`[tex]\sqrt{x}\quad \sqrt[n]{x}[/tex]`

*Ordinary text*Of course, there will be times where you don't want to type algebra but instead just an ordinary sentence! Having to go through all of that \, and \quad business just for standard text can be annoying and they can appear in unnecessary italics. The simple solution is to enclose your text in \text

`[tex]\text{Good morning!}[/tex]`

*Space*In the real LaTeX package, the space bar does nothing. For the sake of usage on ATAR Notes, a space simply allows you to separate two commands. E.g. LaTeX will get confused by something like this, followed by its proper format:

`[tex]\logx\text{ v.s. }\log x[/tex]`

Weirdly enough, if you double-space your LaTeX breaks down on ATAR Notes! Be careful not to do this.

And those are the basics! Now for some fancier stuff

**LaTeX and beautiful maths display****'Dash'**This can be extremely convenient to save a ton of writing derivatives using Leibniz's notation, but the dash is actually referred to internationally as the 'prime' symbol. This is also what LaTeX endorses. It must be used with the superscript tool to work, or the so called dash will look like any ordinary number!

`[tex]y=x^2 \\ y^\prime = 2x\\ y^{\prime\prime}=2[/tex]`

**Dots**Dots have all sorts of uses in maths. The ellipsis (three dots in a row) are typically used to show how recursion can be used to establish a general case. The central dot can be interpreted as a multiplication sign (or in extracurricular maths, it is used for the dot product of two vectors). These are ones you may need.

`[tex]\cdot \text{ for multiplication }\\ \dots , \vdots, \ddots \text{ for recursion}[/tex]`

**Exclamation point**Typically, the exclamation mark is reserved for the factorial function in maths. But there's really nothing fancy to it: it's just typed using the same ! symbol you would've grown accustomed to.

`[tex]n! = n(n-1) \dots (2)(1) [/tex]`

**Inequalities**The ordinary less than and greater signs are pretty easy to deal with. But what if you want the less/greater than and equal to signs? Or even just the unequal sign? Fortunately, LaTeX supports both. < and > can be accessed as is. ≤ and ≥ are used with the \le, \leq and \ge, \geq commands. ≠ is attained with use of \ne or \neq.

`[tex]-4x+8>0\\x<-2\\-6y\le a \\ y \ge \frac{-a}{6}\\ 0 \ne 1[/tex]`

**Greek letters**LaTeX also supports the use of Greek letters without you having to download a Greek typeface package. A Greek letter is given when you insert a backslash right before a letter such as \delta. To generate the capital letter version, retype it as \Delta instead (i.e. make the first letter a capital.)

Note, however, it does not seem as though this LaTeX package supports EVERY Greek capital letter. Observe below how some characters are NOT generated, because they actually look like the same from the English alphabet.

`\alpha \beta \gamma \delta \epsilon\\ \Alpha \Beta \Gamma \Delta \Epsilon`

The conventional \epsilon is also sometimes not favoured in contrast to this one instead:

`[tex]\varepsilon[/tex]`

**Integration**Whilst it is already convenient that LaTeX can beautifully display fractions, the beauty in it starts off in how it even has the ability to display integrals.

Integrals are generated by using the \int command. For an indefinite integral, the integrand immediately follows. For a definite integral, the superscript and subscript tools are first used to provide the boundaries of integration, before the integrand is presented

`[tex]\int x^2\,dx=\frac{x^3}{3}\\ \text{First fundamental theorem of calculus:} \\ \frac{d}{dx}\int_{a}^{b}f(t)\,dt=f(x)[/tex]`

**Logarithms**The two commands \log and \ln are used to generate a logarithm. If you wish to take the logarithm of a specific base, you may again use the subscript tool to assist you out here.

`[tex]\ln{x}=\int_{1}^{x}\frac{dx}{x}\\ \log_{2}128=7[/tex]`

**Trigonometric functions**LaTeX essentially incorporates every common trigonometric function in its database. It also allows the nth power of the trigonometric function to be typed.

The internationally accepted versions of the inverse trigonometric functions e.g. arctan(x) to replace our notation tan

^{-1}(x) is also included in this package.

To access a trigonometric function, once again do not forget the

*backslash *required.

`[tex]\cos^{2}x+\sin^2x=1 \\ \frac{d}{dx}\cot x=-\csc^{2}x\\ \tan 2\theta=\frac{2\tan \theta}{1-\tan^{2} \theta} \\ \arcsin x+\arccos x=\frac{\pi}{2}[/tex]`

Note: csc denotes cosec internationally.

**Summation**Similar to how integrals may be typed, LaTeX also supports the use of sigma notation. The command \sum functions directly the same way.

`[tex]\sum_{k=1}^{n}{k}^{2}=1^2+2^2+\dots+n^2=\frac{1}{6}n(n+1)(2n+1)[/tex]`

**Binomial coefficient**Similar to how fractions may be typed, a convenient way to automatically bring out the binomial coefficient

^{n}C

_{r} can be achieved using the \binom command

`[tex]\binom{n}{k}=\binom{n}{n-k}[/tex]`

**Limits**The limit operator actually works similar to the integration operator, however obviously there is no need to put in a superscript! To generate a limit, apply only the subscript and the actual argument. The command is \lim.

`[tex]\lim_{x \to \infty}e^{-x}=0[/tex]`

**Piecewise functions**It's quite easy to type out a function f(x) using just basics, but this isn't exactly useful when you have a piecewise function and you have multiple cases to consider. The hint is given away: Basically you need to use the cases command.

Cases are recognised via a 'begin' and 'end' set of commands. The enter key will be used in the code to make it appear more obvious.

`[tex]f(x)=`

\begin{cases}x^2 \quad x<0

\\ e^x \quad 0\le x \le 1

\\ \frac{1}{x} \quad x>1\end{cases}[/tex]

By enveloping cases as the argument to the begin command, LaTeX now knows to not swap a line for the ENTIRE input, rather only what's within the begin and end commands.

**Geometry Toolbox**Obviously, LaTeX doesn't exist to actually draw your diagrams for you... You may still have to use GeoGebra or something to actually generate your diagrams, or go for the old fashioned photos/scanner. You can, however, still use it to type geometry symbols, so it can used to formulate proofs if you're given a diagram anyway.

`[tex]\triangle \\ \angle \\ ^{\circ} \\ \equiv \\ \sim \\ \parallel \\ \perp[/tex]`

The order is essentially: Triangle, Angle, Degree*, Congruent, Similar**, Parallel, Perpendicular

* - There is no explicit degree sign; rather we use the circle tool with the superscript to generate something that looks like a degree

* - Note, this is probably not the similar to symbol that you're used to seeing.

This should cover most you need for the HSC mathematics courses! Tell me if I have dropped out anything. However, stay tuned for some more interesting stuff which will allow you to unlock much more of LaTeX's true power...

**The LaTeX CoDeX*****NEW** Omitting the braces { }*Typing the braces takes work. I get it - you have to hold down the shift and actually reach for the square brackets. It turns out that if you only wish to enclose

**one single** character (this could be a number, letter, symbol or whatever), then you can avoid it.

`[tex]\text{Comparison: }e^{x} \text{ v.s. }e^x\\ \text{Comparison: }e^{2x}\text{ v.s. }e^2x[/tex]`

Essentially, when you omit the braces, what LaTeX does is that it interprets only the

**first** character as what's to be enclosed as your argument. Braces exist for the sake of enclosing

**multiple** characters instead. The reason why this is not suggested towards new LaTeX users is simply because it's a very easy mistake to make, and also hard to spot until you've grown experienced with it. It is not at all recommended at the start, but once you've properly grown accustomed to LaTeX, it can save you a few easy seconds of typing.

*Arrows*There are a ton of arrows you can make in LaTeX. You may generate single arrows in any direction, or also use double arrows when describing forward/backwards/iff implications.

The command set for arrows is actually really simple; it is just \{direction}arrow. Use a capital first letter if you want a double arrow. If you want a long arrow, just insert "long" (or "Long" if appropriate) in front of the direction.

`[tex]\leftarrow \, \Rightarrow \, \updownarrow \, \Longleftrightarrow \, \rightleftharpoons[/tex]`

The last one is a bonus for any chemist who uses LaTeX because you can still generate the equilibrium reaction reversible arrows as well!

**Number sets**At the very least, Extension 2 students

*should* have some elementary knowledge of how to use number sets to communicate their reasoning. Number sets typically involve letters that have a double stroke to them. The \mathbb package can be used to effectively generate the double stroke. Additionally, the \in command essentially generates "that weird looking e that really just means element".

`[tex]3+4i \notin \mathbb R\quad 3+4i \in \mathbb C \\ x \in \mathbb Q \Leftrightarrow x=\frac{p}{q} \quad (p, q \in \mathbb Z, q \neq 0) [/tex]`

(For the interested - mathbb stands for "math blackboard bold")

**Aligning**The neatest handwritten maths proofs should always feature one key characteristic - the (in)equality is brought down in a perfectly vertical line. When typing up a ton of LaTeX, simply inserting the double slash by itself does not ensure that your equation signs line up properly. The align environment allows this to be possible.

The align environment is triggered in a similar way to the cases command, that is, through use of 'begin' and 'end. However, the input is align*. The asterisk is important.

The 'and' symbol (&) becomes your friend now. Where you wish to insert your alignment, place the and symbol in front of it. Changing lines works as normal with the double slash.

With each line changed, you may once again align your text.

In some proofs, you don't want to work on both LHS and RHS at once either; you just want to work on the RHS only. This is also achievable - just don't put anything in front of the and sign!

This is hard to keep up with, so here's an example from a random question I copied and pasted here.

`[tex]\begin{align*}\int\frac{\ln x}{\left(1+\ln x\right)^2}dx`

&=\int\frac{1+\ln x-1}{\left(1+\ln{x}\right)^2}dx

\\&=\int\frac{\left(1+\ln{x}\right)-x\cdot\frac{1}{x}}{\left(1+\ln x\right)^2}dx

\\&=\frac{x}{1+\ln{x}}+C\tag{reverse quotient rule}\end{align*}[/tex]

And it still looks hard to keep up with. Rest-assured though, it is not nearly as difficult as it seems.

As an extra, I added a tag in the last line. This allows you to annotate your LaTeX, which can be especially useful with your simultaneous equations.

*Stackrel*Stackrel basically allows you to insert something over a symbol. An easy example as to where this would be necessary is use of L'Hopital's rule:

`[tex]\begin{align*}\lim_{x\to 0} x \ln x&= \lim_{x\to 0}\frac{\ln x}{x^{-1}} \\ &\stackrel{\text{L'H}}{=}\lim_{x\to 0}\frac{x^{-1}}{-x^{-2}}\\ &=0\end{align*}[/tex]`

*Over/Under-brace*You may feel the need to annotate your LaTeX here and there. Some equations that you generated may not be so obvious, and stackrel may easily be inconvenient for this purpose. You can produce a brace below or above your equation/text to explain what is going on.

The superscript and subscript tools are used with the overbrace and underbrace respectively in LaTeX in a way like this example text from a question I previously answered:

`[tex]\underbrace{\int_{-5}^{5}\sqrt{25-x^2}dx}_{\text{area of a semicircle with radius 5}} `

+\overbrace{\int_{-5}^{5}x\sqrt{1-\frac{x^2}{25}}dx}^{\text{integral of an odd function}}

\\ =\frac{25\pi}{2}-0 [/tex]

*Boxes*Boxes are a nice way of emphasising certain pieces of text/math in your LaTeX. Sometimes when your audience needs to constantly refer to something and \tag{} becomes a little bit tedious to use, a box can make life easier. It turns out they're pretty straightforward to use, since all you need is the \boxed{} command.

`[tex]\text{Recall that }\boxed{7 = 6 + 1}[/tex]`

If you posted up some LaTeX, and it does not work but you can't tell what you're doing wrong, I'm happy for you to quote your own post so that one of us will look into any problems with your code.

**Extra: All the symbols you will most likely need**

Extra: Practically all the symbols in existence