LaTeX-Old-Version/C2/Beamer/English

From Script | Spoken-Tutorial
Revision as of 17:52, 16 October 2019 by Nancyvarkey (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Welcome to this spoken tutorial on presentation using Latex and beamer. Let me first explain the arrangement that I have on the screen. I have the source file here, I will do the compilation here using pdflatex command, and the resulting output will be seen here in this corner. First lets see this, we will come back to this shortly. Lets do this first, the first slide here comes from this source – begin frame, end frame, title page. And the title page is defined in terms of title, author and date. The document class that I am using is beamer. We have begun the document here.

Alright, this is the first slide, lets go to the second one. This is the outline, how is this created?, Begin frame, end frame defines one slide. Frame title is outline. It comes here. Then I use the normal ‘itemize’ command. Let’s go to the third slide. This slide talks about other spoken tutorials on latex. There are many spoken tutorials on latex already available. You are encourage to see them in case you are not comfortable in using latex. These explain how to use latex, this explains how to install and run latex on windows. And we hope to give a more permanent link using fosse dot in. So we have come to the end of, so this is the source for this slide. You can see that we have come to the end of this document. Now I’m going to show you how to embellish this document with lots of other features that beamer offers. Let’s go to the beginning. Let’s go to the top of this file. Now what I am going to do is, whatever change, whatever improvement that I am going to make to this are here. I am going to add one at a time and explain.

Let’s see what happens when I add this command - ‘beamer theme split’. Let me cut it, let me come back here, Let me save it, and then compile it – pdflatex beamer. Let me go click this, so you can see that it has created this banner here and some banner here. Here also, alright. Then what we do is, you come here and use the package. Lets add this – beamer theme shadow. Let me cut it, go here, paste it, all of these are pasted above the document command. Let me compile this. Alright, let’s see what happens when I click this. It has become bigger. You can see that there is a change of color here. So this is done by the command – beamer theme shadow. There are lots of these packages, I am going to illustrate some of the other features now. We will give references for future reading as a part of this introduction as we see here – ‘references for further reading’. The outline of this talk is as follows. We will spend some time on title page, author name, color, logo etc. Minimal animation that you can use to present your talk, two column format, figures and tables, equations, verbatim and so on. Alright, let’s come back to the beginning. The next one is logo. Let’s cut and paste logo from here. This also has to be pasted above the begin document command. This logo, let’s see what this looks like. Let me just see it by open iitb logo.pdf. I am giving the same name over here. When I open it you can see that this is the image file that I am talkin about. Including this logo command, of height 1 cm it is going to come in this corner. So let’s see what it looks like. Let’s click this. You can see that iitb logo has come. Now this is going to come on every page from now on.

Next we will add this command. For presentations sometimes it is useful to make all the lettering bold. So in view of that, I will include this, cut, paste. Actually I will have to include this after the begin document command. Let me save this. Let me compile it. Alright now, watch this as I click this all the letters will become bold. You can see that it has become bold. Then, now im going to improve the writing here. For example, it tries to fill lots of things here. Here the title comes here, here the author information comes but lots of information is coming. Sometimes I may want to have a smaller title here. For example this space may not be large enough. So what we will do is, that is solved using this. For example, this is the running title. Let me cut this. This should come after the command title, between the title command and the actual title. So let me paste it here. You can see that whatever I have pasted now is within square brackets. So let’s save it. Run it. So as I do it, let’s click this, look at this as I click what happens to this part. You can see that the title has now changed. I have put only the bottom portion because that’s what I’m giving the square bracket – presentation using latex and beamer. Then im saying that h-space is half a cm. giving a space here. And then I have the page number over here. It says 1 by 3 here. Then 2 by 3. 3 by 3 here and so on. That is achieved using ‘insert frame number divided by insert total frame number’.

Now I will do the same thing for author. So lets come here. Let’s cut this. And after author, this comes. Let me save it. Compile it. Click this. You can see that Kannan Moudgalya has come. This is what I have given within the square brackets. Now this is going to come on every page.

Let’s go to the next topic. This is including equations. The whole thing is in the form of a frame – a complete frame. So what I will do is, I will cut the whole thing. Come back here; go to the bottom of this document. Save it. So I have created a new slide. Let’s see what this looks like. So this is where the frame starts. Let us compile this, now you see that 4 pages are there. So it still says three, so if click this once more, so it becomes 4. So this is the equation containing slide. I am not going to explain how to write these equations. These are explained on the spoken tutorial that I have created earlier on creating equations. All that I have done is, I went to that latex document, cut and pasted it here, that’s all. And of course I have removed the equation numbers. It does not make sense to give equation numbers in a slide. On the other hand, it may be useful for you at times to highlight the color. For example if I want to change this to blue, I will do the following. Come here. The commands is – color, blue- and then ill close this. Save this. Compile it. And click this. And see that this has become blue. So you may not want to refer to an equation by numbers but you can say that consider the equation in blue or you may want to say that look at the mass balance equation and so on. You want to refer to it by something that people can remember in talks. Next what we will do is, what I will do now is to include animation. Which is useful to present information concept by concept. So I have cut, lets paste it here. Let us see what this looks like. Lets first compile it and see what happens. This is from the spoken tutorial on letter writing. This information is also there. The only difference that I have done now is that between begin enumerate and end enumerate I have put this ‘item plus minus alert’. Let’s see what this does. See here I have put a command called ‘pause’, the moment I put a command pause, it stops there, now the begin enumerate starts. So let me just go forward. Page down. Next page, next page, next page. As I go down you see that the latest information is in red all others are in the default color namely black. I have come to the end of the document. So this is one easy way to create animation where you want to present information a little at a time.

Next what I want to do is change the alerted color to blue. For example, here the alerted color is red, this is known as alerted color. I want to make this alerted color blue. So that this is consistent with this color that I have chosen. Okay let me come here, cut this. This should go to the beginning of this document before the beginning document command. Let me compile it, when I click this you can see now that the alerted color has now become blue. It is achieved through the command ‘set beamer color – alerted text’ there is a space here ‘foreground equals blue’, fg equals blue. Now what im going to show is how easy it is to change the color of the entire document. So what I will do is, ill come here, after this slash document class before the beamer phrase starts I will write here brown. Save it. Compile it. You can see that it has become brown. So without too much work. So what I will do is, I will take this back to the original color. The default color is blue so I don’t have to type it. Now we are back in blue.

So let’s come here, let me delete this. I will now include figures. Cut this. Come here. Go to the end of this. The last one. Let’s compile it. Let’s go to the next page. So example of the figure is given here. Alright, what are the guidelines in placing this? There are some important guidelines. We will see it with the next bit. Let’s cut this. Paste this. Compile it. So I have got this. Hints for including figures. Let’s come to the source where we created the figure. This is how we created this figure. So what are the guidelines? Do not use floated environments in presentations, for example, don’t say begin figure, end figure which u need in the latex document. By the way if you want to know about how to include a figure and more about it you have to go to the spoken tutorial on tables and figures. So do not use this. Use ‘include graphics’ directly. So for example, include graphics command is used and I’m saying that use the complete width of the text and the file is iitb. By the way, beamer already comes with necessary packages so u don’t have to include any package, use any package, it is already included. And then we put the whole thing in the center environment. And this frame is over. Do not include caption, figure number etc. Once again people are not going to remember these numbers. If you want to refer to a previously shown figure, show it again. It does not cost any money to create another slide. Make a copy of the earlier shown slide and do it again. Alright, that completes the figure and the guidelines. And we have come to the end of this document.

Let us now see how to include a two column environment. Let’s come here. Let’s go to the end of the document. Save it. What I will do to make it easier, I will first remove this so that it becomes easy. So what I’m going to do is I’m going to give, show part of the information. Let’s compile this and see what happens. So I have this, two columns. This is not saved, that is why. See the star star. What I will do is, let me first save it. So this is the problem if you try to compile it, without saving, the pdf file that you see here does not correspond to what you have here. So let’s compile this. Let’s come here. Now what you see here corresponds to what you have here. Let me just center it. Frame title, two columns, and I’m using the command ‘mini page’, and I’m centering it and I’m using 45 percent of the text width. Begin enumerate. These two and then end enumerate. And as before I am alerting. See these two. This is the end of the document. Now what ill do is, ill come and attach whatever I have at the end of this. Here the previous mini page got over. Now im going to create another mini page and in this mini page I am going to put this IITb, the same image we saw earlier. And this mini page also is 45 percent size. Let’s compile this , Let’s first save this. Now let me click this. Now you see it has come. But it has a small problem in that when I go to this page it shows the first item and also this figure. Although the figure comes later on, it shows this because no where have we told latex to show this later. It is perhaps implicit. So for example, if you say that, if you put this information within this item then we say that show this first and then show this. But no where are we saying that this should come later. So one has to be careful of such evinces. One way to solve this problem is to put a ‘pause’. Let me compile this. Save this. So now this is okay. This problem is solved. The first one, the second one, and then one more, it passes once, and you can see that it has been solved.

Alright, let’s come here. The next one is the table. Save this. Let’s compile this. You can see that the table has come. I am not going to explain how to create this table, this has already been explained in the spoken tutorial on tables. All I have done is to cut and to paste it here. Let’s go to the beginning of the frame. It’s the same table that we used earlier, I just cut and pasted it. You can see the begin tabular and end tabular commands coming within center environments. What are the guidelines? The guidelines are similar to figures. So let’s see that also. See the guidelines are here. Let me compile. See this, move forward. Once again do not use floated environments in presentations. In the spoken tutorial on tables, we put the tabular inside the table environment. Table environment is a floated one, do not include it here. Insert it directly. For example, we put it directly inside the center environment. Do not include caption, table number etc. make a copy of it if required. Now here I want to point out the way animation happens. For example, in this slide, it does not alert with a different color. Recall that we used the blue color for alerting. Why does it happen? That is because we have used a different kind of environment here. Begin itemize, End itemize, within that we used item plus minus. Previously we were using the word alert. Recall that. We are not using that anymore. As a result, it just comes in black. This is simpler way to include animation. You can pick and choose. So this is what I have written here. Show different animations in the previous slide.

Now there is a need to convert this into a handout. For example, if you try to print this, whatever we have here, it will produce 24 pages even though there are only 10 pages. There are only 10 unique frames but there are 24 pages. But if you try to print out, it will produce 24 pages. One way to do that, to take care of this is to use a simple switch here called ‘handout’. If I do this, let me compile it, now there are only 10 pages. Let’s compile this once more. Now the animation, is no longer there. If I go to the next page, next page, next page, next page, next page and so on. Of course, what if I want to change the color, then you put brown once again. You can see that it has changed. So all the parameters here are to be included separated by commas. So let me just put this back to blue. Compile it.

Now what we will do is, sometimes you have to include Verbatim environment. So let me just take this example. Let’s go here, go to the end. Save it. So this is where the verbatim begins. So you can see that the verbatim is created. Here I have illustrated it with some SciLab commands. I have changed the color here to blue and so on. The only unique thing you had to do is to say begin frame within square bracket – fragile. If you don’t do that, there will be a problem. Okay so you see this, we will come back and check that. So suppose I delete this. Save it. Compile it. It will come and say that something is not okay. So lets put this back – fragile. Save it, exit from here. Compile it once again. It has come now.

Beamer class has lots of information. How does one know about other things. So I have some information here, let’s go to the bottom. So essentially that information, where to get this extra information is in this slide. We will compile it and we will go through that. The authoritative source for beamer this beamer user guide dot pdf. I located it at this point but it is also available through this beamer project website by the author of beamer class. I’ll just illustrate this, I’ve already downloaded this, it’s in that site that I have mentioned earlier. For example, it’s a 224 page document. It’s a huge document. What I want to show here is that you can use the information from here directly. So let’s come here. In the very first page the author talks about how to create simple slides and he has given the source also. We will cut this, copy, let me minimize this. Let me go to the end of the document. We paste it. Save it. Compile it. So let’s go to the next page.

You can see that whatever we saw there has come here. Here the author has used what is known as the theorem environment. So for example, begin theorem, end theorem, it comes here. He has also used the frame subtitle that comes here in small letters. And then begin proof, end proof comes here. He says proof, it opens another window, calls it ‘proof dot’. This is how it is defined, how this environment is defined. He uses a different alert mechanism. So if you want to see this you just go back, remove this handout, so we can see the animation. Compile it. So let’s go to page number 34. Let’s see the animation now by going backwards. You see this, you see this. So what he does here is, so these two items are numbered one, and the others are numbered two and three. In other words, it is possible to specify the sequence in which the things that you have on the slide will appear. We don’t have time to go through this in more detail. I would suggest you go through the reference given here to know more about it. This guide has lots of features, this beamer class has very large number of classes, and you may want to try out some of them. Okay. Let me change this back to handout. The problem with the presentation mode, we are now going to the handout mode, the presentation mode where you show the animations generally takes a lot of time to compile. So typically you would want to work with the handout mode as much as possible and only once in a while when you really want to check it out you want to use the presentation mode. Finally of course, when you make the presentation, you may want to use the presentation mode. And if you want to take a printout, use the handout mode. Let’s go to the end. We are almost at the end of the spoken tutorial. Let’s acknowledge, in fact let me just copy the whole thing, come here. Let me just compile it here as usual. Okay. The funding for this spoken tutorial has come from the National Mission of Education through ICT. This is the website of this mission.

I want to thank you for joining us. This is Kannan Moudgalya signing off. We would like to receive your feedback at kannan@iitb.ac.in. Thank you very much.

Contributors and Content Editors

Nancyvarkey