LaTeX-Old-Version/C2/Mathematical-Typesetting/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:00 Welcome to this tutorial on basic mathematics typesetting using Latex.
00:08 Notice 3 windows – 'Maths.tec' is a source file.
00:13 The second window is used to compile this file.
00:16 The output file 'Maths.pdf' is in the pdf browser.
00:22 This browser shows the latest version of the pdf file.
00:28 Let us start with Greek symbols that are used in mathematics.
00:32 We have to tell latex that we are writing mathematical expressions with a dollar sign.
00:38 For example, we create alpha using dollar alpha.
00:52 On compiling, we get alpha.
01:02 Similarly we write beta, gamma, delta and so on. Let’s see what happens when we compile this.
01:25 One can get the complete list of such symbols from standard textbooks on latex or from the internet.
01:34 We will next take up the concept of spaces in mathematical expressions.
01:41 Before we do this, let’s delete these. Compile the system.
01:58 How do we generate alpha-a?
02:03 Let us try alpha-a, that is we want to generate product of alpha and a. Let us try alpha-a.
02:25 Latex complains that alpha-a is an undefined control sequence.
02:36 It says that it does not understand this command. This is solved by allowing the space in the source file and ignoring it in the output. Let’s first exit this. Compile it again. Says 'product of alpha and a is alpha-a'.
03:03 Thus we see that spaces separate commands in the source file. These spaces do not appear in the output.
03:14 What do we do if we want to introduce spaces in the output?
03:19 We have to explicitly tell Latex. For example, alpha reverse slash space a, compile it. See that leaves a space here.
03:50 We can introduce different lengths of spaces. For example, let’s go to the next line.
04:08 'quad-a', here's the space.
04:20 alpha-q-qad-a leaves a larger space.
04:32 We can combine these commands.
04:45 See it’s bigger.
04:52 We can also use the command hspace to give even larger space.
05:15 By the way, why do we have the first line indented here? It is because of the beginning of the paragraph.
05:23 Let us now shift this over here.
05:40 Okay. Now I want to show how to create a smaller space.
05:50 So, it is done by, slash comma a.
06:02 See this here. The last one has smaller space created by slash comma command.
06:18 Now we will look at the change in font while going from text mode to mathematical mode.
06:24 In fact it is clear from here, note that we have ‘a’ here as well as here on output. Though we have this 'a' here but if you look at this, this 'a', the font of 'a' is different.
06:44 This is solved by writing this 'a' also inside dollar symbol.
06:59 See this now, now this font and this font are identical.
07:05 Not keeping the font of variables identical is a common mistake made by beginners of latex.
07:14 We need to use dollar symbol for minus sign also.
07:19 For this, let’s get rid of these, compile this.
07:34 Alright! Supposing we write, 'negative of alpha-a is minus-alpha-a'.
07:51 Let's see what happens when you type this. Compile this.
07:57 Notice that the minus sign appears as a small dash here, a small dash here.
08:07 It is solved by taking the minus sign inside the dollar.
08:13 In this case, we write the minus sign here, inside the dollar sign.
08:22 In fact, for comparison purposes, let us keep this here and make a copy of this here with minus sign here.
08:42 See what happens, see the difference between this minus sign and this minus sign. This minus sign is within the dollar sign. This is another common mistake made by beginners of Latex.
08:59 This is what is required in mathematical symbols. This dash is not to be used.
09:07 Next we would like to explain the 'frac' command that is used to create fractions.
09:18 Let's compile this.
09:29 'frac a b', it generates this. 'a by b'.
09:44 Note that 'a' and 'b' appear in small size here, for example, 'a by b' is created by.
10:08 Look at the size of 'a' and 'b' here and the size of 'a by b'.
10:13 The command 'frac' is terminated by a space. It looks for two arguments.
10:24 The first argument of 'a' is taken as the numerator and the second argument 'b' is taken as the denominator.
10:32 It follows that 'frac a b' here, without the space here, will also give the same answer.
10:45 It has given the same answer.
10:50 The space between 'a' and 'b' does not matter.
10:54 What if we want to create a b by c d.
11:01 In Latex, the arguments are enclosed by braces. For example, let’s put dollar frac a b by c d.
11:19 Here it is. 'ab by cd' is here.
11:25 All the entries within the braces are taken as a single argument. As a result one can enter any complicated expression within the braces.
11:34 For example, frac ab then here 1+ frac cd by ef. Close this.
12:02 Look at this here.
12:07 We have created this more complicated expression ab divided by 1+ cd by ef.
12:15 What this command says is that the first argument of ab should come in the numerator. The second argument which will go in the denominator is 1+ cd by ef.
12:28 Using this feature, it is possible to effortlessly typeset even complicated expressions.
12:36 Now we will look at subscripts and superscripts. Let’s delete this.
12:46 'x' underscore 'a' creates 'x of a'.
12:59 The size of 'a' gets automatically reduced to an appropriate level.
13:04 What about 'x' underscore 'ab'? So let’s do this. 'x', 'ab', put a dollar sign.
13:21 If we expect 'x sub ab' we are disappointed, we only obtained 'x sub a b'. The reason is that the subscript command expects only one argument. 'a' is taken as this argument. So, if we want the product 'ab' to come as the subscript we need to enclose it in braces. For example, we have to put this entire thing in braces which has happened here.
14:00 Superscripts are created by the caret or by the up arrow symbol. For example- if you want to create 'x' to the power 3, you will write: x up arrow 3.
14:22 In normal editors it will appear like this, x up arrow 3. We enclose it with a dollar, compile it to get x to the power 3.
14:43 Once again, using braces we can produce complicated expressions involving subscripts and superscripts.
14:50 For example, x to the power 3, to the power a, to the power 2.5
15:12 produces x to the power 3 times this whole thing.
15:21 Alright, now, if we didn’t want this three to come, we have to delete this.
15:35 Okay, now we see that 'x' to the power 'a' to the power 2.5. And we can also add a subscript to this, subscript, beta, co-subscript is ‘ce’, closes this subscript.
15:58 Next level, dollar sign.
16:06 So, it has come here.
16:09 x to the power, a to the power 2.5, subscript beta, co-subscript is ce.
16:18 Let us now look at some common symbols.
16:23 Let's compile this. Start with a clean slate.
16:28 a equals b, a not equal to b, See this. Not equal to b.
16:43 Go to the next line. a greater than b, a greater or equal to b, a greater greater than b.
17:01 See what happens. a greater than b, greater than or equal to b, much greater than b.
17:12 Similarly for less than. Less than b. a less than or equal to b, a less than less than b.
17:31 See this, less than or equal to, much less than b.
17:37 'a' right arrow b, a left arrow b, a right arrow b. Right arrow, left arrow, left right arrow.
18:06 Let’s add some more. 'a' times 'b'.
18:17 let’s see what happens.
18:21 'a' times 'b' is here. 'a' plus c-dots plus b, 'a' comma l-dots comma b.
18:48 Okay, c-dots means the dots come in the center, l-dots result in the dots coming in the bottom.
18:58 Similarly it is possible to create v-dots as well as d-dots.
19:05 One can create infinity using the command, -i-n-f-t-y , infinity. See the symbol.
19:17 It is possible to create ‘sum’ command.
19:28 See the ‘sum’ command. Summation symbol.
19:33 We can add subscript and superscript to this.
19:38 'i' equals 1, up arrow 100 which is the superscript. There it is. 'i' equals 1 through 100.
19:52 We can also create ‘product’.
20:01 See this pie symbol. We can create integral.
20:10 And with subscript, beta to the power 2.
20:27 Integral, unintegral subscript a, superscript beta square.
20:38 Alright, next we will move onto Matrices.
20:43 First we will remove all this. Compile this and start with a clean slate.
20:51 For this purpose, we will need the command ‘use package a-m-s-math'.
21:07 This package defines extra commands, some of which we will use now.
21:15 The ampersand, that is the 'and' symbol, is used to separate the columns.
21:21 How do we create a matrix? We begin, matrix, a, b, end matrix. You put the dollar sign.
21:43 See this 'a b'.
21:46 Now suppose, we want to add a second row to this. It is created by a reverse slash, two reverse slash. The rows are separated by two reverse slashes. So we will say c, d, e. There will be three entries in the second row.
22:10 Okay, you’ve got this c, d, e.
22:15 It is also possible to re-write it in this fashion. First row, second row, third row. The effect is the same.
22:32 Supposing we put p-matrix here.
22:43 What we get is this.
22:46 Let’s put b-matrix.
22:55 See this here.
22:59 More complicated matrices can be created as follows.
23:04 So, let's get rid of this.
23:09 I have predefined a command here. Let me copy this and paste this.
23:18 This didn’t appear in the previous compilation because it was below this end document. Whatever is below this end document gets ignored.
23:29 So I have created a more complicated one. There are four rows. The first row says a, b up to z. Second row says a-square, b-square up to z-square. Third row shows only v-dots. The last row has this.
23:51 In general, latex commands are case sensitive. For example, if I change this to capital B, see what happens here.
24:12 This produces a different result.
24:15 In general, most built-in commands of latex are in lower case only without upper case equivalents.
24:21 Those who use latex in Windows operating system should remember this.
24:27 This brings us to the end of this tutorial.
24:30 Beginners of latex should compile after each and every change and ensure that the changes they have made are acceptable.
24:39 Thanks of listening to this tutorial, This is Kannan Moudgalya signing off. Good bye.

Contributors and Content Editors

Minal, Nancyvarkey, PoojaMoolya, Pratik kamble, Sandhya.np14