11.07.2015 Views

LATEX Tips - eDisk

LATEX Tips - eDisk

LATEX Tips - eDisk

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

L A TEX <strong>Tips</strong>Prof. ResslerL A TEX produces equation numbers by default; the asterisk in equation* suppressesthe number. In order to refer to an equation later you should label itand use the label; see the \label command in the source code for (1) and the\eqref command in the code for this sentence.6 Multiline EquationsL A TEX has lots of ways to write a displayed equation on several lines. I recommendusing the align environment (and align* if you do not want to printequation numbers) provided by the amsmath package and our homework classfile.For example, in a recent paper [1, p. 1403] I wrote that a nontrivial elementM = ( a bc d)(of a Hecke group) fixes the complex number(s)z = a − d ± √ (d − a) 2 + 4bc2c= a − d ± √ (a + d) 2 − 4,2cwhere I used the fact that ad − bc = 1 for the second equality. The & in thecode tells L A TEX where to align subsequent equations; one should precede eachequal sign. The \\ in the code tells L A TEX to move to a new line; note that thelast line does not end with \\.Sometimes a multiline equation has parts so long that the equation does notfit between the margins, or even the page. For example, you can see the problemwith(x + 1) 5 − 3(x + 1) 4 = (x 5 + 5x 4 + 10x 3 + 10x 2 + 5x + 1) − 3(x 4 + 4x 3 + 6x 2 + 4x + 1)= x 5 + 2x 4 − 2x 3 − 8x 2 − 7x − 2.A solution is to use the line return command \\ force L A TEX to start a new lineat the first equal sign. You must also type an additional & tell L A TEX where toput the equal signs on the line. A better way to typeset the equation above is(x + 1) 5 − 3(x + 1) 4= (x 5 + 5x 4 + 10x 3 + 10x 2 + 5x + 1) − 3(x 4 + 4x 3 + 6x 2 + 4x + 1)= x 5 + 2x 4 − 2x 3 − 8x 2 − 7x − 2.You can put the alignment character & anywhere in the line; it becomes invisiblewhen typeset.7 Justification TagsIn certain proofs we will be very explicit about the reason for each step. Oneplace for this is in a sequence of calculations given by a string of equations.3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!