A Student's Guide to LaTeX: Simplified Introduction and Practical Tips
Learn LaTeX basics with Jake's easy guide. From setup to math equations and images, get started quickly and efficiently. Perfect for students!
File
LaTeX for Students A Simple Quickstart Guide
Added on 09/08/2024
Speakers
add Add new speaker

Speaker 1: Welcome everyone, I'm Jake, and this video is titled, Student's Guide to Latex. It's pronounced latex, but I'll call it 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 timestamps 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 and get 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 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, TextEdit, 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 in a little bit of text from my script that 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, et cetera. 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 one. Now of course you could do another subsection like so. And here is subsection two, 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, just go to the top, and right under this first use package we'll make a new line, and you'll type the following. Slash use package and then the curly braces. And inside we're going to put the three AMS math packages like so. These will give you access to all of 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 MC squared, and that caret 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 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 I'll 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 character right here, and let's see if it can figure out what I'm talking about. 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 that the 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 graphicX and flow packages. We also need to tell graphicX where our images are going to be stored, and to do so we'll use the following line. You'll use a backslash graphicsPath 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 autocompletes 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 a 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 five 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'll 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 set 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 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 is geometry. This is a pretty self-explanatory line. It sets 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. So let's go ahead and 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 1 inch on all sides, you could easily modify this line to just read 1 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 it set it to 1.667. I won't go into the details, but it's sort of a silly reasoning behind all that situation. 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 or your class or whatever you're submitting to might have for your document. Finally parindent and parskip. Parindent changes the size of the tab placed at the beginning of paragraphs. I set mine to zero as I like how that looks, but you could leave it be. Parskip 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 a 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 em 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.

ai AI Insights
Summary

Generate a brief summary highlighting the main points of the transcript.

Generate
Title

Generate a concise and relevant title for the transcript based on the main themes and content discussed.

Generate
Keywords

Identify and highlight the key words or phrases most relevant to the content of the transcript.

Generate
Enter your query
Sentiments

Analyze the emotional tone of the transcript to determine whether the sentiment is positive, negative, or neutral.

Generate
Quizzes

Create interactive quizzes based on the content of the transcript to test comprehension or engage users.

Generate
{{ secondsToHumanTime(time) }}
Back
Forward
{{ Math.round(speed * 100) / 100 }}x
{{ secondsToHumanTime(duration) }}
close
New speaker
Add speaker
close
Edit speaker
Save changes
close
Share Transcript