Difference between revisions of "LaTeX/C2/Tables-and-Figures/English-timed"
From Script | Spoken-Tutorial
Sandhya.np14 (Talk | contribs) |
PoojaMoolya (Talk | contribs) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
|'''Time''' | |'''Time''' | ||
|'''Narration''' | |'''Narration''' | ||
+ | |||
|- | |- | ||
|00:00 | |00:00 | ||
|Welcome to this tutorial on '''Tables and Figures'''. | |Welcome to this tutorial on '''Tables and Figures'''. | ||
+ | |||
|- | |- | ||
|00:05 | |00:05 | ||
|We have two objectives in this tutorial. | |We have two objectives in this tutorial. | ||
+ | |||
|- | |- | ||
|00:08 | |00:08 | ||
− | |The first one is to explain how to create '''tables''' using the tabular environment; the second objective is to explain how to include tables in latex documents using the table environment. | + | |The first one is to explain how to create '''tables''' using the tabular environment; the second objective is to explain how to include tables in latex documents using the '''table environment'''. |
+ | |||
|- | |- | ||
|00:22 | |00:22 | ||
|A similar technique can be used to include figures also. | |A similar technique can be used to include figures also. | ||
+ | |||
|- | |- | ||
|00:27 | |00:27 | ||
|We have seen how to create the title page, | |We have seen how to create the title page, | ||
+ | |||
|- | |- | ||
|00:32 | |00:32 | ||
|this one has title, author information, and Creative Commons, copyright information as explained in the tutorial on '''equations'''. | |this one has title, author information, and Creative Commons, copyright information as explained in the tutorial on '''equations'''. | ||
+ | |||
|- | |- | ||
|00:45 | |00:45 | ||
|Today’s date appears in the last column created by this '''command'''. | |Today’s date appears in the last column created by this '''command'''. | ||
+ | |||
|- | |- | ||
|00:51 | |00:51 | ||
|Let us go to the second page. | |Let us go to the second page. | ||
+ | |||
|- | |- | ||
|00:58 | |00:58 | ||
− | | I will now explain to you, how to create this table in a step-by-step fashion. | + | |I will now explain to you, how to create this table in a step-by-step fashion. |
+ | |||
|- | |- | ||
|01:05 | |01:05 | ||
|Let us start with a clean slate. | |Let us start with a clean slate. | ||
+ | |||
|- | |- | ||
|01:08 | |01:08 | ||
|Let me delete these commands. | |Let me delete these commands. | ||
+ | |||
|- | |- | ||
|01:19 | |01:19 | ||
|I will compile this and start with a clean slate. | |I will compile this and start with a clean slate. | ||
+ | |||
|- | |- | ||
|01:29 | |01:29 | ||
− | |The tabular environment is created using '''begin tabular''' and '''end tabular''' commands. | + | |The '''tabular environment''' is created using '''begin tabular''' and '''end tabular''' commands. |
+ | |||
|- | |- | ||
|01:38 | |01:38 | ||
|Let me do that here. | |Let me do that here. | ||
+ | |||
|- | |- | ||
|02:03 | |02:03 | ||
|The ‘r r’ characters within the braces, next to the '''begin tabular''', say that there are two '''columns''' and that they are right aligned. | |The ‘r r’ characters within the braces, next to the '''begin tabular''', say that there are two '''columns''' and that they are right aligned. | ||
+ | |||
|- | |- | ||
|02:14 | |02:14 | ||
− | | In the first line, the entries are "mango" and "mixed". | + | |In the first line, the entries are "mango" and "mixed". |
+ | |||
|- | |- | ||
|02:20 | |02:20 | ||
|Two reverse-slashes indicate next line. | |Two reverse-slashes indicate next line. | ||
+ | |||
|- | |- | ||
|02:24 | |02:24 | ||
|Let me enter the next line. | |Let me enter the next line. | ||
+ | |||
|- | |- | ||
|02:28 | |02:28 | ||
|"Jackfruit". | |"Jackfruit". | ||
+ | |||
|- | |- | ||
|02:32 | |02:32 | ||
|"Kolli hills". | |"Kolli hills". | ||
+ | |||
|- | |- | ||
|02:37 | |02:37 | ||
|"Banana". | |"Banana". | ||
+ | |||
|- | |- | ||
|02:40 | |02:40 | ||
|"Green". | |"Green". | ||
+ | |||
|- | |- | ||
|02:42 | |02:42 | ||
− | |Let me end this tabular environment. | + | |Let me end this '''tabular environment'''. |
+ | |||
|- | |- | ||
|02:47 | |02:47 | ||
|Let me compile this. | |Let me compile this. | ||
+ | |||
|- | |- | ||
|02:51 | |02:51 | ||
|And, this has appeared here. | |And, this has appeared here. | ||
+ | |||
|- | |- | ||
|02:56 | |02:56 | ||
|We get the '''3 by 2 table'''. There are three rows and 2 columns. | |We get the '''3 by 2 table'''. There are three rows and 2 columns. | ||
+ | |||
|- | |- | ||
|03:02 | |03:02 | ||
|The two columns are '''right aligned''' as indicated by the 'r r' character. | |The two columns are '''right aligned''' as indicated by the 'r r' character. | ||
+ | |||
|- | |- | ||
|03:09 | |03:09 | ||
|To separate the two columns, we introduce a vertical line between the column alignment characters. | |To separate the two columns, we introduce a vertical line between the column alignment characters. | ||
+ | |||
|- | |- | ||
|03:20 | |03:20 | ||
|So, let me put that vertical line. | |So, let me put that vertical line. | ||
+ | |||
|- | |- | ||
|03:23 | |03:23 | ||
− | |'''Save''' it | + | |'''Save''' it,Compile it. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|03:28 | |03:28 | ||
|You see that a vertical line has come. | |You see that a vertical line has come. | ||
+ | |||
|- | |- | ||
|03:31 | |03:31 | ||
|If you want vertical lines at the end also, put them at appropriate places. | |If you want vertical lines at the end also, put them at appropriate places. | ||
+ | |||
|- | |- | ||
|03:42 | |03:42 | ||
| Let me put them, save them, compile them. | | Let me put them, save them, compile them. | ||
+ | |||
|- | |- | ||
|03:48 | |03:48 | ||
|So, these have come. | |So, these have come. | ||
+ | |||
|- | |- | ||
|03:50 | |03:50 | ||
|As a matter of fact, we can put more vertical lines. | |As a matter of fact, we can put more vertical lines. | ||
+ | |||
|- | |- | ||
|03:54 | |03:54 | ||
|Let me put one more vertical line at the beginning. | |Let me put one more vertical line at the beginning. | ||
+ | |||
|- | |- | ||
|04:02 | |04:02 | ||
|There you are! A second line has come. | |There you are! A second line has come. | ||
+ | |||
|- | |- | ||
|04:07 | |04:07 | ||
|See there are two vertical lines. | |See there are two vertical lines. | ||
+ | |||
|- | |- | ||
|04:11 | |04:11 | ||
|We will now try different alignments. | |We will now try different alignments. | ||
+ | |||
|- | |- | ||
|04:15 | |04:15 | ||
|Let's put a ‘c’ here to say that the second column should be '''center aligned'''. | |Let's put a ‘c’ here to say that the second column should be '''center aligned'''. | ||
+ | |||
|- | |- | ||
|04:27 | |04:27 | ||
|This is '''center aligned''' now. | |This is '''center aligned''' now. | ||
+ | |||
|- | |- | ||
|04:30 | |04:30 | ||
|Let us make the first column '''left aligned'''. | |Let us make the first column '''left aligned'''. | ||
+ | |||
|- | |- | ||
|04:34 | |04:34 | ||
|Right now, it is '''right aligned'''; let me make them '''left aligned'''. | |Right now, it is '''right aligned'''; let me make them '''left aligned'''. | ||
+ | |||
|- | |- | ||
|04:40 | |04:40 | ||
− | | 'l', | + | |'l','''Save''' |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|04:43 | |04:43 | ||
| Compile. | | Compile. | ||
+ | |||
|- | |- | ||
|04:46 | |04:46 | ||
|Now it is '''left aligned'''. | |Now it is '''left aligned'''. | ||
+ | |||
|- | |- | ||
|04:50 | |04:50 | ||
|We will now separate the rows with horizontal lines as follows. | |We will now separate the rows with horizontal lines as follows. | ||
+ | |||
|- | |- | ||
|04:56 | |04:56 | ||
− | | Let's put a '''h-line''' here. | + | |Let's put a '''h-line''' here. |
+ | |||
|- | |- | ||
|05:00 | |05:00 | ||
− | | Let us see what happens when we do that. | + | |Let us see what happens when we do that. |
+ | |||
|- | |- | ||
|05:04 | |05:04 | ||
|It puts a top line. | |It puts a top line. | ||
+ | |||
|- | |- | ||
|05:07 | |05:07 | ||
|If I put another '''h-line''' here, | |If I put another '''h-line''' here, | ||
+ | |||
|- | |- | ||
|05:16 | |05:16 | ||
− | |see a line has come | + | |see a line has come,So, let me complete this. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|05:19 | |05:19 | ||
− | | Let me put '''h-line'''. | + | |Let me put '''h-line'''. |
+ | |||
|- | |- | ||
|05:22 | |05:22 | ||
− | | Here I have to put a '''break line''' with two '''reverse slashes''' and then '''h-line'''. | + | |Here I have to put a '''break line''' with two '''reverse slashes''' and then '''h-line'''. |
+ | |||
|- | |- | ||
|05:30 | |05:30 | ||
− | | '''H-line''' begins from the beginning of the sentence. | + | |'''H-line''' begins from the beginning of the sentence. |
+ | |||
|- | |- | ||
|05:36 | |05:36 | ||
|So, now I have completed the horizontal lines. | |So, now I have completed the horizontal lines. | ||
+ | |||
|- | |- | ||
|05:42 | |05:42 | ||
|Now, let us add three more columns and one more row. | |Now, let us add three more columns and one more row. | ||
+ | |||
|- | |- | ||
|05:49 | |05:49 | ||
|So, what I do is- I come here, and 'c' , 'c', 'r'. | |So, what I do is- I come here, and 'c' , 'c', 'r'. | ||
+ | |||
|- | |- | ||
|06:01 | |06:01 | ||
|So, I have added three more columns, first two of them are '''center aligned''' the third one is '''right aligned'''. | |So, I have added three more columns, first two of them are '''center aligned''' the third one is '''right aligned'''. | ||
+ | |||
|- | |- | ||
|06:08 | |06:08 | ||
|And then here I want to say: | |And then here I want to say: | ||
+ | |||
|- | |- | ||
|06:15 | |06:15 | ||
|"fruit" | |"fruit" | ||
+ | |||
|- | |- | ||
|06:19 | |06:19 | ||
− | | "type" | + | |"type" |
+ | |||
|- | |- | ||
|06:22 | |06:22 | ||
|"number of units" | |"number of units" | ||
+ | |||
|- | |- | ||
|06:26 | |06:26 | ||
− | | "cost per unit" | + | |"cost per unit" |
+ | |||
|- | |- | ||
|06:30 | |06:30 | ||
|"cost rupees" | |"cost rupees" | ||
+ | |||
|- | |- | ||
|06:38 | |06:38 | ||
|'''h-line'''. | |'''h-line'''. | ||
+ | |||
|- | |- | ||
|06:41 | |06:41 | ||
|So, "mixed" | |So, "mixed" | ||
+ | |||
|- | |- | ||
|06:43 | |06:43 | ||
|"20" | |"20" | ||
+ | |||
|- | |- | ||
|06:45 | |06:45 | ||
|"75" rupees | |"75" rupees | ||
+ | |||
|- | |- | ||
|06:47 | |06:47 | ||
− | | "1500" rupees. | + | |"1500" rupees. |
+ | |||
|- | |- | ||
|06:51 | |06:51 | ||
|"Jackfruit" | |"Jackfruit" | ||
+ | |||
|- | |- | ||
|06:54 | |06:54 | ||
|"10" of them | |"10" of them | ||
+ | |||
|- | |- | ||
|06:57 | |06:57 | ||
|"50" rupees | |"50" rupees | ||
+ | |||
|- | |- | ||
|06:59 | |06:59 | ||
|"500" rupees. | |"500" rupees. | ||
+ | |||
|- | |- | ||
|07:01 | |07:01 | ||
− | | "Banana green" | + | |"Banana green" |
+ | |||
|- | |- | ||
|07:05 | |07:05 | ||
|"10" dozens | |"10" dozens | ||
+ | |||
|- | |- | ||
|07:07 | |07:07 | ||
|"20" rupees a dozen and "200" rupees total. | |"20" rupees a dozen and "200" rupees total. | ||
+ | |||
|- | |- | ||
|07:12 | |07:12 | ||
|So, let’s see whether we can compile this. | |So, let’s see whether we can compile this. | ||
+ | |||
|- | |- | ||
|07:20 | |07:20 | ||
− | | So, it has created the table. | + | |So, it has created the table. |
+ | |||
|- | |- | ||
|07:25 | |07:25 | ||
|See the need for '''right alignment''', this is.. so that we can add these numbers. | |See the need for '''right alignment''', this is.. so that we can add these numbers. | ||
+ | |||
|- | |- | ||
|07:34 | |07:34 | ||
|Suppose, that we want to split the columns in two. | |Suppose, that we want to split the columns in two. | ||
+ | |||
|- | |- | ||
|07:39 | |07:39 | ||
− | | For example, here these two columns have fruit details and these three have cost calculations. | + | |For example, here these two columns have fruit details and these three have cost calculations. |
+ | |||
|- | |- | ||
|07:48 | |07:48 | ||
− | | So, this is done with the help of what is known as '''multi-column command'''. | + | |So, this is done with the help of what is known as '''multi-column command'''. |
+ | |||
|- | |- | ||
|07:55 | |07:55 | ||
|Let me do it as follows. | |Let me do it as follows. | ||
+ | |||
|- | |- | ||
|07:59 | |07:59 | ||
|'''multi-column''' | |'''multi-column''' | ||
+ | |||
|- | |- | ||
|08:04 | |08:04 | ||
|take 2 | |take 2 | ||
+ | |||
|- | |- | ||
|08:06 | |08:06 | ||
− | | '''center-aligned''' | + | |'''center-aligned''' |
+ | |||
|- | |- | ||
|08:10 | |08:10 | ||
− | | '''Fruit Details'''. | + | |'''Fruit Details'''. |
+ | |||
|- | |- | ||
|08:12 | |08:12 | ||
|First two are over then I put a '''tab''' to indicate the next column. | |First two are over then I put a '''tab''' to indicate the next column. | ||
+ | |||
|- | |- | ||
|08:19 | |08:19 | ||
|Go to the next line. | |Go to the next line. | ||
+ | |||
|- | |- | ||
|08:24 | |08:24 | ||
− | | '''multi-column''', three, also to be '''center-aligned'''. | + | |'''multi-column''', three, also to be '''center-aligned'''. |
+ | |||
|- | |- | ||
|08:29 | |08:29 | ||
− | | Cost within braces – '''cost calculations''' | + | |Cost within braces – '''cost calculations''' |
+ | |||
|- | |- | ||
|08:37 | |08:37 | ||
|'''slash h-line'''. | |'''slash h-line'''. | ||
+ | |||
|- | |- | ||
|08:44 | |08:44 | ||
|So, there you are. | |So, there you are. | ||
+ | |||
|- | |- | ||
|08:46 | |08:46 | ||
|The first two have the title "Fruit details", the next three have the title "Cost calculations". | |The first two have the title "Fruit details", the next three have the title "Cost calculations". | ||
+ | |||
|- | |- | ||
|08:52 | |08:52 | ||
− | | I don’t have the vertical lines that’s because I didn’t tell latex to do that. So let’s do that. | + | |I don’t have the vertical lines that’s because I didn’t tell latex to do that. So let’s do that. |
+ | |||
|- | |- | ||
|08:59 | |08:59 | ||
− | | Here, I want two vertical lines, here I want one vertical line. | + | |Here, I want two vertical lines, here I want one vertical line. |
+ | |||
|- | |- | ||
|09:05 | |09:05 | ||
|Before this, I already have the line here, so let me just put this here. | |Before this, I already have the line here, so let me just put this here. | ||
+ | |||
|- | |- | ||
|09:11 | |09:11 | ||
|See what happens. | |See what happens. | ||
+ | |||
|- | |- | ||
|09:16 | |09:16 | ||
|So, now the vertical lines have also come. | |So, now the vertical lines have also come. | ||
+ | |||
|- | |- | ||
|09:24 | |09:24 | ||
|Because these 2 and 3 are single character '''arguments''' its possible to write them without braces. | |Because these 2 and 3 are single character '''arguments''' its possible to write them without braces. | ||
+ | |||
|- | |- | ||
|09:40 | |09:40 | ||
|Okay, same thing works. | |Okay, same thing works. | ||
+ | |||
|- | |- | ||
|09:42 | |09:42 | ||
|Sometimes it is necessary to draw horizontal lines between only a few columns. | |Sometimes it is necessary to draw horizontal lines between only a few columns. | ||
+ | |||
|- | |- | ||
|09:52 | |09:52 | ||
| So, we explain this as follows. | | So, we explain this as follows. | ||
+ | |||
|- | |- | ||
|09:54 | |09:54 | ||
|Let me split this "mango" instead of "mixed", let me call this "Malgoa" | |Let me split this "mango" instead of "mixed", let me call this "Malgoa" | ||
+ | |||
|- | |- | ||
|10:05 | |10:05 | ||
|and then "18" kilograms | |and then "18" kilograms | ||
+ | |||
|- | |- | ||
|10:13 | |10:13 | ||
|"50" kilograms. | |"50" kilograms. | ||
+ | |||
|- | |- | ||
|10:17 | |10:17 | ||
|Let me delete this. | |Let me delete this. | ||
+ | |||
|- | |- | ||
|10:23 | |10:23 | ||
− | |okay | + | |okay,And here, let me say that it is "Alfanso" |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|10:33 | |10:33 | ||
|"2" dozens | |"2" dozens | ||
+ | |||
|- | |- | ||
|10:35 | |10:35 | ||
|"300" rupees a dozen, and a total of 1500. | |"300" rupees a dozen, and a total of 1500. | ||
+ | |||
|- | |- | ||
|10:44 | |10:44 | ||
|Let’s see what happens when I '''save''' this. Compile this. | |Let’s see what happens when I '''save''' this. Compile this. | ||
+ | |||
|- | |- | ||
|10:50 | |10:50 | ||
| So, I’ve got this. What happens is, this line comes here and as well as here and I don’t want this and this. So, this is taken care of by saying instead of this horizontal line, I want a 'c' line and between the columns 2 and 4. | | So, I’ve got this. What happens is, this line comes here and as well as here and I don’t want this and this. So, this is taken care of by saying instead of this horizontal line, I want a 'c' line and between the columns 2 and 4. | ||
+ | |||
|- | |- | ||
|11:19 | |11:19 | ||
|So, I should have done this here. | |So, I should have done this here. | ||
+ | |||
|- | |- | ||
|11:22 | |11:22 | ||
|So let me put this back here. | |So let me put this back here. | ||
+ | |||
|- | |- | ||
|11:27 | |11:27 | ||
|'''H-line''' here. | |'''H-line''' here. | ||
+ | |||
|- | |- | ||
|11:30 | |11:30 | ||
|'''c-line 2 to 4'''. | |'''c-line 2 to 4'''. | ||
+ | |||
|- | |- | ||
|11:40 | |11:40 | ||
|Okay, so now I have the line between columns two and four only. | |Okay, so now I have the line between columns two and four only. | ||
+ | |||
|- | |- | ||
|11:52 | |11:52 | ||
|So, this central line has split the mangoes into two of the most popular mangoes in India. | |So, this central line has split the mangoes into two of the most popular mangoes in India. | ||
+ | |||
|- | |- | ||
|11:58 | |11:58 | ||
|We will conclude this example, conclude this '''table''' with a last row. | |We will conclude this example, conclude this '''table''' with a last row. | ||
+ | |||
|- | |- | ||
|12:04 | |12:04 | ||
|Let me total up as follows. | |Let me total up as follows. | ||
+ | |||
|- | |- | ||
|12:11 | |12:11 | ||
− | | ''' | + | |'''multi-column''' four |
+ | |||
|- | |- | ||
|12:14 | |12:14 | ||
− | | 2 vertical lines, right-aligned | + | |2 vertical lines, '''right-aligned''' |
+ | |||
|- | |- | ||
|12:20 | |12:20 | ||
|vertical separator | |vertical separator | ||
+ | |||
|- | |- | ||
|12:24 | |12:24 | ||
− | |Total cost | + | |'''Total cost''' |
+ | |||
|- | |- | ||
|12:27 | |12:27 | ||
− | | Rupees. | + | |Rupees. |
+ | |||
|- | |- | ||
|12:32 | |12:32 | ||
|Close this. | |Close this. | ||
+ | |||
|- | |- | ||
|12:35 | |12:35 | ||
|Next tab | |Next tab | ||
+ | |||
|- | |- | ||
|12:38 | |12:38 | ||
|2200 | |2200 | ||
+ | |||
|- | |- | ||
|12:42 | |12:42 | ||
− | |h-line. | + | |'''h-line'''. |
+ | |||
|- | |- | ||
|12:48 | |12:48 | ||
|So there you are. | |So there you are. | ||
+ | |||
|- | |- | ||
|12:50 | |12:50 | ||
− | |So this was the table that we started with at the beginning of this tutorial. | + | |So, this was the '''table''' that we started with at the beginning of this tutorial. |
+ | |||
|- | |- | ||
|12:59 | |12:59 | ||
− | |How do we work with the tables created using the tabular environment? | + | |How do we work with the '''tables''' created using the '''tabular environment'''? |
+ | |||
|- | |- | ||
|13:04 | |13:04 | ||
− | |Latex treats the entire table created using the tabular environment as a single object. | + | |Latex treats the entire table created using the '''tabular environment''' as a single object. |
+ | |||
|- | |- | ||
|13:10 | |13:10 | ||
− | |For example | + | |For example- if you write, |
+ | |||
|- | |- | ||
|13:17 | |13:17 | ||
− | | | + | |This is |
+ | |||
|- | |- | ||
|13:24 | |13:24 | ||
− | | an | + | |an |
+ | |||
|- | |- | ||
|13:27 | |13:27 | ||
|example | |example | ||
+ | |||
|- | |- | ||
|13:39 | |13:39 | ||
− | |This is an example table | + | |'''"This is an example table"'''. |
+ | |||
|- | |- | ||
|13:47 | |13:47 | ||
− | |What happens is this table gets sandwiched between these two. This is an example to, example table. | + | |What happens is this '''table''' gets sandwiched between these two. "This is an" example to, "example table". |
+ | |||
|- | |- | ||
|13:56 | |13:56 | ||
− | |This table appears in a running sentence. | + | |This '''table''' appears in a running sentence. |
+ | |||
|- | |- | ||
|14:01 | |14:01 | ||
− | | It is possible to include tables using a centre environment. | + | |It is possible to include tables using a '''centre environment'''. |
+ | |||
|- | |- | ||
|14:05 | |14:05 | ||
− | |A more common approach is to include it in the table environment. As we show now. | + | |A more common approach is to include it in the '''table environment'''. As we show now. |
+ | |||
|- | |- | ||
|14:18 | |14:18 | ||
− | | | + | |'''begin''' |
+ | |||
|- | |- | ||
|14:21 | |14:21 | ||
− | | | + | |'''table''' |
+ | |||
|- | |- | ||
|14:25 | |14:25 | ||
|Close this. | |Close this. | ||
+ | |||
|- | |- | ||
|14:33 | |14:33 | ||
− | |So what happens is now ‘this is an example table’. | + | |So, what happens is now ‘this is an example table’. |
+ | |||
|- | |- | ||
|14:36 | |14:36 | ||
− | |This statement comes separately and whatever that appeared between this ‘begin’ and ‘end’ table have been placed separately as a table. | + | |This statement comes separately and whatever that appeared between this ‘begin’ and ‘end’ table have been placed separately as a '''table'''. |
+ | |||
|- | |- | ||
|14:50 | |14:50 | ||
− | | In other words, even though the table | + | |In other words, even though the table appears in between some text, it has been put separately. |
+ | |||
|- | |- | ||
|14:57 | |14:57 | ||
|This is not centered. | |This is not centered. | ||
+ | |||
|- | |- | ||
|14:59 | |14:59 | ||
− | |What I can do is give a command here called ‘centering’ | + | |What I can do is, give a command here called '''‘centering’''' |
+ | |||
|- | |- | ||
|15:08 | |15:08 | ||
− | | | + | |to place this at the center of the document. |
+ | |||
|- | |- | ||
|15:17 | |15:17 | ||
− | |Let us now create a caption. | + | |Let us now create a '''caption'''. |
+ | |||
|- | |- | ||
|15:20 | |15:20 | ||
− | |Table caption is put before the table. | + | |'''Table caption''' is put before the table. |
+ | |||
|- | |- | ||
|15:23 | |15:23 | ||
− | |Let me put a caption here | + | |Let me put a caption here. |
+ | |||
|- | |- | ||
|15:31 | |15:31 | ||
− | |Caption | + | |''' "Caption cost of fruits in India"'''. |
+ | |||
|- | |- | ||
|15:42 | |15:42 | ||
− | |So the caption has come. | + | |So, the '''caption''' has come. |
+ | |||
|- | |- | ||
|15:44 | |15:44 | ||
− | | This is too close; I want to leave a small space. | + | |This is too close; I want to leave a small space. |
+ | |||
|- | |- | ||
|15:47 | |15:47 | ||
− | | Let me do that by giving through this v-space command 1 ex. | + | |Let me do that by giving through this '''v-space''' command '''1 ex'''. |
+ | |||
|- | |- | ||
|15:57 | |15:57 | ||
|That is the space equivalent of the ‘x’ character. | |That is the space equivalent of the ‘x’ character. | ||
+ | |||
|- | |- | ||
|16:01 | |16:01 | ||
− | |So I have left this vertical space. | + | |So, I have left this vertical space. |
+ | |||
|- | |- | ||
|16:04 | |16:04 | ||
− | |So now it looks okay. | + | |So, now it looks okay. |
+ | |||
|- | |- | ||
|16:06 | |16:06 | ||
|By default, Latex places tables at the top of the page. | |By default, Latex places tables at the top of the page. | ||
+ | |||
|- | |- | ||
|16:11 | |16:11 | ||
|This placement is done automatically. | |This placement is done automatically. | ||
+ | |||
|- | |- | ||
|16:14 | |16:14 | ||
|The table is ‘floated’ to the next available slot. | |The table is ‘floated’ to the next available slot. | ||
+ | |||
|- | |- | ||
|16:18 | |16:18 | ||
|To explain this, let me cut and paste some text from the bottom of this document. | |To explain this, let me cut and paste some text from the bottom of this document. | ||
+ | |||
|- | |- | ||
|16:25 | |16:25 | ||
|Let me delete this. | |Let me delete this. | ||
+ | |||
|- | |- | ||
|16:28 | |16:28 | ||
− | |Let me delete this | + | |Let me delete this. |
+ | |||
|- | |- | ||
|16:38 | |16:38 | ||
| Alright. | | Alright. | ||
+ | |||
|- | |- | ||
|16:43 | |16:43 | ||
− | | Now there is some write up about these fruits. | + | | Now, there is some write up about these fruits. |
+ | |||
|- | |- | ||
|16:49 | |16:49 | ||
|Go to the top of this. | |Go to the top of this. | ||
+ | |||
|- | |- | ||
|16:55 | |16:55 | ||
|Paste it here. | |Paste it here. | ||
+ | |||
|- | |- | ||
|16:58 | |16:58 | ||
|Compile it. | |Compile it. | ||
+ | |||
|- | |- | ||
|17:01 | |17:01 | ||
− | |So as before the table got placed at the top of this page. | + | |So, as before, the '''table''' got placed at the top of this page. |
+ | |||
|- | |- | ||
|17:06 | |17:06 | ||
− | | Let me put some more text here. | + | |Let me put some more text here. |
+ | |||
|- | |- | ||
|17:12 | |17:12 | ||
− | | Four copies. | + | |Four copies. |
+ | |||
|- | |- | ||
|17:16 | |17:16 | ||
− | | So now what has happened is | + | | So, now what has happened is- |
+ | |||
|- | |- | ||
|17:26 | |17:26 | ||
|this table has been floated to the second page and | |this table has been floated to the second page and | ||
+ | |||
|- | |- | ||
|17:31 | |17:31 | ||
− | |there is nothing else here | + | |there is nothing else here. So, it has been placed at the middle of this page. |
+ | |||
|- | |- | ||
|17:35 | |17:35 | ||
− | | Let me put one more copy of this, some more text. | + | |Let me put one more copy of this, some more text. |
+ | |||
|- | |- | ||
|17:43 | |17:43 | ||
− | |So now what has happened is | + | |So, now what has happened is- |
+ | |||
|- | |- | ||
|17:49 | |17:49 | ||
|this is the title page, this is the text page, the table has been floated, it has gone to the top of this page. | |this is the title page, this is the text page, the table has been floated, it has gone to the top of this page. | ||
+ | |||
|- | |- | ||
|18:01 | |18:01 | ||
− | |As in equations, we can also create labels and use them for referencing. | + | |As in '''equations''', we can also create '''labels''' and use them for referencing. |
+ | |||
|- | |- | ||
|18:06 | |18:06 | ||
− | |For example | + | |For example, |
+ | |||
|- | |- | ||
|18:12 | |18:12 | ||
− | |you give this command below the caption command. | + | |you give this '''command''' below the '''caption command'''. |
+ | |||
|- | |- | ||
|18:15 | |18:15 | ||
− | |You have to give it below the caption command because it is the caption command that creates the table number. | + | |You have to give it below the caption command because it is the caption command that creates the '''table number'''. |
+ | |||
|- | |- | ||
|18:21 | |18:21 | ||
− | |For example, here table 1 has been created automatically by this caption command. | + | |For example, here 'table 1' has been created automatically by this caption command. |
+ | |||
|- | |- | ||
|18:26 | |18:26 | ||
− | | If you put the label after this, this label will refer to the number created using the caption command. | + | |If you put the label after this, this label will refer to the number created using the caption command. |
+ | |||
|- | |- | ||
|18:33 | |18:33 | ||
− | |So label | + | |So '''label''' |
+ | |||
|- | |- | ||
|18:40 | |18:40 | ||
− | | fruits. | + | |'''fruits'''. |
+ | |||
|- | |- | ||
|18:43 | |18:43 | ||
− | |So let me just go back and say | + | |So, let me just go back and say |
+ | |||
|- | |- | ||
|18:48 | |18:48 | ||
|let me add this line here. | |let me add this line here. | ||
+ | |||
|- | |- | ||
|18:53 | |18:53 | ||
− | |The cost of these fruits is shown in Table reference, you have to give the label, it should be the same as this | + | |'''The cost of these fruits is shown in Table reference''', you have to give the label, it should be the same as this. |
+ | |||
|- | |- | ||
|19:08 | |19:08 | ||
− | |tab fruits | + | |'''tab fruits''' |
+ | |||
|- | |- | ||
|19:12 | |19:12 | ||
− | | Let me compile it. | + | |Let me compile it. |
+ | |||
|- | |- | ||
|19:16 | |19:16 | ||
− | |So there it is | + | |So there it is,On first compilation, this variable is not assigned. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|19:22 | |19:22 | ||
|So let me re-compile it, so now I have got this. | |So let me re-compile it, so now I have got this. | ||
+ | |||
|- | |- | ||
|19:28 | |19:28 | ||
− | |We can create a list of tables automatically | + | |We can create a list of tables automatically |
+ | |||
|- | |- | ||
|19:33 | |19:33 | ||
− | | | + | |as we explain now. |
+ | |||
|- | |- | ||
|19:37 | |19:37 | ||
− | |After the | + | |After the '''make title''', suppose we want this '''list of tables''' - one word, is the command. |
+ | |||
|- | |- | ||
|19:50 | |19:50 | ||
− | | So what has happened is | + | |So what has happened is |
+ | |||
|- | |- | ||
|19:53 | |19:53 | ||
− | | it has created a list of tables. | + | |it has created a list of tables. |
+ | |||
|- | |- | ||
|19:57 | |19:57 | ||
|Typically one would have to compile twice to make sure the table number comes correct. | |Typically one would have to compile twice to make sure the table number comes correct. | ||
+ | |||
|- | |- | ||
|20:03 | |20:03 | ||
|Here it comes, the table according to this list is in page two but we know that it is in page 3. | |Here it comes, the table according to this list is in page two but we know that it is in page 3. | ||
+ | |||
|- | |- | ||
|20:13 | |20:13 | ||
− | |So this is in page 3. | + | |So, this is in page 3. |
+ | |||
|- | |- | ||
|20:15 | |20:15 | ||
− | |So | + | |So, let's go back and compile it once more. |
+ | |||
|- | |- | ||
|20:20 | |20:20 | ||
− | | | + | |So there you are, it is in page 3. |
+ | |||
|- | |- | ||
|20:26 | |20:26 | ||
|So this has been explained before. | |So this has been explained before. | ||
+ | |||
|- | |- | ||
|20:29 | |20:29 | ||
− | | Alright, this comes to the end of this part in which we explained tables. | + | |Alright, this comes to the end of this part in which we explained the '''tables'''. |
+ | |||
|- | |- | ||
|20:36 | |20:36 | ||
− | |We will now explain how to create figures using the command called | + | |We will now explain how to create figures using the command called '''include graphics'''. |
+ | |||
|- | |- | ||
|20:48 | |20:48 | ||
− | |So for this we need to include this package called | + | |So for this, we need to include this package called '''graphicx'''. |
+ | |||
|- | |- | ||
|21:00 | |21:00 | ||
|Okay! Suppose I go to the bottom of this, | |Okay! Suppose I go to the bottom of this, | ||
+ | |||
|- | |- | ||
|21:08 | |21:08 | ||
− | |and say, the command is as follows. | + | |and say, the command is as follows. '''begin figure''' |
+ | |||
|- | |- | ||
|21:14 | |21:14 | ||
− | |include graphics | + | |'''include graphics''' |
+ | |||
|- | |- | ||
|21:19 | |21:19 | ||
− | |width equals. | + | |'''width''' equals. |
+ | |||
|- | |- | ||
|21:29 | |21:29 | ||
− | |I have a file called iitb.pdf. | + | |I have a file called '''iitb.pdf'''. |
+ | |||
|- | |- | ||
|21:36 | |21:36 | ||
|There you are. | |There you are. | ||
+ | |||
|- | |- | ||
|21:38 | |21:38 | ||
|I include it here with the width of this figure coming out to be equal to that of the line width. | |I include it here with the width of this figure coming out to be equal to that of the line width. | ||
+ | |||
|- | |- | ||
|21:51 | |21:51 | ||
|Let me end this figure. | |Let me end this figure. | ||
+ | |||
|- | |- | ||
|21:55 | |21:55 | ||
|Compile this. | |Compile this. | ||
+ | |||
|- | |- | ||
|22:01 | |22:01 | ||
|There you are. | |There you are. | ||
+ | |||
|- | |- | ||
|22:04 | |22:04 | ||
|So, it has also been put at the top of this page. | |So, it has also been put at the top of this page. | ||
+ | |||
|- | |- | ||
|22:09 | |22:09 | ||
− | |Alright! What I will do is, | + | |Alright! What I will do is, let me just, so this is for if I want to use the entire line width . |
+ | |||
|- | |- | ||
|22:17 | |22:17 | ||
− | | Suppose I want to use point 5, that is half a line width, | + | |Suppose I want to use point 5, that is half a line width, |
+ | |||
|- | |- | ||
|22:26 | |22:26 | ||
| then it has been made small. | | then it has been made small. | ||
+ | |||
|- | |- | ||
|22:29 | |22:29 | ||
− | | And note that it has been left aligned | + | | And note that it has been '''left aligned'''. |
+ | |||
|- | |- | ||
|22:32 | |22:32 | ||
− | | | + | |As in the '''table''', I can say '''centering''' |
+ | |||
|- | |- | ||
|22:38 | |22:38 | ||
− | | which will center this at the middle. | + | |which will center this at the middle. |
+ | |||
|- | |- | ||
|22:49 | |22:49 | ||
− | |I can also create a caption; figure captions are created after the figure is included. | + | |I can also create a '''caption'''; figure captions are created after the figure is included. |
+ | |||
|- | |- | ||
|23:00 | |23:00 | ||
− | | | + | |'''Golden Jubilee logo of IIT Bombay'''. |
+ | |||
|- | |- | ||
|23:13 | |23:13 | ||
− | | Okay, as before I can create a '''label''' and refer to it using the | + | |Okay, as before I can create a '''label''' and refer to it using the '''ref''' command. |
+ | |||
|- | |- | ||
|23:28 | |23:28 | ||
|I can also make this list of figures appear along with the list of '''tables'''. | |I can also make this list of figures appear along with the list of '''tables'''. | ||
+ | |||
|- | |- | ||
|23:36 | |23:36 | ||
− | | So, suppose I want list of figures also. | + | |So, suppose I want list of figures also. |
+ | |||
|- | |- | ||
|23:45 | |23:45 | ||
|I will compile it. | |I will compile it. | ||
+ | |||
|- | |- | ||
|23:48 | |23:48 | ||
− | | I will compile it twice | + | |I will compile it twice. |
+ | |||
|- | |- | ||
|23:51 | |23:51 | ||
− | | and there it is. List of figures also comes automatically. | + | |and there it is. List of figures also comes automatically. |
+ | |||
|- | |- | ||
|23:56 | |23:56 | ||
|All the figure captions will appear here. | |All the figure captions will appear here. | ||
+ | |||
|- | |- | ||
|24:08 | |24:08 | ||
|There is one last thing that I want to show you here. | |There is one last thing that I want to show you here. | ||
+ | |||
|- | |- | ||
|24:11 | |24:11 | ||
|That is how to rotate these figures. | |That is how to rotate these figures. | ||
+ | |||
|- | |- | ||
|24:15 | |24:15 | ||
|This is done by the '''angle''' option. | |This is done by the '''angle''' option. | ||
+ | |||
|- | |- | ||
|24:21 | |24:21 | ||
− | |Suppose, angle.. I want to rotate by 90 degrees. | + | |Suppose, '''angle'''... I want to rotate by 90 degrees. |
+ | |||
|- | |- | ||
|24:25 | |24:25 | ||
|So, let's go to this figure. | |So, let's go to this figure. | ||
+ | |||
|- | |- | ||
|24:29 | |24:29 | ||
| Let’s compile this. | | Let’s compile this. | ||
+ | |||
|- | |- | ||
|24:32 | |24:32 | ||
|So, this has been rotated by 90 degrees. | |So, this has been rotated by 90 degrees. | ||
+ | |||
|- | |- | ||
|24:37 | |24:37 | ||
|Rotate it by 'minus 90'. | |Rotate it by 'minus 90'. | ||
+ | |||
|- | |- | ||
|24:42 | |24:42 | ||
− | | Alright. So, this is the way to include figures. | + | | Alright. So, this is the way to include the figures. |
+ | |||
|- | |- | ||
|24:48 | |24:48 | ||
− | |Here I am assuming that iitb.pdf is available. | + | |Here, I am assuming that '''iitb.pdf''' is available. |
+ | |||
|- | |- | ||
|24:53 | |24:53 | ||
|This brings us to the end of this tutorial. | |This brings us to the end of this tutorial. | ||
+ | |||
|- | |- | ||
|24:55 | |24:55 | ||
|The beginners of latex should compile after every few changes to the '''source document''' and make sure that what they have entered is correct. | |The beginners of latex should compile after every few changes to the '''source document''' and make sure that what they have entered is correct. | ||
+ | |||
|- | |- | ||
|25:05 | |25:05 | ||
|Thank you for listening to this tutorial. | |Thank you for listening to this tutorial. | ||
+ | |||
|- | |- | ||
|25:07 | |25:07 | ||
|This is Kannan Moudgalya, signing off. Good-bye. | |This is Kannan Moudgalya, signing off. Good-bye. |
Latest revision as of 12:10, 24 March 2017
Time | Narration |
00:00 | Welcome to this tutorial on Tables and Figures. |
00:05 | We have two objectives in this tutorial. |
00:08 | The first one is to explain how to create tables using the tabular environment; the second objective is to explain how to include tables in latex documents using the table environment. |
00:22 | A similar technique can be used to include figures also. |
00:27 | We have seen how to create the title page, |
00:32 | this one has title, author information, and Creative Commons, copyright information as explained in the tutorial on equations. |
00:45 | Today’s date appears in the last column created by this command. |
00:51 | Let us go to the second page. |
00:58 | I will now explain to you, how to create this table in a step-by-step fashion. |
01:05 | Let us start with a clean slate. |
01:08 | Let me delete these commands. |
01:19 | I will compile this and start with a clean slate. |
01:29 | The tabular environment is created using begin tabular and end tabular commands. |
01:38 | Let me do that here. |
02:03 | The ‘r r’ characters within the braces, next to the begin tabular, say that there are two columns and that they are right aligned. |
02:14 | In the first line, the entries are "mango" and "mixed". |
02:20 | Two reverse-slashes indicate next line. |
02:24 | Let me enter the next line. |
02:28 | "Jackfruit". |
02:32 | "Kolli hills". |
02:37 | "Banana". |
02:40 | "Green". |
02:42 | Let me end this tabular environment. |
02:47 | Let me compile this. |
02:51 | And, this has appeared here. |
02:56 | We get the 3 by 2 table. There are three rows and 2 columns. |
03:02 | The two columns are right aligned as indicated by the 'r r' character. |
03:09 | To separate the two columns, we introduce a vertical line between the column alignment characters. |
03:20 | So, let me put that vertical line. |
03:23 | Save it,Compile it. |
03:28 | You see that a vertical line has come. |
03:31 | If you want vertical lines at the end also, put them at appropriate places. |
03:42 | Let me put them, save them, compile them. |
03:48 | So, these have come. |
03:50 | As a matter of fact, we can put more vertical lines. |
03:54 | Let me put one more vertical line at the beginning. |
04:02 | There you are! A second line has come. |
04:07 | See there are two vertical lines. |
04:11 | We will now try different alignments. |
04:15 | Let's put a ‘c’ here to say that the second column should be center aligned. |
04:27 | This is center aligned now. |
04:30 | Let us make the first column left aligned. |
04:34 | Right now, it is right aligned; let me make them left aligned. |
04:40 | 'l',Save |
04:43 | Compile. |
04:46 | Now it is left aligned. |
04:50 | We will now separate the rows with horizontal lines as follows. |
04:56 | Let's put a h-line here. |
05:00 | Let us see what happens when we do that. |
05:04 | It puts a top line. |
05:07 | If I put another h-line here, |
05:16 | see a line has come,So, let me complete this. |
05:19 | Let me put h-line. |
05:22 | Here I have to put a break line with two reverse slashes and then h-line. |
05:30 | H-line begins from the beginning of the sentence. |
05:36 | So, now I have completed the horizontal lines. |
05:42 | Now, let us add three more columns and one more row. |
05:49 | So, what I do is- I come here, and 'c' , 'c', 'r'. |
06:01 | So, I have added three more columns, first two of them are center aligned the third one is right aligned. |
06:08 | And then here I want to say: |
06:15 | "fruit" |
06:19 | "type" |
06:22 | "number of units" |
06:26 | "cost per unit" |
06:30 | "cost rupees" |
06:38 | h-line. |
06:41 | So, "mixed" |
06:43 | "20" |
06:45 | "75" rupees |
06:47 | "1500" rupees. |
06:51 | "Jackfruit" |
06:54 | "10" of them |
06:57 | "50" rupees |
06:59 | "500" rupees. |
07:01 | "Banana green" |
07:05 | "10" dozens |
07:07 | "20" rupees a dozen and "200" rupees total. |
07:12 | So, let’s see whether we can compile this. |
07:20 | So, it has created the table. |
07:25 | See the need for right alignment, this is.. so that we can add these numbers. |
07:34 | Suppose, that we want to split the columns in two. |
07:39 | For example, here these two columns have fruit details and these three have cost calculations. |
07:48 | So, this is done with the help of what is known as multi-column command. |
07:55 | Let me do it as follows. |
07:59 | multi-column |
08:04 | take 2 |
08:06 | center-aligned |
08:10 | Fruit Details. |
08:12 | First two are over then I put a tab to indicate the next column. |
08:19 | Go to the next line. |
08:24 | multi-column, three, also to be center-aligned. |
08:29 | Cost within braces – cost calculations |
08:37 | slash h-line. |
08:44 | So, there you are. |
08:46 | The first two have the title "Fruit details", the next three have the title "Cost calculations". |
08:52 | I don’t have the vertical lines that’s because I didn’t tell latex to do that. So let’s do that. |
08:59 | Here, I want two vertical lines, here I want one vertical line. |
09:05 | Before this, I already have the line here, so let me just put this here. |
09:11 | See what happens. |
09:16 | So, now the vertical lines have also come. |
09:24 | Because these 2 and 3 are single character arguments its possible to write them without braces. |
09:40 | Okay, same thing works. |
09:42 | Sometimes it is necessary to draw horizontal lines between only a few columns. |
09:52 | So, we explain this as follows. |
09:54 | Let me split this "mango" instead of "mixed", let me call this "Malgoa" |
10:05 | and then "18" kilograms |
10:13 | "50" kilograms. |
10:17 | Let me delete this. |
10:23 | okay,And here, let me say that it is "Alfanso" |
10:33 | "2" dozens |
10:35 | "300" rupees a dozen, and a total of 1500. |
10:44 | Let’s see what happens when I save this. Compile this. |
10:50 | So, I’ve got this. What happens is, this line comes here and as well as here and I don’t want this and this. So, this is taken care of by saying instead of this horizontal line, I want a 'c' line and between the columns 2 and 4. |
11:19 | So, I should have done this here. |
11:22 | So let me put this back here. |
11:27 | H-line here. |
11:30 | c-line 2 to 4. |
11:40 | Okay, so now I have the line between columns two and four only. |
11:52 | So, this central line has split the mangoes into two of the most popular mangoes in India. |
11:58 | We will conclude this example, conclude this table with a last row. |
12:04 | Let me total up as follows. |
12:11 | multi-column four |
12:14 | 2 vertical lines, right-aligned |
12:20 | vertical separator |
12:24 | Total cost |
12:27 | Rupees. |
12:32 | Close this. |
12:35 | Next tab |
12:38 | 2200 |
12:42 | h-line. |
12:48 | So there you are. |
12:50 | So, this was the table that we started with at the beginning of this tutorial. |
12:59 | How do we work with the tables created using the tabular environment? |
13:04 | Latex treats the entire table created using the tabular environment as a single object. |
13:10 | For example- if you write, |
13:17 | This is |
13:24 | an |
13:27 | example |
13:39 | "This is an example table". |
13:47 | What happens is this table gets sandwiched between these two. "This is an" example to, "example table". |
13:56 | This table appears in a running sentence. |
14:01 | It is possible to include tables using a centre environment. |
14:05 | A more common approach is to include it in the table environment. As we show now. |
14:18 | begin |
14:21 | table |
14:25 | Close this. |
14:33 | So, what happens is now ‘this is an example table’. |
14:36 | This statement comes separately and whatever that appeared between this ‘begin’ and ‘end’ table have been placed separately as a table. |
14:50 | In other words, even though the table appears in between some text, it has been put separately. |
14:57 | This is not centered. |
14:59 | What I can do is, give a command here called ‘centering’ |
15:08 | to place this at the center of the document. |
15:17 | Let us now create a caption. |
15:20 | Table caption is put before the table. |
15:23 | Let me put a caption here. |
15:31 | "Caption cost of fruits in India". |
15:42 | So, the caption has come. |
15:44 | This is too close; I want to leave a small space. |
15:47 | Let me do that by giving through this v-space command 1 ex. |
15:57 | That is the space equivalent of the ‘x’ character. |
16:01 | So, I have left this vertical space. |
16:04 | So, now it looks okay. |
16:06 | By default, Latex places tables at the top of the page. |
16:11 | This placement is done automatically. |
16:14 | The table is ‘floated’ to the next available slot. |
16:18 | To explain this, let me cut and paste some text from the bottom of this document. |
16:25 | Let me delete this. |
16:28 | Let me delete this. |
16:38 | Alright. |
16:43 | Now, there is some write up about these fruits. |
16:49 | Go to the top of this. |
16:55 | Paste it here. |
16:58 | Compile it. |
17:01 | So, as before, the table got placed at the top of this page. |
17:06 | Let me put some more text here. |
17:12 | Four copies. |
17:16 | So, now what has happened is- |
17:26 | this table has been floated to the second page and |
17:31 | there is nothing else here. So, it has been placed at the middle of this page. |
17:35 | Let me put one more copy of this, some more text. |
17:43 | So, now what has happened is- |
17:49 | this is the title page, this is the text page, the table has been floated, it has gone to the top of this page. |
18:01 | As in equations, we can also create labels and use them for referencing. |
18:06 | For example, |
18:12 | you give this command below the caption command. |
18:15 | You have to give it below the caption command because it is the caption command that creates the table number. |
18:21 | For example, here 'table 1' has been created automatically by this caption command. |
18:26 | If you put the label after this, this label will refer to the number created using the caption command. |
18:33 | So label |
18:40 | fruits. |
18:43 | So, let me just go back and say |
18:48 | let me add this line here. |
18:53 | The cost of these fruits is shown in Table reference, you have to give the label, it should be the same as this. |
19:08 | tab fruits |
19:12 | Let me compile it. |
19:16 | So there it is,On first compilation, this variable is not assigned. |
19:22 | So let me re-compile it, so now I have got this. |
19:28 | We can create a list of tables automatically |
19:33 | as we explain now. |
19:37 | After the make title, suppose we want this list of tables - one word, is the command. |
19:50 | So what has happened is |
19:53 | it has created a list of tables. |
19:57 | Typically one would have to compile twice to make sure the table number comes correct. |
20:03 | Here it comes, the table according to this list is in page two but we know that it is in page 3. |
20:13 | So, this is in page 3. |
20:15 | So, let's go back and compile it once more. |
20:20 | So there you are, it is in page 3. |
20:26 | So this has been explained before. |
20:29 | Alright, this comes to the end of this part in which we explained the tables. |
20:36 | We will now explain how to create figures using the command called include graphics. |
20:48 | So for this, we need to include this package called graphicx. |
21:00 | Okay! Suppose I go to the bottom of this, |
21:08 | and say, the command is as follows. begin figure |
21:14 | include graphics |
21:19 | width equals. |
21:29 | I have a file called iitb.pdf. |
21:36 | There you are. |
21:38 | I include it here with the width of this figure coming out to be equal to that of the line width. |
21:51 | Let me end this figure. |
21:55 | Compile this. |
22:01 | There you are. |
22:04 | So, it has also been put at the top of this page. |
22:09 | Alright! What I will do is, let me just, so this is for if I want to use the entire line width . |
22:17 | Suppose I want to use point 5, that is half a line width, |
22:26 | then it has been made small. |
22:29 | And note that it has been left aligned. |
22:32 | As in the table, I can say centering |
22:38 | which will center this at the middle. |
22:49 | I can also create a caption; figure captions are created after the figure is included. |
23:00 | Golden Jubilee logo of IIT Bombay. |
23:13 | Okay, as before I can create a label and refer to it using the ref command. |
23:28 | I can also make this list of figures appear along with the list of tables. |
23:36 | So, suppose I want list of figures also. |
23:45 | I will compile it. |
23:48 | I will compile it twice. |
23:51 | and there it is. List of figures also comes automatically. |
23:56 | All the figure captions will appear here. |
24:08 | There is one last thing that I want to show you here. |
24:11 | That is how to rotate these figures. |
24:15 | This is done by the angle option. |
24:21 | Suppose, angle... I want to rotate by 90 degrees. |
24:25 | So, let's go to this figure. |
24:29 | Let’s compile this. |
24:32 | So, this has been rotated by 90 degrees. |
24:37 | Rotate it by 'minus 90'. |
24:42 | Alright. So, this is the way to include the figures. |
24:48 | Here, I am assuming that iitb.pdf is available. |
24:53 | This brings us to the end of this tutorial. |
24:55 | The beginners of latex should compile after every few changes to the source document and make sure that what they have entered is correct. |
25:05 | Thank you for listening to this tutorial. |
25:07 | This is Kannan Moudgalya, signing off. Good-bye. |