LaTeX for Students – A Simple Quickstart Guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome everyone i'm jake and this video is titled student's guide to latex it's pronounced attack but i'll call latex it's a tough habit to break anyway in this video i hope to give a brief introduction to latex focused on how a student can get started using it easily many videos i've come across are too complex so i've kept this simple but by the end of the video you'll feel ready enough to begin using latex feel free to jump ahead or back through the video using the time stamps in the description now first i'd like to give a brief introduction to latex now what is it latex is a software system for document preparation in a way a sort of markup or programming language it produces beautiful looking documents in a professional manner and it's also used in professional fields like mathematics really any stem field now students can find uses for latex everywhere though the obvious places are in math and science classes in this video i hope to offer a simple introduction to convince you to use latex and to give you a running start in doing so so i invite you to put aside your old prejudices and come try something new and i promise it is certainly worth it in the long run now that my introduction is over let's begin writing some latex i suggest using overleaf.com for this it's sort of the google docs of latex with cloud-based storage and compilation that you can access through your browser go to overleaf.com it gets signed up it's easy and then create a new project like so you'll have your window here click new project click blank project and it'll put in and i'm going to put in a brief name once it's loaded you'll see the three main panels now on the left is your text and on the far left is your file browser and on the right is the generated or compiled document now you could write your paper in here but i personally suggest against that maybe write in something like word google docs text edit and then paste it in here and you can do the formatting so first just to see how it'll look let me throw in a chunk of text here so we can see it so i've put a little bit of text from my script you can see right here and i'll just click recompile in the top right here and you'll see that this text is going to be compiled into the document so now we have some really basic documents being created but first let's go over the structure of this file now first is the preamble and that's all of the text above the begin document line that you can see right here now these lines will configure your language your document type the title date any random preferences and more these first two lines here define the class now article is a basic paper you could also use something like book if you wanted to write a book and with chapters now the next line input enc defines what type of characters we'll be using now if you don't understand it don't worry about it at all it's just some basic boilerplate the next three lines are your title lines and these are pretty self-explanatory your title the author and the date and you can see that these get compiled automatically to produce a title right here now we can look at the basic structure of the document itself latex has sections subsections subsections and so on now here we have a section sections are numbered with a whole number one two three etc so let's try adding in a subsection so to do so use a slash subsection curly braces line like so now inside these curly braces you can put in the title so i'll put subsection one and we can put in a little bit of words below that now i'll click recompile and we'll see the subsection be created and there it is 1.1 because it is a subsection of section 1. now of course you could do another subsection like so and here's subsection 2 and it was automatically assigned the number 1.2 now at this point you could really begin writing something in latex but if you're at all using it for math and science classes i'm sure you'll want to learn how to use math and most people would probably want to learn how to modify things like margins and the font size because this could definitely use some work so stick around for that now that we've gone over the basics let's see how to write some math which is one of the key features of latex now first we need to add a few lines to the preamble which will include the math packages and you can think of packages like an app or a plugin that gives extra functionality or changes something so to go up to the preamble we'll just go to the top and right under this first use package will make a new line and you'll type the following slash use package and the curly braces and inside we're going to put the three ams math packages like so these will give you access to all the required equation commands as well as some really good symbols that you're likely to use in whatever math you'll be writing now that we have those in we can start with some math now math can be a bit tricky at first so i'll just write out some examples the first example will be of inline math to do inline math meaning in the same line as your text put in two dollar signs and inside you can write your math equation so here's a basic example if you want to follow along so i've written some text and then i'll just press the dollar sign on my keyboard and overleaf will automatically place another one to close it off and inside i'll write the equation e equals m c squared and that carat two is for an exponential if you want a subscript you could do an underscore as well so now that we have that math in i'll just click recompile and we'll see how it looks and there you go we have this line and you'll notice everything inside the dollar signs is in the math environment now the reason we need that math environment created by the dollar signs is text will render differently inside an equation additionally inside a math environment we can use complex symbols like this next example here i'll introduce you to a basic latex math command with this little example i'll use the slash the backslash that is and i'll type sum and then i'll write out this equation and as you can see right here we get this uppercase sigma which signifies the net force and it really looks nice and this is a lot more powerful than what you could do um using something like google docs or microsoft word and it looks very clean and it's easy to use next to get a little more fancy we can do what i think of as a big or numbered equation to do that you need to open an equation environment like so and you'll see once equation is suggested by overleaf you can hit enter and it'll auto complete and inside we can write another equation this one's a bit more simple and as you can see we get a much larger and numbered equation you could even give it its own number or its own label and what's really neat is you can refer back to these later so maybe five pages down you could reprint the same equation without having to retype it all you can also do multi-line equations to keep the length of this video down a bit i won't go in depth but this is what it can look like feel free to just copy this right here and also have some resources in the description to help you better understand how to create multi-line equations this can be useful to show the steps of solving an equation or maybe the derivation of an equation now to close out the math portion of the video i'd like to briefly show this website called detextify and this can be useful when you're first trying to understand how to write latex equations now what you do is you can just draw with your mouse or your trackpad inside this box whatever equation you want and it'll use its algorithm to try and figure out what you're talking about so i'm just going to do some sort of basic equation or a basic character right here and let's see if it can figure out what i'm talking about and there's the epsilon right here let's try one more and there is the sigma just like i wanted and you can also see there are a lot of different variations of these and you can feel free to choose whichever one you feel fits your project best or which one is most visually appealing now basic structure and math is out of the way we can learn how to do images images can definitely get a bit tricky but the neat thing is once you have done one you can simply copy and paste for the rest first let's make a folder for our photos called images like so then we're going to need to add a little bit to our preamble like so we're going to add the graphic x and flow packages we also need to tell graphic x where our images are going to be stored and to do so we'll use the following line you'll do you'll use a backslash graphics path double curly braces images slash double curly braces and that's it first to put in our image we'll open a figure environment and as you can see overleaf actually auto-completes a lot of this the only thing we need to go is go up here where it says begin figure and add in square brackets a capital h now this will improve the placement of your images and make it more how you would expect so now we can fill in caption and i'll just say my caption and now inside this include graphics we'll add a or sorry on the outside of this include graphics rather we'll add square brackets and we'll include how wide we want the image to be so i'll just do width equals 5 inches and this is another place where latex really shines in programs like word and google docs using images can get really frustrating when you start to use a lot as it seems like moving one image can set off the whole document but here we can really set the absolute width of an image so now all that's left to do is actually upload our image to upload our image you just want to click the upload button in the top left here and drag in the image and i've called mine photo.png and then drag it into the images folder now that it's in all i have to do is type in the file name of the image exactly as it reads and now we'll be ready to recompile and as you can see after recompiling our document we get our image included right here now you might notice this little warning symbol right over here on line 62. overfill hbox too wide now what this means is that your image is just a little too wide or how you've configured it is just a little too wide that it's overflowing the margins we have said right now so you could ignore it or you could change the width until it's fixed so i'll just change it to four inches and let's see if the error goes away and it does now sometimes you won't want to have to change the width of your image or the height of your image to make it fit within the margins sometimes you'll want to change the margins themselves or maybe you'll want to increase the line spacing or modify the tab width anything like that and what's beautiful about latex is this can all be done automatically with just a few lines uh in your preamble and that's what i'll cover in this last section which is basic customization so we'll go over changing the page setup and modifying spacing first the geometry this is a pretty self-explanatory line it says the paper size margins and the height rounded parameter which i've been told is a good idea to have now you can see right here if you wanted to change any of these parameters it'd be very simple to say oh well i want my top margin to be 0.8 inches so just change it like that and i'll recompile and we can see what sort of difference this makes as you can see our margins are much wider so for example if your class said the margins need to be one inch on all sides you could easily modify this line to just read one inch 1.0 inches on every side next up is baseline stretch now this command changes the line spacing to something a bit more reasonable now i think 1.15 is good now you should know that the numbers do not quite correspond to line spacing in other programs for example to do one half spacing set this number to 1.25 and to double space and set it to 1.667 i won't go into the details but it's sort of a silly uh reasoning behind all that situation um but if you want to understand i'm sure you could do a google search i'll set it to 1.667 so you could see what double spacing might look like as well and again you could modify this to fit whatever requirements your teacher your class or whatever you're submitting to might have for your document finally part indent and parskip par indent changed the size of the tab placed at the beginning of paragraphs i set mine to zero as i like how that looks that you could leave it be par skip is the space between paragraphs as you can see right now there is very little space between each paragraph now i like a little bit extra space so i set it to 0.8 ems an em is unit of type equal to one point size so 16 point font means one em is 16 points it also happens to be the same as an m dash anyway let's recompile using these two lines and see how it looks i really think these are important lines at least in my writing i think this makes it look a lot cleaner and a lot better now if you also wanted to make your paper look a bit longer you could modify some of these parameters let's say you made the parskip 1.2 you made your line spacing 1.25 you can get your paper to be a little bit longer than it might be by default and with that that's all the information i had to offer i hope that this video has been informative and has also inspired you to give latex a try it can take some setup and some getting used to but i promise it's worth it it will feel like it's making your work take longer but again just keep going at least for once you'll like the results if you run into trouble the internet is your friend any question you have i guarantee can be solved in less than five minutes using a quick google search anyways i hope you enjoyed this video and learned something if you have any questions comments video ideas anything feel free to leave them in the comments below i try to reply to all of them
Info
Channel: Jake B
Views: 87,412
Rating: undefined out of 5
Keywords: tex, TeX, latex, LaTeX, overleaf, xelatex
Id: lgiCpA4zzGU
Channel Id: undefined
Length: 13min 50sec (830 seconds)
Published: Tue May 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.