How I Make Presentations Using LaTeX & Beamer

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i want to show you how to make beautiful presentations that just involve a lot of mathematics for example this is the presentation i gave for my phd defense and if i just quickly go through it you can see there's just a lot of mathematical formulae there's a lot of different mathematical images that are involved now if you haven't been following along with my entire playlist on latex the link to that by the way is down in the description latex is a typesetting language where with a little bit of code you can just display a whole bunch of beautiful mathematics but latex has just a lot of advantages for mathematics and it's not just about being able to display fancy equations it's been able to create entire documents or in this case presentations that have a consistent look and theme and feel to them so we're really going to play around with that in this video now don't get me wrong for many presentations people will just use something like powerpoint and even i do that in a lot of my videos the the background graphics are housed in powerpoint but when i'm wanting to do something that has a lot of mathematics in it and i want to have that consistent look and feel that respects the mathematics then i'm going to use latex with beamer now in order to get started you need to have a latex editor and that's why i've got to give a quick thank you to the sponsor of today's video which is overleaf overleaf is a cloud-based latex editor that just has an enormous amount of quality of life features that just make it easier to learn and to develop and to work with latex let me start a new project just for us so i'm going to come up here and click new project and i have a choice i could choose a blank project which is what i'm going to do but you could also come down to the standard templates and click presentation and if i do this just very briefly you'll see that there's a large number of different templates made by a number of organizations and if you want you can just go and click on a few of those and find one that you'd like and edit from there but i'm going to show you how to do it from the beginning so that means a blank project let's call it beamer youtube beamer is going to be the name of the package that we're going to use and it's going to create an entirely blank document a little window organization first i don't need this left tab right now so i'm going to get rid of that i'm going to drag things to approximately the middle and what you'll see is you have the code on the left and then the output on the right which currently just sort of looks like a normal pdf article because i haven't made it a presentation yet okay so how do i make this a presentation i go to the very top where it says document class and right now it's an article and you do many things like books but in this case i'm going to write beamer here because beamer represents a presentation i'm going to compile that and what do i get i get one nice slide latex works by having a major section of the document between the begin document and the end document the only thing i have there right now is this make title which is going to make this nice title page and then i have a first section called introduction which doesn't appear in any way right now so i'm just going to delete it prior to the begin document is the preamble that's where i had that document class and then a few sort of standard things just appear when you start a blank document using overleaf and now it's formatted as a slide in a presentation so let's make another one to make a slide i'm going to go backslash begin and then i'm actually going to not use slide i'm going to use frame i'll tell you why in a moment as i start typing frame overleaf pops down the option i'm going to hit enter and it will give me a sort of pre-formatted begin frame end frame and if i recompile that what i'm going to get is a second slide appearing so i have my first slide which is my title slide and then i have a second slide appearing down here which has the title frame title let's put some actual content in this slide so let's do two things first of all the title occurs here in squiggly brackets so i'm going to change it to something and i'm just going to be sort of shameless about my uh about my sponsor here so how about let's do overleaf features or something like this so then let's put in some content i'm going to do backslash begin itemize it pops up for me and let's do a few items okay so we've seen lists like this before but let's just very quickly fill in some content so how about uh collaboration uh what else is gonna be uh version history and tracking changes three different uh little features of overleaf here so let's click compile and see what happens i do that and now on this second slide i have this little itemized list appearing that's great but if i was going to give a presentation unlike a static document i might not want this entire list to appear all at once i might want to appear like one at a time and this is where the document class beamer is really going to come in so what i want to do is think of a frame as a collection of content but a slide is just one of possibly many different instances of the same frame where the different content i'm going to put in the overall frame may appear on some of the slides but not others so the way i do this is i'm going to come here and use triangle brackets and i'm going to go starting at slide 1 onwards and then i'm going to close my triangle brackets for the second one i'm going to start at slide two and go onwards and for the third one i'm going to start at slide three and go onwards now let's see what happens if i do that now when i scroll through on the right hand side i have my title page then i have this overly features slide with just collaboration another version of it with collaboration version history and a third with collaboration version history and tracking changes right now this doesn't really appear like a presentation it just looks like a long list of sort of different slides and that's totally okay if i want to come here i can download this pdf and let's actually open the pdf and now that it's a pdf and open an adobe i can just tab along and it just looks like a presentation i can imagine giving this little presentation in some talk let's add some more content that shows up on only some slides of the larger overall frame to do this i'm going to use the onslaught command so i'm going to go on slide then i only want this to appear on the second slide so i'm gonna do the angle brackets with the two and then i only do a two opposed to two dash the two dash would mean two to the end i want this to only appear on the second slide and then i'm going to put in the squiggly brackets the thing i want to show like how about click the clock uh button because version history you have to click this button that kind of looks a little bit like a clock and then if i want to do another i could do another on slide let's do only the third slide this is going to be associated with tracking changes we have to click this review button so let's do that click the review button and let's compile and see what this is going to do so what we get is that on the first slide of the flame so what we get is that on the first slide of the frame with its collaboration neither of those text appears on the second slide when version history comes down it says click the clock button and then on the third slide where i've got tracking changes it says click the review button and notice that it's spaced out here like the the click the clock button thing it's like it's there but just not visible if i didn't want that if i wanted to really just imagine it wasn't there at all instead of on slide i could have written only so let me come in here and do only for these and only just imagines that it the rest of it is just even isn't even there so the click the clock button and the click the review button they appear in that same spot sort of like over top of each other because of the use of only versus onslaught so we've seen how only an onslaught can sort of put anything inside of them special environments like itemize you can put them right with the items and there's a few of these so maybe i'll just do i can do and another one is alert and maybe my alerts going to only appear on uh slide one and it will say alert an alert is going to be a bright color like red i believe in this particular theme more about themes coming up uh i can also do something like uh text uh bf for boldface here that'll appear on i don't know the second slide and this will be boldface what does it look like remember these were only on the first and second so on the third slide here you just get normal text but on the second slide it's boldface and on the first slide the alert is bright red so this is a way you can sort of call attention to specific things within the text okay so we're doing pretty good here but the next thing i really want to do is just make it look a little bit better when i scroll through this like it's okay it's a fine but it's a little bit boring particularly for anyone who's come from powerpoint where the visuals are just one of the strengths of something like powerpoint you look at this right off the bat and you're just like okay it's clear it's reasonable but it's just kind of boring so how do i make it a little bit nicer the first thing i'm going to do with just a couple small tweaks and then we'll really get all the fancy colors i'm going to go up here to document class and i'm going to put some parameters in here the first parameter i'm going to put in is i want my text to be just a little bit larger this might also just help you visualize this so i'm going to go and write 14 point 14 points just gonna increase from its default which i believe is 11 points and so now everything just looks a little bit bigger so that's just better probably should have done that before i even hit record on this video second thing i'm going to do is look i'm a youtuber i like uh 16 9 aspect ratio so i'm gonna go aspect ratio equals 16 nine and instead of the four by three squares that it defaults to now it's 69 so if i wanted to use this in youtube it would set up to go or you can leave it as default now the next two things i'm going to do are the things that really make the big difference i'm going to copy and paste something here two different elements to it the first is use a theme which i've chosen is copenhagen and use a color theme which i've chosen as beaver more about the city and the animal in a moment notice what happens though when i compile as soon as i've done it now a whole bunch of things has changed all at once there's some new color coding there's some new shading some bars at the top down at the bottom i have my name and the title appearing in this bottom bar there's just a lot of nicer things going on right now and what i put in here is overleaf's reference guide i'll put that in the description as well so you can check it out but what you'll see on this website is that there are so many different possible themes looks and styles for your beamer presentations and the way this is basically organized is the different color palettes are along the top which are animal names default beaver beetle seahorse and wolverine kind of funny and then city names are the different styles so if we scroll down we can go through here and the one i happened to choose was the copenhagen beaver theme and that's why it looks like this but if i for example comment out the fact that i'm going to use the beaver theme and i can pile instead i'll get that blue and black which was that default one which i don't know looks pretty cool two other things that i'm going to change at this time the first is that you'll notice there's always this bar of fancy buttons along the bottom i've opened my pdf up in adobe and you'll notice that on all these slides there's this row of sort of weird buttons at the bottom these are navigation buttons and they're nice to have maybe or maybe you don't want to bother with them so if you want to get rid of those then use this set beamer template navigation symbols and then leave it as blank and that's going to get rid of all of those ones i don't know i just sort of don't like them myself and so i think it looks a little bit cleaner not to have them so i always get rid of those and then the other thing that i very commonly are going to add is i set my beamer covered another parameter of my document class beamer to transparent and what this does is it lets me see and what this does is it lets me see what's coming up even though it's not fully displayed so for example on this first slide of my first frame here the version history and the tracking changes isn't there yet but nevertheless it's going to appear here in the sort of transparent format as i go through then the second one appears and it remains there so it's sort of up to you whether you want people to be able to see ahead of your presentation or not i'm actually going to leave it on now for the rest of my presentation just so that it's a little easier for you to see what is there and what is not don't want it just take this line out let's do a new frame with new types of content so i would go to the end frame that i was at before and i'm going to start a brand new frame i've copy and pasted it and let's just see what it is first and then we can go and talk about it this frame is all about special environments remarks examples theorems proofs we've seen these types of things previously in my latex series and they work more or less the same way it's just that they're compatible with the slide notation that we're now talking about so how i did this was i had a begin frame and an end frame and i gave it a title which is special environments the most standard one if you just want to emphasize something is just a block a block is no fancy code and you just put whatever you want on it so in this case so in this case the title of my block is remark and then over here it shows up as remark with some text being whatever you want it and then there's the fancy ones that sort of do specific things so for example with example kind of funny with example i don't even need to give it a title because if you do begin an example it knows it's going to be an example and it's going to give it the title of example same thing with a theorem it would just tell me that it was a theorem regardless of whether or not i said it if however i put in square brackets the parameter parameter pythagoras it's going to say that this theorem is the pythagorean theorem and then you put in you know whatever it is that you wish to have same story with begin proof and end proof notice what it has it has a few little special elements like for example the qed square that it puts on the right-hand side so these are sort of pre-programmed environments that you can sort of leverage very easily in the middle of your presentation and then how do i make it work in the context of a presentation well you'll notice that the only thing i've done here that changes when it's going to be displayed is the proof that's the part that was hidden at the beginning on the first slide of the frame and then appeared on the second side of the frame well i just came here and i put the same kind of formatting that i've done before i did the angle brackets i put the two inside of it and yeah it only appears on the second slide of this particular frame easy peasy i'll begin another frame here and i'm going to call it a two column frame so i'm going to show you how to make columns inside of your slides again we've done a little bit of this before but i want to show you it specifically in the context of beamr for the content itself i'll go backslash begin columns is the thing that i want to do i'll hit enter so that it auto completes it and i want to give two different columns for the first column i'm going to come here and in squiggly brackets write its width and i'm going to make this a fraction of the total text width so i'm going to do 0.5 text width and that's going to make a column that is half the width of my text then i'm going to do another one which is going to be the other half so 0.5 text width and let's put in some generic text into this so this is going to be my first column and i want to have just a bunch of text so i'm just going to come here and copy and paste it just a couple times likewise for the second one this is going to be my second column and let's just copy that a few times just to make it look dramatic compile and let's see what we get now i have my frame nicely organized into these two different columns and this is just really good depending on what you're trying to put in here so like i'm going to actually just come and copy and paste just a couple of the code from my thesis defense here it doesn't matter about the code we've broken all of that down before well then now i get this really nice frame with this interesting image over here this is a tixie image i've done a video on how to make those this is just an interesting matrix of mathematical symbols i've shown you how to do all of that but now i have my fancy math just really nicely appearing okay that was great but now i really want to show you how to make a table of contents for a longer presentation so i think what i'm going to do here is just make a couple extra frames so not frame begin frame and let's just call this uh extra frame one and maybe i'll just make a couple of these i'll make an extra frame two here and so now i've just added a few more frames and the reason for this is just that i can break this up into different sections so let's scroll all the way through our thing and try to think about what the different sections that i might want to put on a title page are going to be so if i scroll all the way back to the beginning let's do this let's make a section and the very first one was sort of on overleaf i was kind of you know plugging the sponsor for this video then we do some math so i'll come here make another section called math and then we go to the sort of dummy ones that i've made down here and let's make a third section and i'll call this section dummy now if i click compile the number of slides hasn't changed the the fact that i've added these sections doesn't do much but you'll notice that up at the top of every single one of these slides those three sections appear and this can be useful for example if i want to skip right to math i can click on that and that sort of navigational bar at the top allows me to jump around through my slide this is okay but if you have a lot of different sections it can get cumbersome pretty quickly and so you might just want to turn it off this is a feature of the specific copenhagen theme that i have so one option for turning it off which is to use a different theme if you still like copenhagen and nevertheless want to get rid of this you can use this command the set beamer template that specifies the headline to be blank kind of like how we set the navigation symbols to be blank if i do that it adjusts the current theme that i have and get rid of those so i've added sections which introduced the section navigation bars at the top and then i got rid of them so now i'm back to not having any particular use for the sections that's why i want a title page there's actually one other spot it does appear if i click this button on the left i like this about a relief a lot you'll notice that in the file here it would keep track of all of my sections this is a great way for me to easily jump around in my own codes it's a quality life feature of latex same thing if i had multiple different tech files they would all be up on the left here as well so that's the one other place this is going to appear so now i need to make a title page so it appears in the presentation not just an overleaf there's my begin document then i have my mic title and then i'm going to want to have my frame which is my title frame so it starts the same way that it normally does i'm going to have a frame and i'm going to call this the title page and then i'm going to have an end frame as well and then the thing to put inside of there that makes the table of contents is shockingly enough table of contents so backslash table of contents i click compile and now let's scroll up to the beginning of my presentation and there it is i have this title page with these three different sections these are all links so if you're in the middle of your presentation you can always go for example to the dummy and this goes down to these dummy frames that we stuck down at the end or if i want to go up to the math section i can start seeing some of those scrolling down here you can have sub-sections and sub-sub-sections so i'll do a sub-section let's call this a dummy sub-section this is going to slightly change the organizational structure but from the presentation perspective the only thing that places it is that up here in the title page there's the section dummy in the subsection dummy subsection so i've given you most of the tools to do the presentation itself but i'm a big believer in having handouts with my presentation so that people are able to read what i've got as well and so i'm going to come up here and show you how to do handouts in the parameters for the document class i'm going to also add a handout and then i should specify some characteristics of this handout so i have to copy and paste some code here the thing i'm going to do to make this all work is something called pgf pages and then i'm going to set the layout for that pgf pages by the command pgf pages use layout it's going to be four on one you could also do two one one here four on one is going to specify four different frames per page four different slides per page rather and then if i click compile here i spent what type of paper it is i've talked about the border and how it's going to look as i scroll through here now i get these nice documents where i've got four different slides on a single piece of paper single piece of a4 paper you can use this to then print it out and it just prints it out in a more efficient way don't like it comment it out and we're just right back to where we were at the beginning okay so we've been editing for quite a while now we've done a lot of work on our presentation and suppose we realize that we really screwed up and that we actually have accidentally deleted something that we've done a while back so i want to show you this really really really life-saving feature in overleap which is the history button if i come up here to the history button then i can go back you know right now it's just about four o'clock but i've been doing this for about 40 minutes now probably cut it down a little bit so it's shorter for you and i can go back how let's go all the way back to the beginning let's just see what this one looks like that was our very first thing before we started adding any content and as i click through the different versions it gets longer and longer and longer until we get all the way back to what we were just talking about and i can compare my versions and this is just really nice for making sure that you haven't really lost anything once i'm happy i probably want to share with some collaborators so i'm going to come up and click the share button here and i can share either via link or via an email address with any collaborators who can come along and work with me and leave comments and track changes on the document so this is one of the reasons why i really like using overleaf specifically as a latex editor while i'm making my presentations or anything else i might be doing in latex so again thank you to overly for sponsoring today's video and that brings us to the end so please if you have any questions or thoughts about latex and beemer leave them down in the comments below and we'll do some more math in the next video
Info
Channel: Dr. Trefor Bazett
Views: 165,649
Rating: undefined out of 5
Keywords: Example, math, LaTeX, Presentation, Beamer, documentclass, preamble, frame, slide, itemize, list, handouts, how to make a science presentation, how to make a math presentation, how to make a presentation with beamer, title page, beamer themes, beamer colors, how to write a thesis, how to make a defense, defense presentation, powerpoint, math equations, stem
Id: rx7wwtmFlD8
Channel Id: undefined
Length: 22min 13sec (1333 seconds)
Published: Wed Aug 03 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.