LaTeX – Full Tutorial for Beginners

**Calculus Notation: A Comprehensive Guide**

In calculus, notation plays a crucial role in expressing mathematical concepts and formulas. In this tutorial, we will explore the basics of calculus notation, including variables, constants, and mathematical operators.

**Variables and Constants**

When working with calculus, it is essential to understand the difference between variables and constants. Variables are letters or symbols that represent unknown values, while constants are numerical values that remain unchanged throughout a calculation. In calculus, we often use Greek letters such as alpha (α), beta (β), gamma (γ), delta (δ), epsilon (ε), zeta (ζ), eta (η), theta (θ), iota (ι), kappa (κ), lambda (λ), mu (μ), nu (ν), xi (ξ), and omicron (ο) to represent variables. We also use Latin letters such as A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, and Z to represent constants.

**Mathematical Operators**

In calculus, we use various mathematical operators to perform calculations. The most commonly used operators are the plus sign (+), minus sign (-), multiplication sign (×), division sign (/ or ÷), exponentiation symbol (^), and root symbols (√ or √). We also use the equals sign (=) to indicate equality between two expressions.

**Definite Integrals**

A definite integral is a mathematical notation used to calculate the area under a curve. The general form of a definite integral is ∫[a, b] f(x) dx, where f(x) is the function being integrated, and [a, b] represents the interval over which we want to integrate. We can also use the limit as n approaches infinity to represent the definite integral.

**The Limit as N Approaches Infinity**

To calculate a definite integral, we need to find the limit as n approaches infinity of the sum of f(x) sub k times Δx, where k ranges from 1 to n. This is represented mathematically as: ∫[a, b] f(x) dx = lim (n→∞) [f(a) + f(a+Δx) + ... + f(a+(n-1)Δx)] × Δx.

**Riemann Sums**

A Riemann sum is a mathematical notation used to approximate the area under a curve. The general form of a Riemann sum is: ∑[k=1, n] [f(x sub k) + f(x sub k+Δx) + ... + f(x sub k+(n-1)Δx)] × Δx. We can simplify this expression to represent the definite integral.

**Displaying Calculus Notation**

To display calculus notation correctly, we need to use specific commands and symbols. For example, to create a limit as n approaches infinity, we use the command: ∫[a, b] f(x) dx = lim (n→∞) [f(a) + f(a+Δx) + ... + f(a+(n-1)Δx)] × Δx.

**Vector Notation**

In calculus, we also use vector notation to represent mathematical concepts. The general form of a vector is represented by the symbol: v = V1 times Vector I + V2 times Vector J. We can use angular brackets to represent the vector in component form.

**Conclusion**

Calculus notation plays a vital role in expressing mathematical concepts and formulas. By understanding the basics of calculus notation, including variables, constants, mathematical operators, definite integrals, Riemann sums, and vector notation, we can accurately express and solve complex mathematical problems.

"WEBVTTKind: captionsLanguage: enlatex is a type setting system for creating professional looking documents commonly used in Academia and scientific publishing with the focus on content rather than appearance Michelle crummel is your instructor in this latex course for beginners she is an experienced teacher with multiple mathematics degrees welcome I'm Michelle crummell and in this video I'm going to show you how to get started using latex latex is a document markup language and it's used to create professional looking documents with consistent formatting it's especially useful if you're typesetting mathematical notation so it's great if you're writing a paper that contains mathematics if you're creating tests and quizzes or typing up homework assignments I use it for other things too like creating slide presentations and even writing letters of recommendations it has many many uses as a teacher some of the main reasons I prefer using latex over word processors besides just how professional it the output looks is that latex is cross-platform it's backwards compatible it produces PDF files that are small and can be opened on any device and it's free open source and highly customizable but before you get started creating your own latex documents you have a decision to make do you want to work and store your files online or offline the advantages of working online are that you don't have to download install or update any software onto your computer so you can get started right away you can even work collaboratively in real time using shared documents the advantages of working offline on the other hand are that you have complete control over how you organize and store your files and you don't need an internet connection to work on your files both options work really well it just depends what's going to be best for you so I'm going to start by showing you how to work online because for a beginner that's probably the fastest and easiest way to get started so to work online we're going to use a website called overleaf so you can just do a Google search for overleaf or you can go right to overleaf.com now I already have an account set up so when I went to overleaf.com it automatically logged me in but if this is your first time visiting overleaf you will want to create an account and you can do that using an email address so because I don't have any files created so far in my account this is the screen I'm seeing when I log in once you create at least one Tech file you're going to see a different screen when you first log in and you'll see a list of all of your files but for now we're going to click on create first project and we want a blank project and you're going to have to come up with a name for your project I'm just going to call this tutorial one so when we create a new project in overleaf it's automatically going to populate some code for us this is really really just the basics here and we can see that we have sort of three Windows here on the far left this is going to show us our file structure the name of our Tech file is main.tech and then in the middle here we have the place where we're going to be typing our code and then over on the right we have our PDF output so we can see what our final document is going to look like so just a couple of things to point out here when you make any changes to the code and you want to see what they look like in the output you are going to have to click recompile when you make changes over here it's not going to automatically update on the right you do have to hit recompile and generally if you're not working in overleaf you're not going to get this sort of starter template here you're just going to have an empty slate to work with now if I try and compile right now I'm probably going to get an error because there is no code let's see what happens yeah so it's not giving us just a blank PDF it's actually coming back with an error and saying that it can't compile the code and that is of course because we don't have any code so let's just do some really basic code in here in overleaf and then I'm going to switch over and show you how you can work offline that's my preferred method and that's what I'm going to be using in my future tutorials so to start our document we're going to hit backslash and we want to make sure that we are always using the backslash and not the forward slash so the backslash is starting our Command and then I want document class now as I start typing document class you can see that it's kind of guessing what I'm going to be typing and I can now just click on that to complete the command or I could have just continued typing it out with my keyboard so we have document class then we have a pair of square brackets followed by a pair of curly brackets and we have to type something in these brackets this is part of the code so in the curly brackets at the end we're going to Define what kind of class that we're using and for us it's going to be an article now that doesn't mean we're writing an article like a newspaper article but that is just the name of the class the type of document that we are creating there are other document classes that you can use for example if we had entered Beamer there we would be creating slides almost like a PowerPoint presentation if we typed exam there then we have a different type of class where that I use for creating tests and quizzes but most of the time I use article now the square brackets these are for optional arguments so I could actually delete the square brackets and not use them at all I could even just leave them there blank with nothing inside but here we can type some options so one of the things that we can type in here is the font size so I think the default is 10 point I'm not sure I always use 11 points so now I can't even remember now what the default is but if we want to use 11 Point instead of 10 point or 12 point then we can type that the PT stands for point and that's going to change our font size now if I try compiling right now I have some code here right I suspect I'm still going to get an error yeah I'm still getting error because I haven't really started my document yet there's no real content in here so that's like the bare minimum that you need to declare before you actually begin your document the next thing we're going to type is backslash begin and then in curly brackets document so again it's anticipating what I want I can just hit enter and it will fill in for me or I could have continued to type it out on my keyboard now when I hit enter notice not only did it give me begin document but it also gave me end document so this is a command that comes in a pair it's got a begin and an end if you type backslash begin document and you forget to type backslash end document your file will not compile so it knows when it sees a begin to be looking for a matching end so we want to make sure and do that and it's a good idea to go ahead and just type the ending command and then move your cursor back in between and type the rest of your content so you don't forget and let's do just something really basic like hello and I'm going to compile recompile and see what we get so we do have something now something on the screen you can see that not everything I typed in the code is showing up on the screen the commands aren't going to show up but the text itself is and we can use the color coding to kind of give us an indication of what's what so the text that I typed is colored black whereas the commands the backslash document class backslash begin backslash end those are blue so we can distinguish between them so let's type a little bit more than that this is my first latex document and recompile it's a good idea to compile frequently because if you wait for too long before you compile you may end up with five or six errors and then it's very difficult to go back and figure out exactly where the errors happened you know it ideally you would only want you know one error to deal with at a time so it's it is a good idea to compile frequently and that way you can catch any errors right when they when they happen all right so hello this is my first latex document and you may have noticed if you've been kind of looking at things online that the the word latex is often typeset in a very particular way it's kind of got a special font if you will to make it look a certain way and we can very easily accomplish that here by putting a backslash in front of latex now you do have to spell it exactly how I spelled it with a capital l a lowercase a a capital t a lowercase e and a capital x so let's recompile and see what happens now actually this doesn't look great I mean it's nice that uh the word latex is typeset correctly but there's no space between the X and the word document so to get the space in there I'm going to just put another backslash at the end of that command okay and that fixed that right up now you might be wondering why it's spelled l-a-t-e-x and I keep saying latex and not latex the letter at the end of the word is actually not an X it's actually the Greek letter Chi and the Greek letter Chi sounds more like a k than it does an X it doesn't sound exactly like a k but that's the closest I would say letter in our alphabet to what it sounds like so it's a it's like a hard k sound it's not an X sound at the end a lot of people say latex instead of latex both are correct it's just a matter of preference so there we are which is just a really basic document that we've gotten started here and I do want to do a little bit more with this to explain especially like how line breaks and some very basic format formatting works but I'm going to go ahead and switch over now to working offline and show you how to do that if you have lots of latex files like I do I mean I have thousands and thousands of latex files that I create um I prefer to be able to store them on my hard drive if I'm working an overleaf everything kind of gets let me go ahead and show you before we leave I'm going to hit this up Arrow to go back to kind of this main screen here and if I list all my projects I only have this one that I created tutorial one but as I start creating more projects you're just going to see a long list of files here I like to be able to put things in folders and subfolders and in some cases Sub sub folders and move things around on my computer to store things the way that I want so that's the one downside I personally find with using overleaf is just the file structure and how you store and find things now you can tag your files which does allow you to filter things and make it easier so instead of having a list of 100 files you know maybe you can narrow it down by by tags and that does help a bit so if you do want to work offline you are going to need to install some software on your computer and there are two pieces of software that you need to create latex documents you need a latex distribution and then you need a text editor so the latex distribution is what is going to turn your code into some kind of output file like a PDF file the text editor is just what you use to type the code and there are all kinds of text editors right you can even just use notepad something really basic as a text editor to type your code it's important when you're installing these two pieces of software that you do so in the correct order install the distribution first you need to install your latex distribution first so I get quite a few comments people asking for help and saying you know they're they're trying to compile their first file and it's not working they're getting errors it's really important that you install your distribution first so that's up and running and then install your text editor and try using your text editor okay so what you what are you what should you install where there's lots and lots of options and then your options are going to be different based on whether you are a Windows PC user or a Mac OS user so if you have a Windows computer then my recommendation is to install mictec as your latex distribution you're going to do that first and then to install tech maker as your text editor now mid Tech when you install it does come bundled with its own text editor and you can use that I just don't find it as user friendly as tech maker tech maker is so wonderful for people who are starting out with all of the nice options and and the way that it color codes things and the way that you can create macros I really love techmaker and even though I'm not a beginner I that's still my go-to program for editing latex code if you are a Mac User I'm a Mac User then you want to install Mac Tech for your latex distribution and tech maker for your text editor okay so again please install your distribution first so that's either mctech or Mac Tech and then once that is installed you can install the text editor and all of this is absolutely free to download install and use so here I am in tech maker right so because I'm on a Mac I've got Mac Tech installed as my latex distribution now Mac Tech is not something that you would ever like click on and open it just works in the background the text edit editor is what you're going to interface with so I don't have to worry about Mac Tech or creating a shortcut um you know to it or anything like that you can once you have it installed and it's working you can just completely ignore it but tech maker my text editor is what I'm going to use to create my documents and type my code so right now I'm in techmaker now I this isn't a fresh install so I'm not sure that my screen looks exactly what like what you will see when you first log in it's possible that um that you have see this structure thing turned on here uh I'm just clicking through some of these other right now what I'm seeing looks more like what we saw in overleaf where you've got some um information over here I mean there's nothing here yet because we haven't created anything but some file structure information over here and then in the middle is where we will be typing our code and then over here on the right is where we will be viewing our PDF but to save on some screen space I really don't need to see the structure tag tab so I'm going to turn that off and then my messages log I mean it's I can turn it off it's going to automatically come back up when I compile so it's not that important the PDF viewer I do want to be able to see my PDFs as I work so I will leave that showing now we don't see anything because we we're not actually working in a file at the moment so the first thing we're going to do here is to create a file actually the first thing we should do is look at our preferences and and make sure that we have some good options selected so I'm going to go into tech maker sorry that's just a cut off you can't see that but if you go to your your menu here click on tech maker and preferences and I think it's different on the Mac version if you are on a Windows PC you might have to go to like preferences or options but somewhere in here you should be able to pull up the window that I'm seeing right now so it might be called options or it might be called preferences based on whether you have the Mac version or the windows version okay so what in this first screen for this commands tab you want to make sure that you have this box checked right here PDF viewer we want to embed the PDF that's what's going to allow us to see the PDF on the right and the code on the left so we want to check that box I'm using my built-in viewer to view the PDFs and then you also want to check this box down here launch the clean tool when exiting techmaker that's really useful when you create latex documents and you close your document you're going to see a lot of files that are created in that process you have your Tech file you have your PDF file and you have log files and a bunch of other files and really the only ones that you are going to need are the tech file which is you know your source code and then your PDF your output so just those two files so if you click launch the clean tool it will automatically delete all of those like helper files and make your just your folder structure and navigation so much easier to to deal with if we go to quick build you want to make sure that you've selected PDF latex view PDFs if your intention is to create PDF files under editor you can change some of these options if you like I normally don't have my font size this large but for the purposes of the video I want you to be able to see what I'm typing more clearly so I increased that I usually have it about 16. word wrapping I I recommend that you do keep that on and completion if you like that that's if you start to type a command it's going to suggest what it thinks that you're trying to type so you can just hit enter and then show line numbers is also really helpful because when you get error messages sometimes you can look at the line number and go right to that line number and try and figure out what the error is back up your document every 10 minutes you can turn that on if you like I I don't have any particular reason why I did not have it turned on let's see everything else looks pretty good shortcuts these are just keyboard shortcuts that that you probably don't want to worry about when you're first starting out but you might want to take a look at those as you get more comfortable with this okay so let's create our first document now you do have to actually create a document so I'm going to click on new here or you can use the menu and click on file new now this new document here it says Untitled we haven't saved it yet so I haven't actually created anything and even if I type some code and try and compile it I'm going to get an error message you have to save the file first name it and save it first before you're going to be able to compile it so don't skip that step because that can be frustrating you're wondering why this is not working you actually have to save the die it's not enough just to say I'm here I'm creating a new file you actually have to save it so file let's save this and I'm just going to call this tutorial one tutorial 01 now one thing I want to stress here is that you should never use spaces in your file names for your Tech files don't use spaces if you don't like your words all running together you can do something like a hyphen hyphens are fine if you want to do that you can do an underscore if you want to do that like if you have want to put multiple words in your title I usually do an underscore when I name my files but do not use a space so I'll just keep the underscore in here and the file extension is going to be dot Tech but that's you know that's going to happen by default so I don't really have to type the dot Tech when I am naming that so I'm going to just open up that folder and show you what I've just created okay here we go so this is my file that I just created tutorial01.tech and you can see that there aren't any other files in this folder so let's go ahead and recreate just the basic code that we had when we were using overleaf so backslash document class and I'm going to fill that in I think we had 11 points it's an article and then backslash begin documents and we have our end document and then we said hello this is my first latex document now to compile this we see that we don't have a recompile button like we did in overleaf I'm going to click on this Arrow to compile the code and it used to be I just clicked on this arrow and it would run both of these I'm not sure what my issue is at the moment but it's it's making me click both arrows like over here to compile and then here to view the PDF this isn't generally the way I do it the way I generally do it is to just hit F1 on the keyboard so as I'm working throughout these tutorials if you wonder like how how is it seem to be refreshing so quickly you didn't see me come up here and press on the Arrow it's because I just hit F1 on my keyboard that's a really fast way to do it oh wait I think I do know why that's not working quite right so the PDF latex will compile the code and then view PDF is going to is going to refresh the PDF so we can view it over here but if I want to do both of those things at once what I actually want to select here is quick build so that when I click on this Arrow it's going to do whatever I have saved in quick build and if we go back to our preferences quick build is right here I have PDF latex view PDF in my quick build so when I choose quick build it's going to do both of those two things and then while we're in here I'm going to go ahead and uncheck this backup every 10 minutes and the reason I'm going to uncheck that is because if I leave that on then not only am I going to be creating a tech file and a PDF but I'm also going to be creating a back Bak file and I just don't want to have all of that stuff in my folders it's absolutely not a big deal if you want to leave it on there and have backup files in your folders that is perfectly fine so here's what we have so far hello this is my first latex document and we can fit this to the width so it's a little easier to see we can you know zoom in or outfit it to a full page and so I'm going to continue to work in tech maker but if you are more comfortable working in overleaf you don't want to hassle with trying to get the software installed and up and running that is perfectly okay you can still type the same code that I'm typing and your output should look exactly the same I'm gonna go back to fit width so we have we can see this a little bit better it's not too small on your screen and let's move on so I have you know one line typed here next I want to type a little bit of math so I'm going to say a rectangle it has side lengths of X Plus 1 and X plus three so let me hit return and type that out and because this is in a sentence I know that it would look better if I used parentheses around the X Plus 1 and the X plus 3 so let me do that and let's compile and see how that looks so again you can use the arrows up here I'm just going to hit F1 on my keyboard and this is what we have now this might look okay to you it doesn't look that great to me there's a couple things I want to point out the first thing you might notice if you're used to working with a word processor is that a rectangle has side lengths of X Plus 1 and X plus 3 is not on a new line it just continued at the end of the first line and when we look at the code that's not what we might expect to happen because in in a word processor when you hit return right here then the output actually shows that you hit return right there and that's not going to happen here with our code our code is only going to create a line break if we tell it to create a line break and there are two ways to create line breaks and the same thing is true in a word processor there's two ways to create line breaks you can do a soft return you can do a hard return so a hard return is going to start a new paragraph if I want a hard return what I want to do is to just insert a blank line in between hello this is my first latex document and then the next sentence so if I leave a blank line in between those two sentences then the compiler knows to insert a hard return so let's compile recompile that and now we can see that we did in fact get a hard return so a rectangle has side lengths blah blah that is the second paragraph now that's a hard return if you want a soft return so let me go back here if you want a soft return then at the end of your line where you want the line break you type two backslashes okay so we will compile that and now we can see that we got a a new line for a rectangle has side lengths of however this looks a little bit strange right it looks different than what we saw before because a rectangle is starting further off to the left than hello this is a soft return so it didn't create a new paragraph and therefore the line is not indented so by default I haven't typed much code granted but by default here new paragraphs are going to be indented so the hello is indented a rectangle is not indented because it was just a soft return it's not a new paragraph now you can do something like this but it's it's not preferred what's going to happen if I do this let me turn on my messages log oh it actually didn't mind it okay I was expecting it to not like the combination of the soft and hard return there but it seems to be okay I like having this space in my code because it makes it easier you know for me to go back and find things versus this where everything just kind of runs together but you can decide which one you like better softer turn or a hard return there and you there are also ways that you can turn off the indenting because remember whether you do a softer turn or hard return is going to affect the way that your paragraphs are indented or your lines are indented so let's go ahead and do a hard return right these do seem like they're probably separate paragraphs and we'll update that I'm just using F1 to recompile and there's still an issue here something that's okay but it's not great and that is that the x that I typed doesn't look like math it just looks like the letter X as if I had typed a word with an X in it so when we type variables in math typically we want them to be italicized so they look like variables and that's going to happen automatically as long as we tell the compiler that hey this is math it's not text so we're going to use something called Math mode to enter Math mode you type a dollar sign to start Math mode and then another dollar sign to end Math mode and you can see that the color changed when I did that when I typed that first dollar sign everything after the dollar sign turned green so Math mode things are going to be green and then when you end Math mode everything that's outside of math mode is going to go back to its normal color so the word and is black that's text mode okay so Math mode text mode and I want this X plus 3 to be in math mode as well so I'm going to type dollar signs around the X plus 3 and let's recompile and we can see the difference visually now that X is italicized the spacing is a little nicer because it knows that it's math and it needs to space things in a certain way to make everything look uniform all right I'm going to add some more to this I'm going to add another sentence so we have a rectangle has side lengths of X Plus 1 and X plus three I'm going to say the equation a of x equals x squared plus 4X Plus 3. gives the area of the rectangle so I want you to just anticipate what's going to happen when I compile what do you think this is going to look like so I'm going to hit F1 to compile and I have encountered my first error okay I can see that below here these things are popping up in red something has gone wrong something's wrong on line six and line seven and it's kind of giving me an indication it says missing dollar sign inserted right it didn't actually insert it for me but that is a a clue for me of what went wrong oh I probably forgot a dollar sign somewhere so a of x equals x squared now the letter A the letter X like those could be text so that's not what caused the issue I think it was this symbol right here this carrot symbol is only going to work in math mode it's not going to work as text so I'm going to put my equation in math mode by typing dollar signs around it and now we should be okay so again we see that the paragraphs are indented now that now that the paragraph is long enough to wrap down to another line we can see the way the indenting is working here so things are not great right this is okay it's in math mode the math actually looks good except for the fact that a of x equals is on one line and then the rest of the equation is on another line so that's not great if you want to make sure that to um keep your equation on a line you can put curly brackets around it and now when I recompile it's going to protect that for me so a of x equals x squared plus 4X plus 3 all got pushed down to the next line okay so looking pretty good still like if I I mean I'm still not that happy with it I think there should be some space between the paragraphs right but you know we're just talking about the basics right now so the next thing I want to tell you about is the difference between there's kind of two different math modes there's displayed Math mode and then there's inline Math mode if you use displayed Math mode whatever is in your displayed Math mode is going to be on its own line so we often see this in math textbooks where equations are put on their own line and to enter displayed Math mode all you have to do is type two dollar signs to begin displayed Math mode and then two dollar signs to end displayed math modes let's recompile and now we see that the the math in displayed Math mode got centered on its own line and there's some nice spacing there to separate it from the text and then the text just continues after that it's this is still happening like within a paragraph versus inline Math mode like the X Plus 1 and the X plus three those just appear in line with the text Okay so we've covered some basic information let's go ahead and I'm going to close this and then just show you now what I have in my folder where I created my tech file okay so if we navigate back to the folder where I created and saved my tech file now I see there are actually two files there there's the tech file that ends with DOT Tex and then there's the PDF file so the tech file is our code and here we can just see what that what just the text the code itself looks like there's a little preview of that and then here is the PDF so that's not all fitting on the screen let me make that a little smaller and there we go okay so that is the PDF document that I created check the description below for links to the files I created in this video as well as links to the software that I recommend using in the next tutorial we'll look at how to typeset commonly used mathematical notation using latex hello I'm Michelle crummel and in this video I'm going to show you how to type commonly used mathematical notation in latex I'm working with the software program called tech maker but you can use any text editor that you like if you watched my previous video creating a latex document I showed you how you can use overleaf so that you don't have to download and install any software overleaf runs right in your web browser so there is a link in the description below that you can click on if you want to create an overleaf account and work purely online if you want your screen to match mine exactly you're going to want to download tech maker make sure that you do have mictec or Mac Tech installed before you install techmaker so I am in techmaker right now and I'm going to create a new file so just click on that icon here and it looks like I have you know a new file ready to go it looks like it might be called Untitled one but actually we haven't saved this we haven't really created it yet so before we start typing any code this is very important we need to save this file and name it otherwise guys you could type all kinds of code in here and when you go to compile you're just going to get an error and it's not going to be able to do anything we have to save this file and name it first before we're going to be able to compile it so let's do that file will save as and you can save it anywhere you like on your computer I'm just going to call this one tutorial two and I mentioned in my last video you don't want spaces in your file names your text files should not have any spaces in the file name so use an underscore or a hyphen or simply just you know run all of the words together and that will automatically assign an extension of dot t e x to that file so here's my tutorial O2 Tech file and now I can start typing my code so we always start with backslash document class and tech maker is making this suggestion for me so I can hit enter as a shortcut here and have it fill in some of that for me now the square brackets are where we would Place optional arguments here it's unnecessary if I didn't want that I could delete that and just have the curly brackets we do need the curly brackets here the clasp that we are using today is article so that's fine I can do that if I do want to include some optional arguments one of the more common ones would be to declare the font size so your choices are 10.11 point or 12 point I usually like to go with 11 point and then we're always going to have backslash begin document and backslash end document that pair of commands there so I'm not going to compile yet I don't actually have any content we have to start typing something first we're working on mathematical notation today so I'm just going to go through lots of different categories and then show you how to type various Expressions that you might need so let's start with superscripts so I'm just going to type the word superscripts and now that I have something here when I build we should be able to see that and I'm just going to set this to oops not that um let me just set the width here so that we're seeing the whole page that that looks about good right there okay so superscripts and we want to actually type something with the superscript in it so that was just in text mode and I'm going to type 2x to the power 3. so 2x cubed 2x for the exponent we use that carrot symbol from the keyboard so there's 2x cubed however if I compile this right now I'm going to get an error because this carrot symbol needs to be in math mode not in text mode so to put this in math mode remember we wrap it in dollar signs and now I can build so I'm building by hitting this Arrow up here which is quick building for me so it's doing two things it's compiling the code and producing the PDF that we see over here on the right but I usually prefer to use my keyboard shortcut which is just F1 so if you don't see me come up here and press this button in the video then it's because I just hit F1 on my keyboard if I hit F1 then it will compile so I can tell that the 2x cubed is in math mode because it turned green that's one of the nice features about tech maker that I like it does color code different parts of the code so it's easy to keep track of what you're doing and if we look at a result we've got I mean it's okay superscripts 2x cubed but I would like to separate the 2x cubed from the text and put it on its own line so we're going to do that by using displayed Math mode I'm going to use two dollar symbols at the beginning and the end of that and it puts the math mode on its own line centered on the line like so so next we're going to look at 2x to the power 34. again I'll use this displayed Math mode 2x to the power 34. so think about what that's going to look like the fact that I used double dollar signs means it's going to be placed on a separate line and it'll be centered on that line so I don't have to worry about putting in any kind of manual line break like we practiced in the first tutorial the double dollar signs will automatically start a new line for me so that's fine but if I want 2x to the power 34 what I'm expecting to see is x in the base and 34 in the exponent and if we build this and let me zoom in a little bit more so it's easier for you to see if we build this you can see that the 4 didn't go up into the exponent so by default when you use this Keras symbol only the single digit that comes next is going to be placed in the exponent if you want more than that in the exponent then you have to use curly brackets and you can use the curly brackets even if you only have a single digit but I normally don't bother if it's just a single digit I don't bother putting the curly brackets but now when we compile we can see that the 34 has moved up into the exponent which is what I had intended so another example let's do 2 times x to the power 3x Plus 4. 2 times x to the power 3x plus 4. so if I want 3x plus 4 all to be in the exponent then I need to put curly brackets around that and that looks like I expected it to look and then let's do 2x to the power 3x to the fourth plus 5. so we're going to have an exponent inside of an exponent so 2x to the power curly brackets now generally when I'm doing this I find it quicker and easier if when I type the first curly bracket I go ahead and type the end one as well so that way I don't forget it at the end especially if I'm going to be using multiple curly brackets just makes it less likely that I'm going to forget to close one of my opening brackets and then sometimes I'll even just go ahead and go and do the same thing with my dollar signs and then I can just back up and enter what I need to inside of the brackets so we're going to put 3x to the fourth plus 5. 3x to the power 4 plus 5. so this exponent here I didn't bother to use the curly brackets I could have wrapped the four and curly brackets but since it's just one single digit in the exponent it's unnecessary okay so now we have 3x to the power 4 plus 5 all in the exponent here and now let's move on to subscripts subscripts work in a similar way so let's start with x sub 1 x sub 1 to get the subscript you use the underscore is that what it's called underscore and then whatever you want in your Sub sub script and again it will only put the next single digit into the subscript unless you use curly brackets so here we've got x sub 1 and if I want x sub 12 for example x sub 12 this is not going to work it's still going to just do x sub 1 and then put a 2 right next to that so that's not what we want here we want 12 to be in the subscript so we put curly brackets around the 12. and now we've got 12 in our subscript you can have subscripts inside of subscripts as well so let's just do x sub 1 sub 2. and I think this might cause an error if we just type it like this yes it did cause an error so we have to use curly brackets here so the compiler knows what it is we're trying to do because it's different if you want x sub and then 1 sub 2 versus x sub 1 sub 2. so you have to decide how you're going to put your curly brackets where you're going to put your curly brackets generally I would say x sub and then everything you want in the subscript should go in curly brackets like this now look inside your curly brackets do we need more brackets well since there's just a single digit after the 2 right here is just a single digit after this subscript we should be okay with this and let's see how that looks so that's x sub 1 sub 2 and we could even go further with that if we wanted to do x sub 1 sub 2 Sub 3 like so but we're going to have to figure out our brackets so x sub and then use curly brackets around your entire subscript now within that Curly brackets we have we need more brackets because we've got two subscripts in there so we want to be clear one sub and then we'll put curly brackets around the two sub three so I'm like nesting my subscripts here let's see how that looks so one sub two sub three and you could continue you know to to do this as many times as you need to so let's do one more example let's say we have a sequence and I'm not going to to use the curly bracket notation and let me just list some values so we might have a sub 0 comma a sub 1 comma a sub 2 comma and then I want dot dot I'm not going to type the dot dot dot there is a latex command for that backslash L dots is going to do three dots the L is for lower they're going to be aligned at the bottom like lower aligned versus C Dots would be aligned in the center but l-dots will work for me fine right here and then we'll say a sub 100. now with 100 again I'm not going to type it like this or it's only going to be a sub 1 and then two zeros next to it that's not what we want we want 100 to be in the subscript so we need curly brackets there there we go so a Sub 0 a sub 1 a sub 2 dot dot a sub 100. next let's look at some Greek letters we often use Greek letters in math notation and one of the most popular Greek letters that we use is the Greek letter Pi if you want to type Pi it's just backslash pi now that is the lowercase Pi if I wanted the capital Greek letter Pi backslash capital p i like so and that's the capital Pi if we want other Greek letters we can just type the name if you use a capital letter it's going to give you a a capital Greek letter if you use lowercase it's going to give you the lower case Greek letter for example we can do backslash Alpha and that's going to give us the lowercase Greek letter Alpha so you get the idea there and we might do something like a equals pi r squared right area of a circle so backslash Pi now it's important here that I enter a space and then do my r squared otherwise if I don't have the space there let me take out the space and show you that because it's all running together the compiler sees the command as backslash PIR th backslash PIR is not a valid latex command so it's going to get confused and we're going to get an error I'm pretty sure we're going to get an error let's try yep we're going to get an error and you can kind of see it's giving me a hint here of what what the error is it's something like that PIR see how to put a space between your command and the next thing and now it should be fine there we go area equals pi r squared right here okay so those are Greek letters there's you can do many other Greek letters I'm just showing you an example of a few let's talk about some trig functions if we want to enter for example y equals sine of x y equals you're going to use a first let me do it the wrong way because beginners might be beginner students often will just type this and they might not even think there's anything wrong with the way that looks right I mean you can read it it says y equals sign X but it is not displaying the way we would like our mathematical notation displayed the compiler because you're in math mode here thinks that the S is a variable the I is a variable the N is a variable and the x is a variable and so it's typesetting them all the same way and you can see it looks very uniform the way these letters have been typeset they're all italicized and spaced kind of the same way and they're all running together that's not how we want the sine of x to look so we put a backslash in front of our trig function sine cosine tangent secant cosecant cotangent and now when I compile you can see the difference the s-i-n is not italicized and there's a little bit of a space between the n and the X okay so this is how it's supposed to look we can do that for our other trig functions like I said y equals cosine X tangent X is t a n backslash t a n if we want to do the reciprocal trig functions y equals unless you do cosecant is CSC secant would be s e c cotangent would be c o t and instead of X let's just do theta so Theta is one of our Greek letters we're going to do backslash and then type out Theta I want a lowercase Theta here we've got y equals cosecant Theta and you can play around with it and see you know what happens if you did a capital Theta well we would get the Greek Capital Theta but that's not what we normally use for angles we use the lowercase there we go so you don't want to forget when you're doing your trig functions sine cosine tangent secant cosecant cotangent to put the backslash in front and the space between the trig command and then the argument or the angle we can do inverse trig functions as well so let's do sine inverse of negative one y equals sine inverse so backslash sine and then for inverse that we're going to use the notation where it puts a negative 1 as a subscript so remember how we did subscripts it's the carrot I want negative 1 in the subscript so I can't just do this that's not going to work that's only going to put the negative symbol in the exponent the one will not be in the exponent if I do that so I have to use curly brackets negative 1 like so and then of X or Theta or whatever we happen to be using oh I did say sine inverse of negative 1 didn't I although that's that's a little confusing because we would have negative one in two different places but if I wanted the sine inverse of one half for example we haven't done fractions yet we're about to do fractions let's keep it simple sine inverse of 1. there we go could do that or Theta or X or whatever we need there okay so that's sine inverse now we could also use the arc sine notation instead of using that negative one superscript we can just do y equals arc sine and it again is backslash and then you tarp type arc sine Arc s i n and then your angle okay so by putting the backslash in front of the arc sign it's indicating to the compiler hey these are not variables don't typeset them like variables so it looks like it's supposed to look here okay uh let's do log functions next and we will start with just a common log y equals log X now again think about what's going to happen if I compile this right now I'm in math mode it sees the Y the L the O the G the X thinks those are all variables so it's going to look funny I mean you can understand what it's supposed to be right but I do see beginning students doing this a lot in their papers and forgetting to put the backslash in front of the log use the backslash and then you need a space between the G and whatever comes next and then it will typeset this correctly so only the variables X and Y are italicized and the rest of the equation is not so there's the our common log y equals log of x let's change the base in our log so if we want log backslash log oh that's supposed to be equal y equals backslash log if we want base 5 for example we need a subscript so remember how we did subscripts it's the underscore five and then I'm going to type a space it's not strictly necessary because if I don't use curly brackets it will only subscript this the next digit but just to be clear I like to always put a space there like that so this log oh what did I do wrong oh I'm missing a dollar sign double dollar signs okay log base 5 of X and then let's do a natural log y equals backslash Ln Space X that's going to give us a natural log next let's talk about square roots and not necessarily square roots let's just say roots in general because we can see how to do cube roots or fifth roots or seventh roots so we'll just say roots in general we'll start simple square root of 2. so do a square root we're going to hit backslash s q r and tech maker is making two suggestions for me here so we can see it's backslash sqrt and then we have an option where there's square brackets curly brackets or we have an option where it's just curly brackets if you're just doing the square root of two you don't want the square brackets you just want the curly brackets so sqrt curly bracket two curly bracket like so and that's going to give us the square root of 2. the other option is for when you want roots that are not square roots so let's do the cube root of two you're still going to type backslash sqrt so it's like you're starting the square root command even if it's not a square root but then you're choosing the one that has the square brackets followed by the curly bracket so I can hit enter here to accept that and then start typing or I could just keep typing it manually so here the square brackets are for the root if I want a cube root then I type A 3. the curly brackets are for what goes inside of that radical symbol so we want the cube root of 2 it's going to look like so cube root of 2. now this one down here is my page number it's bugging me a little bit so I'm going to go ahead and turn off the page numbers and to do that I'm going to scroll back up and I am going to after document class I'm going to type backslash page Style curly brackets empty I think that'll take care of that so let me recompile and then yep our page number is gone so I'm turning that off just so that's not in our way okay back to more Roots let's do something more a little slightly more complicated like square root of x squared plus y squared so backslash square root x squared plus y squared okay looks good and now let's get um a little more complicated and put a square root inside of a square root so the square root of 1 plus square root of x so we'll start with the outside root the square root okay the square root of now once you start putting things inside of other things it can get a little bit confusing so what I will sometimes do is just insert some Extra Spaces just so it's easy for me to tell what's inside of what because it's got a little cushion around it so this is my like my outside square root my big square root and inside of the square root I'm going to put 1 plus the square root of x so 1 plus backslash square root of x like so and compile and we've got one plus or the square root of 1 plus square root of x all right and then finally let's look at fractions so we'll do start with something really simple we'll just do the fraction two-thirds so the command is backslash Frac for fractions and you can see that tech maker is is prompting me I can hit enter to accept that and this is in general what it looks like when you want to make a fraction or if I'm typing it manually if I'm typing it manually I usually still do kind of a template thing so I'll do curly brackets for the numerator and then curly brackets for the denominator and then I'll just use my cursor and go back in uh and that way I don't forget to close my bracket so you have a pair of curly brackets for the numerator and then the next pair of curly brackets for the denominator so in the numerator is 2 and in the denominator we want three so this should give me the fraction two-thirds okay that looks good now I'm going to next I'm going to type this in a sentence so let's just say about and because I'm typing this in a sentence I'm not going to use double dollar signs I'm going to use single dollar signs because I want this to be inline Math mode so my fraction two thirds and I did that more quickly using my keyboard because let me do that one more time and explain backslash okay so here I just hit enter Because tech maker is going to populate that for me and notice it automatically highlighted the numerator so I type 2 and then I can hit tab on my keyboard and then type the three so it goes pretty quick once you get the hang of it like that rather than just typing it manually so about two-thirds of the glass is full and there's that sentence so the two-thirds it's it's smaller obviously in this sentence than the two-thirds up here when you're in inline Math mode it's going to resize to to fit your sentence right you don't want this huge two-thirds but sometimes like if you're writing a homework problem quiz it worksheet something like that sometimes your fraction is too small in the sentence here and you do want to make it larger so easy way to do that is instead of backslash Frack use backslash defrac The D is going to put it in displayed Math mode defrac so now when I compile it it's going to be oh it didn't like that oh I may need a package in order to use that okay let me try this let me try this a different way because I haven't talked about packages yet but packages we will be using packages soon another way to get into displayed Math mode is to type backslash display Style let's try that there we go so now it made the two-thirds bigger same size as it made it up here when you use double dollar signs you're all you're automatically in displayed Math mode and so everything is large like this if you just do the slash Frac in inline math mode it's going to be small so this looks kind of silly the two-thirds is is really big compared to the rest of the sentence I don't like that so I'm gonna well I'll leave it in here just for tutorial purposes let's maybe copy that one more time and take it out take out the display Style so you can see a comparison now because I'm not using double dollar signs it's not automatically creating a new line so here's where we have to decide how we're going to break that line do we want to do a double backslash like that which will break the line you can see I I'm sort of running into an issue here because the lines are not far enough apart I can manually add some vertical spacing using square brackets and then inside the square brackets tell how much space I want so six and then you can use any unit of measurement here you can use centimeters six centimeters would obviously be way too big I usually use PT Point like Point size so give me six points of space at the end of this sentence and then when we compile you see it just it inserted some vertical space there for me your other option if you don't want to break the line that way would be to leave an empty line in between and that would also create a line break we talked about this in the last tutorial though notice it looks odd because this new line right here is starting a new paragraph and it's indented versus this line up here did not this this line up here is not indented so that's why it looks a bit funny there so I usually and it's just it just depends on what you need but I usually do something like this when I want line breaks and generally I if I want displayed um fractions display style fractions rather than typing out display style I just do backslash defrag but I did get an error when I tried that a moment ago let's try it again not that I'm expecting anything different two-thirds and I just have to figure out which package I need to use in order to get that to work properly so I'm going to go back up to the top and really quickly just figure this out use package and let's go with um AMS math I'm gonna I'm gonna use a couple packages here because I don't want to do them one at a time and try and figure this out AMS math AMS Sim and AMS fonts okay one of those worked because now it did compile correctly and oh that was unnecessary because I had double dollar signs so let me try that one more time because the double dollar signs automatically put it in displayed Math mode so it's kind of redundant that I used defrak inside of Double dollar signs it's not necessary to do that let's just try this again and verify that we are getting a large fraction here when we use defrac yep and I needed a line break there Okay so uh you can accomplish the same thing this way and this way let's try a more complicated fraction so I'm going to do a line break here again um now go ahead and put it in double dollar signs so this isn't technically necessary let's do this uh let's do a square root inside of our fraction so let's do the square root of X Plus 1 over the square root of X Plus 2. so we'll start with fraction fraction like so in the numerator we want the square root of x plus one so backslash square root like so X plus one that's my numerator then here is my denominator so we're going to do square root X Plus 2. and then close our dollar signs and there we go so I did use you know tech maker to my advantage there I wasn't typing it all out manually if I wanted let's try that one more time if I were typing it out manually backslash Frac your curly bracket then slash square root you have to open another curly bracket so at this time you have to kind of mentally keep track that you have two curly brackets open and eventually you need to close the two curly brackets so X plus one close it for the square root close it for the numerator then we open curly brackets for the denominator backslash square root open curly bracket for the square root X plus two close the square root close the denominator and then close Math mode there we go now sometimes we work with complex fractions where you have a fraction inside of a fraction so let's try that so outside fraction and Let's do let's do one over so just one in the numerator that's it and then in the denominator let's do one plus one over X so 1 plus now I need a fraction so backslash frac 1 over X like so 1 over 1 plus 1 over X and you can of course have fractions inside of fractions inside of fractions you just want to pay attention to your brackets make sure that they're paired and like I showed you a moment ago sometimes it is helpful to space things out so my um denominator here had a bunch of stuff in it you might find it's helpful to kind of leave lots of space in the curly brackets for the denominator so that if you do get a compiling error you can go back and see that's probably where it would have occurred because that you've got you know complicated things inside of other things can be helpful as well that wraps up this tutorial on common math notation I do have another tutorial on calculus notation which will be much more involved there's lots of notation that we use in calculus that we need to use latex 4 because you can't type a lot of the calculus notation using your keyboard but in the next tutorial before we do that the next tutorial we're going to look at brackets tables and arrays so brackets include things like parentheses and square brackets and curly brackets and absolute value symbols we're going to see how to make those things expand in size because if you just type parentheses let me show you real quick right here around this it's going to look really bad well actually it doesn't look too terrible but the 1 over X here is longer vertically than the parentheses so we're going to see how you can fix that make your parentheses taller so that they do wrap around the content inside of the parentheses and then we will look at tables we'll do simple table we'll do a slightly more complex table and then we'll look at some arrays hello I'm Michelle cremolin in this video we are going to look at how to type set brackets tables and arrays using latex I'm working in tech maker but you can work in any text editor that you like or you can work online in overleaf and there are links in the description below to register for an overleaf account if you want to just work in your web browser so we have lots of different type of bracketing symbols when we use math notation but probably the most popular would be parentheses square brackets and curly brackets so let's start there if you have a short object then you don't need to do anything special for parentheses let's say for example the distributive property states that a times and notice I did use a dollar symbol to enter Math mode a times B plus c equals a times B plus a times C for all a b c i can get fancy here with my notation if I want I can use the element symbol or the backslash in and then if I want to say the set of real numbers then there's a special way to type that symbol as well backslash math BB curly brackets and then for the set of all real numbers I need a capital R now I think I'm going to have to load a special package to make this work let's see if I get a compiling error I do okay so let's come back up here in my Preamble everything before begin document it's called The Preamble and I'm going to use a package let's see AMS fonts AMS Sim AMS math I always load those three packages right off the bat so to be honest with you I don't even remember which one of the three I need it's only one of those three that I need to make this mathbv command work I'm just so in the habit of using all three packages all the time so don't remember which one does what that worked and we can see the result here the distributive property States and so here we have this in math mode a times B plus C the parentheses look good they are sized appropriately for what's inside equals a B plus AC for all a b and c in the set of real numbers now square brackets work in a similar way you can just type them using your keyboard so let's use a line break here there's a couple ways to do a line break I like to do the double backslash and then insert a little bit of extra space there are lots of other ways to get spacing between your lines things that you can do in your Preamble so that you don't have to do this every single time you can change the line spacing throughout your whole document but that's a little more complicated and we're trying to keep things really simple for right now so I'm just going to to do that and next we'll say the equivalence class of a I'm putting a in math mode is and then we'll use square brackets around the a there and I will typeset that so I'm just using F1 on my keyboard because that's a keyboard shortcut for tech maker to compile otherwise I could also come up here and click this Arrow okay so the equivalence class of a is a and you can see the square brackets appear as expected a is just a normal sized element so the brackets don't need to be larger smaller they're sized appropriately okay this does look a little weird though because the first sentence is indented and the second one is not this double backslash creates a soft return it doesn't start a new paragraph and so this um sentence that I have here is not considered a new paragraph and it is not indented I'm not in the habit of worrying about that because I almost always turn off indenting in my documents so I'm going to come back up into the Preamble it's the area before begin document I'm going to type slash pair indent is going to change the the rules for paragraph indenting I'm going to say 0px so indent my paragraphs by zero pixels in other words don't indent my paragraphs and then I'll recompile and you can see that none of my lines are indented that's just my preference the way that I like to work you certainly don't have to do that now let's take a look at curly brackets so parentheses easy you just type them on your keyboard square brackets easy just type them on your keyboard curly brackets not quite so easy say the sets a is defined to be and then we'll just call a the set of the numbers one two three so curly bracket one two one two three curly bracket close Math mode and then compile oh what did I do wrong here forgot my square brackets in front let's try that again okay now I didn't get the result I expected because I typed curly brackets around this set but the curly brackets didn't show up on my PDF and that's because the curly bracket is a symbol that is reserved for part of the coding in latex that is a special symbol that tells the compiler something and so you can't just type a curly bracket and get it to show up you have to do something different if you want the curly bracket to show up you type a backslash in front of it and that's true for this opening curly bracket and also the closing curly bracket you put a backslash in front of it and now when we compile the symbols will show in the PDF so the compiler knows that this is not um the coding curly bracket is actually one that needs to be displayed now another symbol that is reserved for special syntax in latex is the dollar symbol and we've seen that many times so far the dollar sign is used to indicate that we're starting Math mode but sometimes you might want to display a dollar sign right if we're talking about money so for example the movie tickets costs 11 and 50 cents okay so right away I know that I have a problem here because this has turned green this has turned green so the compiler thinks that I'm I've opened Math mode and I have not closed Math mode well I can close it here and that's a little better we're back to normal down here but now clearly the dollar sign this dollar sign is not going to be displayed because this is just telling me that I'm in math mode so let's compile that and I don't see the dollar sign so if you want to see a dollar sign well first of all if we type in extra one inside Math mode we're going to have issues you that confuses the compiler so if you want to display the dollar sign you just type A backslash in front of it same with the curly bracket and now when we compile it knows oh this dollar sign is meant to be displayed and so it will print it on our PDF and we've got 11.50 now sometimes you want to put brackets whether they're parentheses or square brackets or curly brackets or absolute value symbols or some other symbol's greatest integer symbols that type of thing sometimes you want to put those around notation that is much bigger taller so let me show you what I mean by that and here I'll just do I'm just going to do a hard return here and let's type this fraction I'm going to do double dollar signs to get give me displayed Math mode so it's going to put this math on its own line Center it on the page and I'm going to type a fraction so my fraction is going to be 1 over x squared minus 1. here's my fraction 1 over x squared minus 1. let's say I want to put parentheses around that I don't know why maybe there's a two in front of it yeah let's do that okay that looks pretty bad the parentheses are not tall enough they're not surrounding the information inside of the parentheses now if I wasn't in displayed Math mode it would be a little better so instead of double dollar signs let me go back to single dollar signs and show you it's a little bit better it's still not perfect the parentheses still don't seem to be tall enough to cover what's inside of them so it's not just because I'm in displayed Math mode that that's an issue but it's more pronounced when you're in displayed Math mode how can we fix that well we can make the parentheses automatically change in size to fit whatever's inside of them by typing go to your your parentheses where they start so your left parenthesis I think is the singular of parentheses go to your left parenthesis and type backslash left in front of it and then go to the right parenthesis and type backslash right in front of that one and now let's compile that and you can see that they've automatically expanded to an appropriate size that looks much better so this works with lots of different bracketing symbols I'm just going to copy this a couple of times and we're going to change the parentheses to square brackets square bracket square brackets and curly bracket now remember to get the curly bracket to show up you have to put a backslash in front of it and compile and there we go so we've automatically expanded the size of our brackets in these three examples if you're working with vectors you might even want an angular bracket so let me delete I'm just going to space this out a bit um if we want parentheses we would type parentheses like this let's go back to parentheses okay that's normal parentheses but if you want an angular bracket instead of parentheses you're going to type backslash L angle so left angle and then over here instead of parentheses you're going to type slash R angle slash R angle for right angle and then when we compile that you get your angular brackets you might also need to do this for an absolute value expression so instead of this left angular bracket we can just use on the keyboard type the I think it's called a pipe but it's right above the return key or the enter key to get your absolute value symbol to expand so backslash left backslash right is going to expand the size of those brackets now there might be a case where you just need a bracket to show up on one side not the other an example of this could be in calculus if we have something like d y d x at x equals one we could use a notation so let me start with a fraction for the dydx to backslash frac d y d x and now I want dydx at x equals one or when x equals one so normally the way we write that is we would do a vertical bar and then a subscript so here's a subscript of x equals one now if I just type x equals one only the x is going to be in the subscript so I need to put curly brackets around my x equals 1 if I want that all in the subscript let's see how that looks so I'm almost there but that vertical bar that pipe symbol it's not tall enough I want it to expand so let's try that trick where we type A backslash left or backslash right in front of it let's do slash right to get it to be larger now when I try and compile this I'm going to get an error because when you use a slash write command you have to have a matching slash left and vice versa so when you do slash left you need a slash right but I don't want a symbol to show up on the left we can get around that though I'm going to go ahead and type the slash left and then in order to tell it to not display a symbol I'm just going to use a period just type a period on your keyboard and it won't display that so now the notation looks proper so hopefully that covers all of the the types of bracketing symbols that you need and you can certainly have bracket like brackets around something that's inside of something else so you could have multiple pairs of brackets all in sort of one expression for example let's let's kind of build off of well let's do a fraction we'll do a complex fraction so fraction we'll do one over one plus X to start with and let's say we want um to put parentheses around that so we'll do slash left and then the left parenthesis slash right and the right parenthesis compile that so that looks good and I'm going to put a One Plus in front of this okay so there we are now now I want to make this all the denominator of another fraction so it'll be one over one plus one over one plus X okay so this whole thing that I've typed right here I want to be in the denominator of a fraction so I'm going to put curly brackets around it that's the curly brackets for my denominator in front of that I'll do another pair of curly brackets for the numerator and the numerator is just going to be one and in front of that I need my fraction command let's compile that so there we go and notice that the parentheses are adjusting in size to fit like the container what's inside now let's say I want to put big parentheses around all of that so in front I'll do a slash left oh I'm in the wrong place sorry go to the very front there we are slash left parentheses and then go to the very end here slash right parentheses compile now you can see those parentheses are really big so they are automatically going to adjust to the content inside of the parentheses okay let's move on and talk about tables I'll just give myself some space here and we will look at tables we'll start with a very simple table and then we'll add some more components to it so first of all to start my table it's backslash begin curly brackets tabular actually I'm gonna yeah hit enter and let it kind of finish that out for me so with the begin tabular you'll have an end tabular and notice that we have an extra pair of curly brackets after begin tabular so here you have to establish like how many columns you want in your table let's say we're going to make a table with X values of one two three four five so we need six columns in our table six columns in our table I can type c c c c c I typed a c six times each one of those C's represents a column so this is going to be a table with six columns now the reason I typed C was not C doesn't stand for column C stands for centered because your the text or the whatever it is you're putting in the cell of your table it can be Center aligned left aligned or right aligned so right like normally I would say probably your mathematical tables your values are going to be centered in the table cell so I normally use seeds if I wanted items in my cells to be left aligned I could use else that would give me a table with six columns if I wanted the content to be right aligned I would use ours you can also do any kind of combination you identify for each column if you want the content to be aligned left Center or right let's go back to Center aligned and then we have to type some content for our table so I'm going to type this is what I want in my table x one two three four five so this is not going to work right now if I compile oh it actually did give me something but it's not a table this is just one this is all in one column right now all in one column the way that you separate items into columns is with the ampersand so now if I compile X is in the First Column and then right now one two three four five is in the second column so we want to go through here and put an ampersand in between like so okay now we have a table with six columns which is what I wanted I guess it would be easier to see you just kind of have to trust me right now how many columns I have it would be easier to see if we had you know lines separating so I should have done that let me go back and show you how to do that if you want vertical lines like in between your table columns then you come back up here and you use that pipe symbol on your keyboard it's above the return key or the enter key and put that in between each one of these like so let's recompile and we get those vertical bars so now I can see how many columns I had so let me take out my ampersands let me go back to what it was one two three four like that and you can see that it was all smushed into one cell which is not what we wanted so you need to use the ampersands to separate the the content into your different columns now when you get to the end of your first row you hit two backslashes to indicate that that is the end of the row okay so here we are then you can do your next line so the next line let's say we want f of x and and then whatever our f of x values are we'll just do 11 . 10 11 12. 13. 14 and we'll end that line okay that's all right now the X and the f of x they don't look like math they're in text mode they're not in math mode so let's fix that put dollar symbols dollar signs around the X and around the f of x all right that looks much better now we're missing the lines that separate our rows right so in order to get a horizontal line we're going to type backslash H line I will compile that and it gives me a horizontal line so I did that at the end of the first row and I'm going to do that again at the end of the second row now I need to do that above my first row okay and there is a basic table sometimes I like to after the First Column put a double pipe here to separate the label x f of x from the values in the table like so so we can do that so that is a very basic table right there let me copy that and let's say that instead of 10 for f of 1 we had a fraction here so we'll do we'll do math mode slash Frac and we'll just use the fraction one half oh let's let's put let's separate these tables a little better so I'm going to insert some vertical space here slash V Space and then I can decide how much vertical space I'm going to put one centimeter of space right there to separate those tables and I'm going to turn off my page numbering as well so I'm going to go all the way back up to the top slash page Style empty compile and that turned off my page numbers okay so there are my tables let me scroll back down here so I'm working with that's the copy of my first table right here we changed F of one to equal one-half and you can see that the one half because it is taller than these other values is sort of touching the the top and the bottom of the row border we want to give this a little more space and so let me show you how you can add a little more to this table instead of starting with begin tabular we're actually going to start with Slash begin table now if I hit enter it's going to put my end table right here I need the end table to go after the end tabular it's like a sandwich right we've got begin table begin tabular and then at the end we have end tabular end table okay so I mean that hasn't changed anything yet let me recompile we're still in good shape actually I lost my second table I think that begin table requires a package hang on let me do full page I wasn't expecting that to have oh okay here's the second table up here yes so this is the frustrating thing about working with tables in a word processor when you enter a table you're very specific about where you want that table to appear it's wherever you type it wherever you enter it that's where it's going to be displayed right in a word processor not so here here when you enter a table the compiler is going to decide where it thinks that table will fit best on your page so you can see what happened to us here and the second table is the one that had the fraction one half for f of one so that's this table at the top here it it got moved up to the top of the page that's not where I want it I want it down here at the bottom of the page and normally you're particular about where you want your table to go if you're creating a a long paper you might not matter so much whether it's you know on the page before or on the next page or at the top of the page or at the bottom of the page like you might be fine with giving the compiler the flexibility to decide where it thinks the table will fit best there is a way that you can tell it no no no I want it to appear right here in the code where I've entered it and all we need to do for that is square brackets and a capital H so let me recompile and I think I need the flow package for this let me go back up to the top backslash use package float yes I did we'll talk about packages more in another tutorial but for certain commands in latex you need to load a package before the command is going to work so in order to use this right here we need to load the float package all right so now we're good to go let me make this larger again there's our second table and we were talking about the spacing issue I want to add more space in there so in between begin table and begin tabular I'm going to type backslash def that's going to define something new and then backslash array stretch and then in curly brackets you're going to type a number and the number that you type is going to determine how much extra spacing you have I usually go with 1.2 so let's compile that and see how that looks so just added a little bit of space right you can make that bigger make like sometimes I'll go up to 1.8 go with 2 and see what happens okay so if you go with two then you get that's too much space like now it's starting to look a little bit weird maybe we'll we'll split the difference we'll go like 1.5 all right that looks pretty good it's not perfect like there's more space at the top than the bottom so you can play around with that if you don't like exactly how it looks but that's an easy way to get some extra padding if you will in your table cells the other thing we can do by starting our table with begin table in addition to the begin tabular is we can now add a caption to our table and you can add the caption above your table or you can add the caption below your table let's add it below and so after the in between the end tabular and the end table I'm going to type slash caption and then you can enter your caption so I don't know what we want to say these values represent the function f of x and we'll compile that and yeah that looks a little weird because let me go back full page the caption looks like it's being centered whereas the table is not being centered so that is a bit strange if I want my table centered then again in between begin table and Define and begin tabular I can do backslash centering and that will Center the table I normally Center my tables so I wasn't expecting that issue I'm not used to that popping up especially when I'm captioning things I'm just I like normally in my workflow I Center my tables so I'm sure there is a way to get the caption to go to the left you can force things to be flushed left if they're not automatically that way um but it's easy it's an easy fix if you just want everything settled centered and there we go now there are a lot of other things you can do to create more complex tables um I don't want to spend too much time but there are some instances where you might want um what's it called where you have like uh something that spans over two table columns I know there's a word for that I can't think of it off top of my head but you can do something oh oh merging cells I think is what it's called in like in the spreadsheet program where you can merge cells together so you can do things like that as well with tables you can also sometimes you might want to have a sentence in a table cell that sounds that sounds kind of weird but I I could think of of an instance let's just do one real quick I'm going to copy this table so here's a copy of that table which didn't fit on page one so it got pushed down to page two we'll make this a little bit bigger and um let's do something where we have just like two columns in our table and I'm gonna put text in here so we might want to set centered we might want it flush left we'll see how it goes I'm doing this off the top of my head and we'll only have two columns so it needs to look something more like this okay and we're going to say at the top f of x and then in the second column at the top we'll do F Prime of x and here we'll say x greater than zero and here we'll say function f of x is increasing so let's see what that looks like so this is a different kind of table is just doesn't have just numeric values in it it looks a little bit odd let's change the caption too so this makes a little more sense we'll say the relationship between f and F Prime okay and we could if we want to this time move the caption to the top and notice that that automatically numbered the tables I didn't point that that out either it didn't happen with this table because with this really simple table we just used begin tabular end tabular with these next two tables we started with begin table before we did the begin tabular and that gave us all these extra options and one of them is that it will number your tables as you go so I didn't type table one that was this table right here I did not type table one anywhere it just knows that that is the first table in this begin table sequence and then this next one when I began a new table now it knows oh that's table number two so it is numbering that for me which is nice okay um what I wanted to show you though was how you can deal with long sentences in your table so I'm going to copy this sentence a couple of times which isn't very realistic but let's just say like you had a lot of text to put in your table salt okay then this happens let me make this okay this looks horrible right the table got cut off because the the content inside of this one cell is so long it doesn't fit and so it ran off the page which is definitely not good we don't want that so an option if you're trying to type text like long text in a table instead of using a c here and let's go ahead and change these to L's anyway first just to show you that when I do that now in my table this became left Justified instead of centered all of this became left just Justified but what I can do with this instead this second column because I know that it has to accommodate such long text is to put a p and the P stands for paragraph So it's indicating that there's we want this cell to contain a paragraph and then in curly brackets you indicate how wide you want that paragraph to be so maybe we want it to be two centimeters you can use inches you can use other measurements that you want okay so now at least it fits on the page it still looks a little funky right but you can change this we could even go with two inches three inches you can adjust it to fit your needs and you can do that for each column so if you have multiple columns with a lot of text in it you can do that all right that's the basics of working with tables there are a lot of other ways to customize tables you can do shading you can do all sorts of things but this will get you through most of what you need to do with tables we're going to wrap up this video today by talking about equation arrays and so the easiest way I have found to create arrays is with the Align command now there is also an equation array command and by that I mean you can do backslash begin EQ n you can see right here begin equation array you can do it this way and I used to do it this way but now I have a different way that I prefer to do it so I'm going to do slap let me first of all just say put a little header here arrays and we're going to do backslash begin a line now we have two options here we've got a regular a line and then we have an align with an asterisks asterisk after it let's go with the regular one first and then I'll explain what the S drisk does okay so begin a line and we have to put some kind of content in here so let's use this to solve an equation 5X squared now notice when I type started typing this is in green and green indicates that we're in math mode but I didn't type a dollar sign when you're inside of the Align environment you are automatically in math mode so if I start typing text now see the text is still green that text is actually in math mode let me compile and show you right this this looks really wonky everything in a line is in math mode so if you actually want text you have to have some way to tell it wait wait I don't want this to be Math mode and you can do that with backslash text and then just type your text let me change the text um place your words here oops curly bracket let's compile that so now it knows that that's text and we still have a lot like a spacing issue here in math mode this hasn't come up yet but in math mode the compiler ignores spaces like after the between the five and the X here I can type as many spaces as I want they're not going to appear on the document when I compile it the 5 and the x squared are still right next to each other so in math mode spaces get ignored and that's why this space is being ignored so the p in this word is right next to the two if you need a space there's a couple things we can do in the text mode we can just type a space and that'll take care of that so that worked or in math mode if you need to force a space that will be displayed you do backslash comma so either one of those methods will work okay but that's not actually what we're trying to do here so let me take that out 5x squared we're going to solve an equation 5x squared minus 9 equals X Plus 3. so what I want to do next is subtract the X on both sides subtract the 3 on both sides and then write the result okay so I need to end this line with a double backslash and on the next line type what I want next 5x squared minus X minus 12. oh equals zero right equals zero okay so that's all right notice that I've got my equations on their own lines and the equations are being numbered so I didn't have to tell it this is line number one this is line number two it's going to number them and if I create another a line just duplicate this one and compile it it continues numbering from where it left off before which is really nice in a math paper because your equations are all numbered and then when you're talking about them in your paragraphs you can refer to them by number you can say in equation four blah blah blah so that is that is nice there what I don't like about what I'm seeing though is that the equations are not aligned at the equal sign it's much easier for the reader to follow the mathematics when you're solving an equation or simplifying things you're going step by step if you line up your equal signs that's the proper way to do it so in order to line up the equal signs you just have to put an ampersand in front of them now if you only do it on the one and not the other it doesn't know what it's supposed to be lining up so that's not going to work it's going to be funky but if you put the Align in front of both equal signs it knows to line up those equal signs and this looks proper this is what I wanted to see here and we can of course add more lines than this just do double backslash and keep going if you get to the point where there's nothing on the left side of the equal sign that's okay too we can just say Ampersand equals and it's going to start with an equal sign and line it up um so I don't know we could do 12 plus x minus 5x squared like so and everything is lined up at the equal sign there now if you don't want the line numbers to appear not just appear but if you don't want your lines numbered that's when you would use the asterisk if you do it in the begin you have to also do it in the end if they don't match you'll get a compiling error so this is going to turn off the equation numbering so when I compile the 3 4 and the five have disappeared and then if I copy this one again and compile you'll see that it picks up where the first numbered one left off so it's not that it's just hiding the line numbers it's not even numbering them so think about that carefully when you use it which way you prefer to go okay that does it for this tutorial we looked at lots of ways to use brackets and to customize the height of the brackets we looked at tables and we looked at arrays hello I'm Michelle Cromwell and in this video I'm going to show you how you can create lists in latex so we'll be looking at enumerated lists which are numbered lists and then also itemized lists which are bulleted lists and let's begin by just listing some basic school supplies so pencil calculator ruler notebook if I compile now take a minute to think about what this is going to look like so pencil calculator ruler notebook in a word processor we would see these four words each on their own line but in latex we can see that that does not happen I don't have any line breaks coded here so the words are just kind of flowing all together on one line I could insert line breaks but that's not what I want to do I'm intending to make a numbered list here and so let's start over to create a numbered list we call this an enumerator list we start with backslash begin enumerate and when you have a begin enumerate you also have to have a matching and enumerate okay so this begins this environment enumerate environment but now I have to actually uh list out all of my items so then we're going to type backslash item and enter our first item which was pencil hit enter and I don't need to do anything to indicate a line break when I type backslash item again the compiler knows that this is a new item and it belongs on a new line so slash item calculator slash item ruler slash item notebook so let's try compiling this again and now we have our enumerated list so as simple as that if we want a bulleted list then we change from enumerate to itemize so an itemized list is a bulleted list and then when we compile that we see that we have bullets instead of numbers but I'm going to go back just undo that go back to my enumerated list because I want to show you how we can then have an like a nested list so another enumerated list inside of this one so let's say under notebook we have several items that we want to keep in our notebook so I'm going to hit return and I'm going to indent you can indent just once or twice however you like it and this is just kind of to help organize the code and make it easier to find things later if we need to so I'm going to do a new enumerated list so I started with backslash begin enumerate and I need to end this enumerate and you can see how it's indented and then backslash item to list my first item so in my notebook I have notes and then we'll do backslash item homework we'll say these are the sections in my notebook slash item assessments and let's compile that and see what that looks like so we have these sub items and the compiler automatically indented for us and instead of numbering it one two three four now these are numbered a b and c and you've got the parentheses around the number so all of the the numbering is happening automatically you don't have to enter any of that manually let's do this one more time let's see how we can have like another level and under assessments we'll say that we have different kinds of assessments so I'm going to hit enter I'm going to indent again and I'm going to start over with another begin enumerate slash item to list my first item so tests quizzes journal entries and we'll compile that and you'll see how that is now numbered differently as well instead of ABC now it's one two three and if I want to add a fifth item I just have to figure out where that belongs so this was item number one two three four and the indenting really helps to stay organized because now I if I want a fifth item I can kind of see where that's going to go that's going to go right here slash item and what's another Supply that we might need we'll say highlighters and that is now number five now there are some things you can do to change the way the numbering appears if maybe you don't want one two three four maybe you want capital a capital b capital c capital D or maybe you don't want the parentheses here so let's look at a few other options I'm just going to copy my first list and let's put some space in between there with V Space we'll do one centimeter of space to separate that and now instead of the default one two three four let's say I want capital letters here in square brackets I'm going to type it the way that I want it to appear so I want it like that capital A and then a period and let's compile okay so we ran into a compiling error in order to make this work we're going to need to load a package so I'm going to go into my Preamble that's before the begin document and use package enumerate okay use package enumerate let's come back down here and try this again and now you can see that that changed that for me instead of one two three four I've got the ABCD now let's try this again I'm going to copy this here so just made a copy and maybe I don't want it to be like that maybe I want to start out like that and we can do that maybe I want a numbered list but I don't want it to start with number one so here's just kind of the default really basic list right here but maybe I don't want it to start with number one for whatever reason maybe I'm creating a worksheet and I you know on the last page I left off with number five and now I want this list to begin with number six I'm going to type backslash set counter enumi and then six and you can see that now it started with number seven so that wasn't actually what I wanted I forgot that I need to say five if I want my list to start at 6 then I need to set the counters position at five so that the next time it sees an item it will think the last item was number five and it'll make the next item it sees number six so let's compile this there we go that gave me I'm starting a list starting with number six now let's create this list again I'm going to go back up and get this first list that I made with all the different levels we'll add some vertical space here to separate things out visually okay so this list started over with number one and just make this easier for you guys to see I'm going to insert a page break here instead of this vertical space we'll do backslash page break and that way this new list is on a new page and instead of an enumerated list I'm going to change it into an itemized list again itemize and then I'm just going to copy this and replace all of these enumerates with itemize so I have a begin and an end three times because I have three different levels of my list here and we'll compile that and I just wanted to show you how this works in a bulleted list so for the first level you've got the the solid round black bullets and then for the second level you've got these dashes and then the third level you have the asterisks now sometimes you want to create a list but maybe you don't want the numbers to show so let's just copy one of these basic ones we'll take this one I'm just going to copy that let's add some vertical space here okay and let me take out the customization and we have just a really basic enumerated list one two three four let's say for whatever reason we just don't want these numbers to show while you can simply type square brackets and leave them empty don't type anything in the bracket and then compile and there's a space there where the number should be but it's hidden it's not displayed okay so that's one way around it you can still have something formatted like a list with all of your items and then you're not showing any values you can also customize really however you want this numbering to look you can do it manually now it's not ideal to number things manually it's the wonderful thing about latex is that everything does get numbered automatically so if you come back later and in between calculator and ruler you want to add pen it's going to automatically renumber things for you whereas if you had manually said one two three four now you would have to renumber everything manually after that so here if you're okay with taking that risk you know that you're not gonna you know it's not that big of a deal to you you can do some customization here let's say for example you wanted this to be an A but you didn't like you didn't like the parentheses before and after you could just do something like that it's compile and we see that it it looks like that you can um I don't know what else you might do here you can even type words there if you wanted to you could do one I don't know why you would do that but just to point out that you can really customize this and so these are right Justified so that is one thing to be aware of it looks a little weird because it's ragged on the left but if you do these customized labels they're going to be right Justified here and then your items themselves will be left left Justified over here hello I'm Michelle krummel and in this video I'm going to show you some different ways you can format your text and your document so for example we'll be looking at how to make things italicized or bold how to change the font size how to create sections and subsections and organize everything with a table of contents so let's start with just some basic text formatting you can change the appearance and the size of your text to some extent so I'm going to begin by typing a simple sentence and we'll say this will produce italicized text so it won't of course because I haven't done anything to indicate that I need the text to be italicized this right now is just producing normal text but if I want the text to be italicized let's just italicize the word italicized then I'm going to in front of the word type backslash text i t curly bracket then I begin typing whatever I want in italics and when I get to the end of the text that I want to italicized I close the curly brackets so let's compile this now and we can see that the word italicized has been italicized so it's that backslash text i t that's going to italicize your text let's try making something bold so this will produce bold text now in order to make your text bold you use backslash text the F for bold face font so we'll say bold face is it face or faced I don't know but it will be bold and let's do small caps this will produce so for small caps it's backslash text S C curly bracket so we'll say small caps and your curly brackets and we'll compile that and we'll see that we have small caps and we can also do this will produce type writer font so backslash text TT nope TT so there's three T's there it's text TT uh hype writer font text so that typewriter font you might be wondering why anyone would want to use that but it is um like mono spaced so it's good in certain situations it's also I think good for urls to make them look a little bit different than the rest of the text you can offset something like saying please visit Michelle crumbles website at and then I can do my backslash text TT curly bracket Opening Our bracket and then it's http slash slash Michelle crumble.com and you can see that it just sets the text apart now if I were actually doing a hyperlink this isn't the way I would do it because we can load a package that will make this link clickable which would be even nice you can use the hyperref package for that I guess since I brought it up I'll go ahead and show you so we go into our Preamble which is before the begin document after the document class and we're going to do use package hyperref okay that and then instead of this backslash text TT I can just do um URL and let's compile that and now I have a clickable URL and you can see that it automatically put that in the typewriter font I didn't have to tell it to do that the that's just part of the hyperf package it's doing that and so now if I click on that in my PDF is going to take you to my website you can also customize this even more because sometimes websites are really long and ugly so you can do backslash href and then the URL but then you need another set of curly brackets and that's the text that you want displayed so maybe I'll just say my website and we'll compile that and now when you click on the words my website oh it didn't work oh it did work it just didn't give me the little um the little gloved hand icon okay so it did work when I clicked on it so those are the some of the things you can do to change the way that you're displaying your text we can also change our text size so let's play with the sentence please excuse my dear Aunt Sally which most math students are familiar with right order of operations parentheses exponents what is the m multiplication yes parentheses exponents multiplication division wait what's the a addition subtraction there we go it's been a while sorry parentheses exponents multiplication division addition and subtraction okay please excuse my dear Aunt Sally so let's compile this just so we can see what we're comparing this to and let me give myself some vertical separation here slash V Space I'll just do one centimeter of vertical space there separate it from the work that we did before and we are going to make dear Aunt Sally change size okay so let me copy this I'm going to paste it several times and this first time I'm going to make dear Aunt Sally large really large so to do that I there's a couple of ways I can do that let's start this way backslash begin large with a capital l and then the text that you want large I don't know should we include the period or not include the period I I guess we will not and then backslash end large with a capital l they have to match remember whenever we do a begin you're going to have to matching end so let's compile that and see what we've got so my or just the dear Aunt Sally part of that sentence let me zoom in here so you can see this better did get larger I can I you know what I sh I should have started even larger because we can go larger I'm gonna copy this and try this with a lowercase L instead which should not be quite as large as the large with the capital L so now we're going to have normal a little bit larger and then a lot larger here we go and we can make this even larger if we change large to huge okay and we can make that even larger if we change the lowercase H to a capital h and you can see that that got even larger now we can go in the other direction and make things smaller let's go back to to just normal and we'll go a little bit smaller than normal so normal you could also call it normal size so sometimes you need that if you have like your whole document as large but then you want one part of it to go back to regular regular size let's do that I'll show you that so you would just do normal size all smushed together as one word okay so that's the same as this this line oops this line right here the first one okay so let's go a little bit smaller than normal size and that's going to be script size and we can go even smaller than that and go I think I missed small I did we missed small so let's put small in here script size is smaller than small and I'm trying to do this in a logical way so normal size and then if you want it a little bit smaller you can go too small and then if you want a little bit smaller than that you can go to script size if you need it even smaller than that we'll go to Tiny okay and let's compile that and see what we've got there we go so progressively larger and then progressively smaller all the way down to Tiny now we can also change how our text is Justified so sometimes you want your text to be centered sometimes you want it left Justified sometimes you want it right Justified so add in some vertical space for this new section here and let's do centered text so for centered text begin Center and we're of course going to need an end Center as well then everything you put in between begin Center and and Center will be centered so this line is centered and I could do all of that on one line let's save some space so we can do something similar I'm going to copy that two more times instead of Center we can do flush left so we need to begin and end or we can do flush rights okay so then we can see our text and zoom out a little bit this line is centered this line is Oh I should change that is left Justified this one is right it's Justified that makes more sense all right so the begin and the end is a nice way to do this with either changing the font size or changing the way that it is Justified because it's just easy to see where that starts and where it stops it's very definitive like where that ends it's not the only way you can do it let me copy these sentences here and show you a different way and this would work not just with the justification but also with sizing as well if you do backslash centering now notice I don't have a begin and an end if I do backslash centering it's going to affect everything that comes afterwards so all of those lines are going to be centered if I were to do backslash large say for example then everything that comes after that is going to be large I don't know what's going on with the uh that's weird why is it oh I see this is indented all right I thought maybe it was like weirdly centered in one part of the page nope this is just end indented that's all that's going on because I did soft returns here there we go they're all indented now okay so uh if we change this to Tiny then everything after that becomes tiny so it just depends what you want to do if you want to change your whole document then you can do this something like this is very simple I usually like the begin and the end again because then when I'm going back and looking at my code it's very easy to see where that started and where it ended so that's what I've got for text formatting now let's talk a little more about document formatting if you want to create a little title section at the top of your document then you're going to come into your Preamble so before the begin document you're going to come up here and you're going to enter three different lines backslash title with curly brackets backslash author with curly brackets backslash date with curly brackets now you don't have to type anything in the curly brackets but obviously if you want your title to show then you would type something let me do a full page view here so we can see what's going on so let's just say for my title I'm going to write my latex documents and for author I'm going to put my name Michelle crummell and for the date I have a couple of options I can manually type the date what is today's date hang on let me check Sunday July 26th so I could say July 26th 2020 like so now I'm going to compile and notice nothing changed on the PDF my title is not showing up so I've entered the needed information to create the title but I haven't actually told the compiler to print the title in my PDF to make it we have to actually tell it to make the title so after begin document you're going to type backslash make title all one word and we'll compile and now I have a title so there's a couple of things I want to point out with the date if you want to manually enter the date you can change that to anything I want any text I want even if it's not a date if you just want to put some other kind of text there you can and you can still use the backslash date coming and to do that oftentimes what I will do for the date is backslash today and then when each time I compile it'll figure out what is today's date and then it'll display that date so if I come back make some edits compile this again later it'll always have the most current date on it my students don't always like to do that because sometimes they turn in things late and they don't want me to know that they compiled it late the other thing I want to fix here is the word latex my latex document so the word latex is normally typeset in a very special way and to accomplish that you have to do backslash and then you type l-a-t-e-x and it needs to be done like so with a capital l a lowercase a a capital T lowercase e capital x and then when we compile you'll see that it did change like the font and spacing and formatting of that latex let me zoom in because it doesn't look quite right because there's no space between the letter Chi and the letter d so I can create that space by typing another backslash at the end of that word and compiling it again and now we get the space between the chi and the D that is a basic little title section on your first page there's lots of other ways to create title pages that then wouldn't have other things on them but we'll get into that in another tutorial how to format a math paper what we want to do here next is to create some sections and subsections in our document so let me go to the end here but before my end document and create a section so my first section I'm going to hit backslash section and then in curly brackets type the name of your section or the title for your section so this will be linear functions that's my first section I'll compile that and you can see that there's some automatic formatting that happened to that that's not like normal text linear functions for my section here it's bold It's a larger font size and it's numbered and I didn't manually number it the compiler will number it and so if I create another section create another section and call it quadratic functions pile and now that's section number two we can create subsections so underneath section one I'm going to indent again just for my own organization it's not absolutely necessary I'm going to type backslash subsection curly bracket we'll say slope intercept form and then let's do another one backslash subsection standard form and one more slash subsection point-slope form let's compile that so now we have subsections and the subsections again are formatted in a special way and they're numbered 1.1 1.2 1.3 if you don't like the way that the numbering scheme looks you can change that you can also add sub subsections so under our first subsection let's indent and do backslash Sub sub section example one and one more Sub sub section example two and compile and now we see those subsections are labeled 1.1.1 1.1.2 okay let's add a couple subsections under quadratic functions and the reason I'm doing this is because we are going to build a table of contents so I want to have enough to fill out my table of contents so subsection here we'll do vertex form standard form and factored form and compile okay there we go now if you don't want the numbering to be displayed then you type in asterisk after the word section so if I don't want those section titles to have numbers in front of them I can suppress that same with the subsections and do asterisks and hide those so just hide a couple of those okay so you can decide if you want them numbered or not I'm going to undo that because I do want them numbered for my table of contents okay so here we are I'm going to go back up to the top of the document and let's say the very first thing we want after being in document is our table of contents so backslash table of contents all one word compile and let me go full page now the contents is blank that's going to happen because it requires two compilings in order to create the table of contents so don't panic if you don't see your table of contents once you compile just compile again so let's compile one more time and there it is our table of contents formatted very nicely with our page numbers hello I'm Michelle krummel and in this video we are going to look at packages macros and graphics let's start by saving our file so I have a file that I've already started and I am just going to save that as tutorial 6. so let me find the folder where I want to save that tutorial 6. and if we look at that folder here we can see that it is tutorial 06.tech and we're going to start by looking at some packages that we can use to change how this document looks packages are used to load special instructions for the compiler so you can do things like add features that aren't included in the standard distribution or modify the standard rules for fonts and document formatting if you want to use a package you place it in the Preamble so the Preamble is the section of code between document class and begin document so I'm going to come up here to line number two and just hit enter a few times to give myself some space and we can start entering the packages that we want to use so the first package I'm going to show you is one that I use in almost every document I create and that is going to affect the size of the margin for my output document if you'll notice and I'm going to change the zoom here so that we can see the entire page there's a lot of white space at the top and on the left and on the right and even at the bottom below the page number so this is just the default margins that are set here and normally these margins are too large for the kinds of documents that I'm creating I prefer to have about a one inch margin so we can use a package to deal with that now the easiest way if I just want one inch margins on all sides is to use a package called full page to use a package we're going to type backslash use package I'm going to choose the option with the curly brackets and then I'm going to type the name of the package inside of the curly brackets so it's just full page and then I'm going to compile so we can come up here to compile or I can just hit F2 as a keyboard shortcut so notice what happened now we've got a one inch margin at the top at the left at the bottom and let's go back to full page view and you can see we also now have decreased that margin at the bottom so that's just really quick easy package to use if you want one inch margins on all sides now you can use different size papers in the United States typically we use paper that is eight and a half inches by 11 and if you want to make sure you are set up for that you can come up here and type letter paper to make sure we're using letter paper if you are using a four size paper you can type A4 paper up here and when I compile I don't know if you noticed that it went pretty quick there was only a very slight difference but look at the bottom of the page here that did make quite quite a difference so let me go back to letter paper and that's going to give me that eight and a half by 11 size paper now I might not want one inch margins on all sides we can customize this further if we use a different package so instead of the full page package I'm going to use the geometry package and this is the one that I use when I create all of my documents just because it does give me some more control so the geometry package I think if I compile right now it's not going to do anything I haven't really told it what I want it to do yeah it looks like it maybe it just went back to the default let's zoom in here a little bit now I'm just a fit to page width here and we can come in front of those curly brackets and put square brackets and that is where I'm going to enter the options that I want to use with this package so if I do want one inch margins I'm going to type margin equals one inch and compile um F1 to compile I may have said F2 earlier I don't remember F1 to compile and now I have one inch margin so this really has the same effect as that full page package when I when I do it like this and just say give me one one inch margins all all the way around uh although it looks like we don't have a whole lot of space under the page number there I can make this really specific and say no I want the top to be one inch and the bottom to be one inch but the left to be 0.5 inches and the right to equal 0.5 inches and let's compile that and now you can see that I do have those larger margins on the top and bottom compared to what I have on the left and right okay um now my margins are a little bit too small for my taste so I might change that and you certainly don't have to use inches you can use centimeters you can use any valid measurement that latex will accept here okay typically I just use one inch but we will leave that like so for now and let's talk about another package actually before we move away from the geometry package you can also explicitly specify your paper size so let me just show you that real quick we could say paper width equals 8.5 inches if we're working with eight and a half by eleven and then we can say paper height equals 11 inches okay so if I did want to change the size of my output for my paper I don't know maybe I want to do something crazy like uh five by seven and then we can see what happens so when you print this it's going to print 5x7 instead of now eight and a half by eleven so there might be some applications for that if you're if you want if maybe if you're making flash cards for example and you want them to be smaller then you could adjust that paper size even if your actual paper is not that size it would restrict the output to that size for you okay so let's just go back this is bugging me just because it's not what I like to use okay there we go that's making me feel more comfortable I've got one inch margins all around okay let's talk about another package and sometimes you're trying to type mathematical notation maybe you're looking up some syntax to do something like the symbol for the set of all real numbers and you try and type the code and then you get some kind of error well that actually requires a package some do use package and the name of the package that we're going to want to use for that is Ams fonts that package is going to allow us to use some specialized math notation so let me come over here to my questions and then add in before question number one uh let's just say I we want something something to do with all Runners I'm just going to type this is the symbol for all real numbers and the uh code for that we have to be in math mode we're going to backslash math BB you can see that it's popping up as a suggestion for me here and then we're just going to put capital r closed Math mode and compile and I will zoom in over here so we can get a better view of that but now we have there the symbol or a misspelled symbol the symbol for all real numbers and we of course have other symbols that we can use like the symbol for these set of integers so let me just copy that the symbol for and I probably should say for the set of yeah let's do that properly for the set of integers and that is going to be the capital z and we can see that it produces that symbol for us there we might want the set of rational numbers and that would be a q you get the idea now if I didn't have this package loaded I'm going to remove that and compile and you'll see that I get an error it's looking for when you see this undefined control sequence it doesn't recognize that command we do need to load a package I don't know if it tells me in the error message that which package I need but sometimes you will encounter that so we want to make sure that we're using that package and whenever I'm creating a document I automatically load the AMS fonts package whether I need it or not because I never know when I'm going to end up typing some mathematicals you know symbol that might require it and if you are not including any options so you're not using the square brackets to Define any specific options then you can actually load multiple packages all using one command so here I can type for example AMS fonts comma and then the name of another package that I want to use so I typically will load AMS fonts AMS Sim and what's the other one AMS math I think those three I just always when I start my documents I load those three packages just in case I end up needing them and you know in the end if you comment that out and compile and everything looks fine you didn't really need those packages you can always just leave a commented out or you can delete it from your code but I always just keep it in it's not harming anything all right so you load your packages again in the pre-ample that is before the backslash begin document now you can also load some macros in your preamble so macros are used to define your own custom latex commands and there are a few macros that I use often that I'm going to share with you but before I do that let's just you know look at how a macro might work in general so let's say you're working on a document and there's a little snippet of code that you know that you're going to use multiple times in your document you can Define it once using a custom latex command and then within the body of your document whenever you want to call that up you can just type that you know command that you've created instead of having to type the whole code so for example let's just say we were we were typing a paper and we were we knew that we were going to be working with a rational function and having to type it several times throughout the document so let's just say that that function is y equals and then we've got the fraction X over 3x squared plus X Plus 1. okay now I'm in the Preamble right now so compiling will probably give me an error like it doesn't make sense to have this up here I don't know that I've ever tried doing that before yeah I did get I did get an error because I'm trying to type this before my begin document doesn't like that but I just wanted to establish that this is an equation in fact let's move it on down here just so we can take a look at it on our document doesn't look that great at the moment if I want that to be a larger fraction I can go with d Frac instead and it would look more like that okay so let's go ahead and set up our macro and all we have to do is type backslash def for Define we are going to define a new command what do we want to call our rational function maybe we'll just call it backslash eq1 for equation one so we're defining equation one and then in curly brackets you're going to type the code that you want the compiler to run every time you type backslash eq1 inside of your document so you're gonna have to decide if you want to include the dollar signs as part of the command or exclude them I would say it's safer to exclude them just in case you're in a situation for example if you're doing an equation array or you're in a begin a line of environment where you don't want to use dollar signs uh you might run into issues there so I am going to omit the dollar signs and just type the actual equation part there now when we do want to call up this function within our document we're going to have to type the dollar signs so again you can decide if you want to include the dollar signs or not as part of the way that you have defined this special command slash eq1 so now that it's defined we can use it and it didn't look great just sitting there above critical thinking questions let's just make this a new item in our list here let's examine the function backslash eq1 now again this is going to be problematic because it's going to try and display equation one but it's not in math mode so you can see if I compile it doesn't like that it's telling me right I can see right away oh you're missing a dollar sign so we just have to put dollar signs around our EQ one and we should be good to go there we are let's examine the phone so without having to retype the equation I can just call it up like this and then any at any point throughout my document I can call that up again quickly just using slash eq1 so that can be helpful let me show you um some of the macros that I commonly use in my documents I have this document open right here this is one that I use very frequently and this one again we're in the Preamble is where we're defining these custom commands so this one starts backslash new command and then the name of the command in curly brackets so this is the actual command that if I were not using a macro I would just type this out within the body of the document whenever I want to use it and this is going to increase the vertical space between items in my list so it's adding more separation if you want to think of it that way the item set it's adding separation between list items and this pound one is for is where I am going to input a value so each time I this is this one is a little bit different because it's not a a static command that is going to be the same every single time this one I have to enter a value when I use this command and this is the part in the code that's telling me that I'm going to enter a value right here where typically a number would be so how do we use that after my begin enumerate if I decide that I want more space between my list items I can just bring up this command and I'm going to just type backslash set like this backslash set and then in curly brackets I'm going to type how much space I want so I can type the number one here let's compile and that has added some space if I want more space I could type the number two and that gave me even more space let's just really exaggerate it I'm going to type the number five and that's giving me a lot of space typically I normally just stick with about 1.2 that's my my go-to unless I'm trying to leave room maybe if I'm typing a quiz I want to leave room for students to write answers although I typically do that with a V fill rather than the set command so that is one that I use often another one that I use often let's go over here um let's look at this one now this one is going to require I believe that we use a certain package yeah we're gonna have to use our packages you can see I have a lot of a lot more packages loaded in this sample document than the one we're working in right now but let me go ahead our commands go in the Preamble so I'm going to put that one up here and this one is going to insert a calculator symbol the command that I would be typing is just slash calculator but we are going to want to use these two packages tixi pgf plots so I'll come back up here where I've loaded all of my packages and let's compile or I haven't actually asked it to use that command so let's try using it and make sure it works so I'm just going to right here let's say I want um to let people know that this is a calculator active question I can type backslash calculator pile and then it's going to insert that little calculator symbol now I need a space between that and let's so I always just put an extra backslash like so and that's going to give me that little extra space that I need there and so if I'm typing up a set of homework problems and my students know that they can use a calculator on that particular question so that um is a really great use of this macro because I don't want to have to type this code every single time I want to insert that calculator icon I just do it once in the Preamble and then whenever I want to use it I can just type the backslash calculator so that's how you do custom commands in latex okay and then the last thing we're going to talk about here is inserting Graphics now it's important when you insert graphics and by Graphics I mean image files jpegs pngs are typically the ones that you're going to be working with it's important that you save those image files in the same folder where you've saved your Tech file so let me open my finder window this is the folder where I've saved my tech file this is the tech file we are working on right now it is in this folder latex tutorial 6 packages macros and Graphics so I'm going to find the image that I want to use I've saved it to my desktops to make it easy to find it's right here so I'm going to copy that and then I will come back here this is the folder where my tech file is and I'm going to paste that image file in this folder they need to be in the same folder for the compiler to find the image otherwise you will get a compiling error so let's go back up top because we do need to load a package in order to insert images so the package that we're going to use use package graphic X graphic X that is the package that we are going to use and then where I want to insert my image let me go back to a page width view here let's put the image right above question number one here where's statement number one here we'll put it before the enumerated list so in between critical thinking questions I'm going to insert my image right here and the most basic way to insert this image backslash include Graphics you can see that the suggestion is popping up the scale now I can go with a scale of one I find that typically a scale of one it sounds like it should be the right size right because it's 100 percent scale but it's usually really big so if I do use scale I find that I normally have to use a number between zero and one but we'll we'll just try it and see what happens so scale equals one and then you type the name of your file so let me go back to that folder because I've forgotten the name of it so the file is limit dot PNG so here I'm going to type limit I don't have to type the dot PNG you can it's fine but you don't have to you can omit the dot and then the file extension so if I had a limit dot JPEG file I could also just type limit and let's compile and there is our image so it is bigger than what I would like for this document you can see the font size here on the axis is a whole lot bigger than what I have in the rest of the document so we can decrease the scale maybe try 0.8 still too big I mean let's go with 0.6 I typically don't use scale I typically want to make sure that all of my images have a consistent width or maybe a consistent height so there is another option for sizing your image besides using scale you can specify the height of your image you can specify the width of your image so let's just do width equals and we will try five inches okay so that's pretty big I don't know why I went with that that big let's try 3.5 inches now you can also specify the height instead of the width or at the same time so if you change the aspect ratio things are going to look a little wonky let's try height equals five inches and you'll see that I haven't maintained that aspect ratio so typically I just do one or the other either width or height you don't have to use inches you can use centimeters you can also use percents so we could say something like with equals to do a percent you want to do something like this zero let's if we want 50 we could say 0.5 so slash text width so that's going to make the width of the image half of the text width yeah that looks about half right if I went with 0.75 that's going to be really big because it's going to take up three-fourths of the um I can't say page width because it's not including the margins but the text width right so that's another way that you can size your images there and if you want something smaller now it's only one-fourth of the text width now if you want the image to be centered let's go back to 0.4 if you want your image to be centered and this is the way that you're inserting your image then before the image we can do backslash begin Center and after the image backslash end Center so we don't want to Center everything on the page we just want to Center the image okay so that is the a really simple way to get uh Graphics into your document there's nothing fancy here we don't have a caption you know labels any of that kind of stuff so if you do want to have a little more control maybe you want to add a caption to your image or you want to have a little more control over the placement of your image then we can put our image inside of the figure environment so let me take away begin and end Center because there's a better way to do that if we right before the image backslash begin figure and then right after the image backslash and figure all right let's compile that and you'll see that it moved the image now in the code I've placed the image between critical thinking questions and my enumerated list but the compiler moved the image and it displayed it at the top of the page well if if you don't like that you have some options for telling it where to place the image here we can do in square brackets in h for here place the image here now that might not always work because sometimes the compiler thinks it knows better about where that image would fit best like if there's not quite enough space where you want to put it or I honestly I don't know how it how it decides exactly where to place the images but sometimes even this lowercase H doesn't work if you want it at the top of the page you can use a t if you want to place the image at the bottom of the page you can use a b that moved it down to the bottom of the page but normally I want my image to be right where I coded it and so I use a capital H but if I try and compile this I'm going to get an error because the capital H requires a special package and that is the float package so that is one that I almost always load in my documents in case I need it because it is also really useful for placing tables not just images but also tables and so if you load that flow package and you use the capital H here it will put the image right where you have the code for the image regardless of whether it fits well in that space or not and if you want to Center your image then inside of that figure environment you can just type slash centering so that will Center the image and also the caption if you use a caption so if we want to place a caption below the image I can end my line here and type backslash caption and then in the curly brackets type my caption so this is a visual or oh let's just call let's just say this The Squeeze theorem now notice all I said was caption The Squeeze theorem I never typed figure one but look when it displayed the caption it labeled or numbered this figure for me automatically which is really nice if you have several images in your paper it's going to number them as you go and then later if you go back and insert another image it will automatically you know reset all of the numbering and number everything appropriately now for those of you who are using overleaf let's talk about how to insert an image here so I've just copied and pasted the code from my techmaker file over here and when I hit compile I did get a compiling error it looks like I have two errors and it's because it can't find the image I've asked it to include in the document so it's looking for this this file called limit and it can't find it because I have not uploaded it here into overleaf so you're going to want it to appear in this list along with your Tech file so here's our you know main Tech file I can rename this if I want so that it matches the other one tutorial 06 so you don't want to always have main.tech be your file names here because then when you start exporting things to your computer you'll have multiple Ted files that all have the same name so I do like if you're using overleaf get it in the habit of renaming those files okay so we need to upload an image and place it here in this list so here is the icon to upload and then you're going to find that image on your computer you can drag and drop it into the box I have that image on my desktop so let me do that I'm just going to drag it over here and drop it and it appears right here so now when I compile it should work out okay and there we go there is my image I had no problems finding that file because it is again in the same folder here in the same directory as the tech file itself so that does it for this tutorial we talked about loading packages we looked at defining some custom commands and then how to deal with inserting images into our documents I'm Michelle krummel and in this video we are going to take a look at errors and debugging so for errors I have intentionally made some very common errors and we're going to go through them one by one and see if we can fix them so I um haven't tried compiling this document yet I'm going to go ahead and compile it and when I do that I run into an error so I'm not actually seeing PDF output produced over here if the the file will not compile and so I have a number of errors and I can see in my log down here I can scroll through I have all kinds of errors and it's telling me it's giving me some Clues as to where these errors are and then what types of Errors they are so having the line numbers is very helpful and if you're not seeing your line numbers appear here you can go into your tech maker preferences and make sure you have line numbering turned on in your editor so that is a check box right here that you can select or deselect but I like having the line numbers show because it really does help when you're trying to find errors okay so let's look at that again now the first error apparently is occurring on line five and that's where my cursor is at the moment so it kind of worked its way through the file while it was trying to compile and there's a problem here on line five so the first thing I like to do is just read it very carefully and see if anything jumps out at me and I can you know make sometimes I'll just notice oh I see the mistake that I made there you know we're starting with double dollar signs we're closing with double dollar signs that's not an issue I have my left parentheses now whenever you use a slash left you need a matching slash right and I'm noticing I don't have a slash right so that's probably the issue and if we read the actual error it says right here missing slash right so that's a big clue to me to let me know what kind of mistake it is I'm dealing with so I do have clothing parentheses or parenthesis right here but I did not type slash right in front of it okay so I'm going to try compiling again to see if that fixed the error now it still did not successfully compile but that's because there are other errors in the document I can tell that I've fixed the error in line five because now when I look down at my error log the first error is occurring on line eight so we fix the problem in line five now let's deal with line eight notice we don't actually have any code in line eight so when that happens I usually go to the line right before it and and look for an error there another good tip when you're trying to troubleshoot here or debug your code if there are too many errors or you're just not sure exactly where their error is you can have the compiler temporarily ignore part of your code by commenting it out so anything you want to comment out you can type a percent symbol in front of it notice that this turned gray the line turned gray the compiler is going to completely ignore everything on line nine so sometimes you'll want to use that strategy just to narrow down where the error is now we the log says it's on line eight I know it's not actually on line eight so what I'm going to do just to show you how you can use this commenting thing I'm going to comment everything out except for endocument I don't want to comment that out because we have a begin document we need an end document or it's never going to compile so I highlighted everything else here and I can go individually and type percent symbols but there is a keyboard shortcut I can type command t on my Mac and that will comment all of the lines that I've highlighted alternatively you can come up here to edit and choose comment and it will do the same thing now I've just done it twice so I'm going to I think if I undo it'll only do one line so let me do edit and uncomment to okay there we go so now the only code that is going to run when I compile is the lines that are not grayed out here and I know that I fixed the error in line five so let's see what happens okay now it's just giving me errors on line eight supposedly line eight but I know for sure that it's happening right here because everything after that is being ignored and everything before that we have fixed so let's take a look at this and see if we can pinpoint what's missing the dollar signs look okay A lot of times um there's a missing dollar sign and that's an a common error that you can make but I'm noticing you know for every opening dollar sign I have closing dollar signs so that's good slash Frack I've got curly brackets around the numerator ah but I don't have curly brackets around the numerator because I accidentally typed parentheses here instead of the curly bracket so let's change that to a curly bracket now I think I've fixed it so I'm going to try compiling again and success the the file did compile now I've hidden all this other stuff so it's not showing so what I can do now is just unhide these lines one at a time I can uncomment uh them and back and then try and compile and we have an error now on line nine if I look at the error it says missing curly bracket so that's probably what the problem is and I sometimes I will count this is open number one open number two close number one open number three closed number two oh what did I just do there we go let's try that again actually when I'm doing this because it's hard to to kind of keep track I'll count all the open uh curly brackets and then all the closing curly brackets so I have open one two three I have three opening ones and then let's look for the closing ones we've got one and then two so I know that I'm missing a curly bracket somewhere now notice the color coding that's going on to help me if I put my cursor right after a closing curly bracket it shows me the pair it shows me the one that's opening and then being closed by this bracket so that's that pair is good this pair is good when I click here nothing nothing got highlighted like up here if I put my cursor next to that it's going to highlight the pair but when I put my cursor here it's not highlighting a pair so this opening one right here is missing a closing one so then you're going to look at your code and see okay where does the square root end and that means I have to put one at the end right here and now I've got that pair highlighted so let's compile and see if that worked that did work so that was successful let me go ahead and zoom in here okay so now I'm not going to just uncomment begin enumerate because that would certainly give me an error whenever you have a begin you need an end okay but now I don't I think I might get an error here because I'm saying hey I'm making an enumerated list but then I didn't put any items in my list so you need at least one item and if we compile that works there's my first item so I'm just going to take a chance maybe there's no errors in here and I'm going to highlight all of this and to uncomment them all back I can hit command U on my keyboard or I could have gone up here to edit uncomment and it would have the same effect and now we will compile that and I am getting an error so I know there's an error somewhere here okay so let's see if we can figure out what it is we've got the second item that looks fine begin enumerate and anytime you see begin something ask yourself do you have a matching end and I don't because the end enumerate right here matches the begin enumerate right here so this beginner numerate does not have an end enumerate so I need to come down right here and add an end enumerate that's a common error that happens especially when you're making nested lists and now everything is okay indenting can help with this if you don't indent and you have everything like this then it's hard to see which begin enumerate is paired with which and denumerate it's a lot easier if you indent and you can indent a bunch of lines at once if you highlight them and then for my Mac it's command shift and then the right angular bracket on the keyboard the one where you uh same key you hit for a period and you can do that multiple times if you want to indent more and if you want to go in the other direction you can use the left angular bracket to go the other direction okay so then let's comment out this next part and see if there's an issue there also I'm going to try compiling nope I've got a problem here and I'm if I read the error message it says undefined control sequence so undefined control sequence often happens if you well the compiler doesn't recognize a command so you typed backslash something and it doesn't recognize it and the most common reason common two reasons for that are one the commands you're trying to use requires a package that you don't have loaded or two there's a typo in your command you accidentally misspelled it which is the case here because I meant frack and I spelled farc so we'll change that to frack and see if that fixes that and it does there's my fraction there I'm going to go ahead and just uncomment all the rest of this stuff and we'll see how many more errors we have in this file okay scrolling down here it looks like we still have quite a few so I'm good up to line 24 even though it's telling me that the next error is on line 26 missing dollar sign inserted and I can see right away that it's a dollar sign issue because remember when you open Math mode using a dollar sign everything in math mode turns green and looking at this there is way too much green here too many things are green that aren't supposed to be green only the math should be green so this text if that discriminant that should not be green so I forgot to close my dollar sign right here and as soon as I type that dollar sign you can see that that text now turned black which is how it's supposed to be so let's try compiling now I still have errors in the document so it did not update the PDF this is the PDF from the last successful compile that we did so be aware of that as well if you feel like you're clicking compile and nothing's changing over here it could be because you have a compiling error and it's not updating your PDF for you and you can turn these this message log off so if you're not you know maybe you wouldn't realize that you had an error your PDF is just not updating but for me the message log automatically pops up when I have errors okay so now let's look at line 27 and see if we can figure out what issue we're having here so in the Align environment first of all I noticed something's weird because it's colored in a strange way I'm expecting the math to be green and things that aren't math to be black but this stuff right here I clicked a dollar sign to start Math mode but this is black why isn't it green if it's in math mode well when you're when you start the a line environment here when you type backslash begin a line it's it automatically puts that in math mode so I'm in math mode before I ever type anything when I do begin a line like that I'm in math mode right now so if I start typing you'll see it's green because it is in math mode now let me go back to what I had so what happened when I typed the dollar sign is it actually closed the math mode and that's causing me errors here so when you're working in a line never use the dollar symbols you're automatically in math mode now things look a bit more normal the math mode is green like I would expect it to be so let's compile and we still have an error it's still saying line 27. now obviously the problem is not on line 27 because there's nothing wrong with this code right here the syntax but it's something to do with my align environment here if you look at the other code messages that are popping up so sometimes this will give you a clue as to what's wrong and other times you know maybe it's not you're not real sure what this means miss it looks like missing dollar sign inserted but that's not really what the issue is here misplaced alignment tab character that's talking about the Ampersand that's not the issue here the issue here is that we have a blank line in our align environment and typically blank lines don't matter at all you can put as many blank lines in your code as you want it's not an issue it's not even going to show up as blank lines over here on your document in fact the compiler ignores spaces as well I don't know that I've mentioned that yet so not in text I don't not in text mode in text mode Let's see what happens if I put a bunch of spaces here actually I think it probably will still ignore it oh let me hide this because it won't compile so there's an error there so I'm commenting that out so we can see what happens here when I put in all these spaces there and look here then there are no real Roots it ignored all of those spaces you can type as many spaces as you want here and it's going to ignore it which is kind of nice because sometimes when you're you have a lot of code it's helpful to your eye to space things out for example up here where we have the square root especially when you're trying to find an error in fix and error sometimes I'll come in here and I will just put a bunch of space like I know the slash square root goes with that closing bracket right there and I'll just put a bunch of spaces just to visually separate it so I can focus on the interior because if I'm sure that this looks correct and it's matching with this right here then I don't need to focus on that part of the command I I really want to just focus what's in the middle here so spacing things out in your code can be helpful and this absolutely will not affect your output the compiler will ignore spaces sometimes it's frustrating frustrating because you want a space and it's ignoring the space when you type it but there is a way to hard code a space if I want to put a spacer I can just do backslash comma and then I could do that as many times as I want so let's insert some spaces here and now when I compile I should see the square root symbol and then a weird amount of space and then my fraction so that's happening right here I've inserted some extra space there let's take that away because that's not proper okay and now it looks normal again so let's go back to trying to fix our issue here and I think I already told you what the problem was in an align environment you cannot have an empty a blank line you cannot have a blank line so let's remove the blank line and try compiling and oh I still have another error okay I thought that was going to work okay so I'm not getting any any good Clues from the message here so I'm going to look at the code very carefully and make sure I didn't misspell something make sure that I have all the matching stuff that I need everything looks good so my next uh thing to check is is there a package missing that maybe I need so at this point I'm not sure what the issue is I always go to Google Google is your best friend when you are trying to troubleshoot latex errors so I am just going to Google's you know some kind of words that are going to indicate what my problem is so latex and then begin a line and let's see I think it's a package issue so let's see what pops up so a couple of Clues here I'm seeing use AMS math use package AMS math the very first hit aligning equations with AMS math so I think that was the package I needed and not that float package so let's come back up here and try AMS math AMS math and compile and sure enough that fixed the issue so that was the package I needed and I think I mentioned this in an earlier video whenever I create a document I always load AMS math AMS Sim and AMS fonts because I can never remember which one does what and I frequently need to use these three packages so just out of habit I go ahead and load those packages for all of my latex documents so that fixed the issue that we were having here okay so uh fixing errors you know it can be frustrating certainly but you want to try um just a systematic approach to it use that tip I showed you about commenting out parts of the code so you can really narrow in right where the error is use that error log to help provide clues to you so you can see what the error is and before we go let's just hop on over to overleaf and I'll show you what debugging looks like in overleaf it's a little bit different to be honest with you it uh it's not very pleasant okay and I think I made this sample document it was a copy of our tutorial with all of these errors in it so the reason I said it's not very pleasant is just because you see all of this red like it just induces panic when I see this I'm typing on a document and then things all of a sudden turn red right it's very jarring but it's showing me that I do have issues now in overleaf so I'm trying to compile it's not compiling clearly I'm having a problem because everything turned red it's giving me some indication of maybe what the problems are but but you see that it's not quite as um explicit as it was in tech maker where it said line five and then line eight and then line nine we are getting a little clue right here this l.5 is referring to line five uh and it looks like slash right it's also identifying what the problem might be there you really have to read these read these and look for Clues uh and then also this red X right here is indicating that we have an error on this line so we're going to try and fix it if you remember from last time the problem was we were missing the slash right in front of this other bracketing symbol okay now as soon as I fixed that notice what happened the Red X in front of line five disappeared but now I've got all these other red X's so these are indicating other problems now this one doesn't make a whole lot of sense uh backslash begin document like that's there's nothing wrong with that but if we hover over this and look at the message it's saying it's unclosed in other words like we have a begin document but we don't have an end document well clearly we do have an endocument it's down here but look what it says down here hey I found an unexpected end document after a begin enumerate so it's it's seeing this slash end and trying to close and enumerate so now I'm kind of piecing together the actual problem it's not the begin document it's not the end document it has something to do with a begin enumerate that probably wasn't closed and I have to really like hunt through here look very carefully at all my beginner numerates and make sure they have matching end in new rights and if you remember this one does not so it's a little harder I think to troubleshoot this problem in overleaf slash end enumerate and you can see as I'm fixing things some of that red is going away it's not panicking quite as much but now we have other coloring issues going on and oh things are turning red again that's not cool uh oh now we have a warning here this symbol is just a warning it's not necessarily going to cause a compiling error and if you read the message it's telling us something about the end of line which is happening all the way down here so to me like debugging an overleaf is definitely not as easy as it is in tech maker and I would highly suggest if you're working an overleaf that you use that strategy of commenting out a large chunk of your code so that you can really focus on one little section at a time but before you even get to this point the best piece of advice I have for you I can't believe I haven't said it before now in this video but the best way to prevent errors or to to debug errors is to compile all the time compile frequently right after you type a line of code compile and so you can see oh that works no errors keep going type A next little bit of code compiled don't try and type your whole document and then hit compile and end up with 25 errors then it's a nightmare to try and fix them all so compile as you go frequently every line every couple of lines hit that compile button and make sure that everything is running properly okay I'm not going to go through fixing all the rest of these because we already saw how to do that how to fix them but I I did want to show you what the interface is like over here um even though it's tempting to fix them just to get rid of all of this red here I'm Michelle crumble and in this video I'm going to show you some tips for using tech maker and some tips for using overleaf so we're going to get started by opening up a tech file that I've already created techmaker is set to be the default program that will open Tech files that are stored on my computer so if I double click on this file it's automatically going to launch techmaker and open the file within techmaker so here is a file and this is what our tech maker window looks like yours might look a little different because I I may have changed some options some of my viewing options so in terms of what you see on the screen right now you can change that with these four buttons at the bottom if we open up the structure panel over here we see first of all our file structure and right now I just have the my my tech file here I don't have anything else added in here if I click on some of these other buttons we're going to see a list of symbols and if I click on one of these symbols it's going to insert the code for that symbol so I want to think about where I'm going to insert this let's just insert it at the end of this first list item so this particular symbol requires Math mode so I'm going to hit dollar sign and then let's say I forgot the symbol for plus or minus I can come over here click on plus or minus and it's going to insert the code for that symbol for me right here and now when I compile I should see the plus or minus appear so to compile my document I have a few options what I usually use is just F1 F1 is keyboard shortcut that is going to run the code for me so I hit F1 on my keyboard and my document compiles and I can see the result over here and sure enough I've got that plus or minus symbol right over here another way that I can compile my code is using the quick build option up here and in this drop down menu you can decide what's going to happen when you press on this Arrow so I like to have it set to Quick Build and quick build is going to do two things it's going to run the code it's going to turn it into the PDF and then it's going to show me the PDF so we can change what quick build is doing in our preferences if we go to tech maker preferences quick build right now when I run quick build when I press quick build it's going to run PDF latex view PDF so you can see that there are quite a few other options that you could select instead but this is probably the one that you're going to want to use so I would hit this Arrow right here and that like I said is going to run the code and then show me the PDF now if I let's say I take away the plus or minus okay so now when I run my code it should remove that plus or minus symbol and I should not see it on my PDF if I come over here view PDF and I click that nothing changed I still have the plus or minus there even though it's not over here in the code and that's because view PDF does not recompile your document it only shows you the PDF from the last successful compile I have not recompiled so just clicking on this Arrow right here is not going to do anything but show you the PDF from the last time you compiled it's not going to recompile so you have to make sure you're clicking on this Arrow not this one over here click on this one or like I said use your keyboard shortcut of F1 and that recompiles and we can see the plus or minus symbol has disappeared so you have other categories of symbols over here we've got arrows different symbols brackets Greek letters most used symbols this is going to populate automatically based on what you've clicked on in the past and then we've got our favorites the star here is a place where you can store your favorite symbols so if there is something that you think you'll use frequently maybe I don't know I'll just use this summation symbol you can right click add to favorites and then you can quickly find it by clicking on that star icon and then just choosing it over here if I click on this it's going to insert that into the code but I don't actually want that there okay I'm going to go ahead and close the structure panel so I'm not using it so I don't want it to take up space on my screen we have some other things that we can click on over here to call up some other commands so if you need to start a new section you can do that this way and you can type the name of the section that you want I'm not sure where I left my cursor so this is probably going to put it in a bad place in fact let me cancel let's say I want to create a section right here so I can go to section and I don't know what I want to call it section one and I'll hit OK and it's going to insert the code there to start this section for me and then if I compile we can see that it added section one for me there you have other options that you can use just click on here to see what you've got all of your different font sizes this one can be helpful it's hard to remember sometimes what the smaller font sizes commands are if you want to use this one right here to make something bold you want to highlight the text first so let's say I want to have chain rule in bold I would highlight chain Rule and then I would click on the B and you can see that it inserted slash text BF the curly brackets and my text is inside so now when I run my code chain rule is in bold okay so that can be a bit of a Time Saver and same thing here with italics emphasis is another way to do italics here we've got some justification symbols this one and if you hover your mouse over here it'll pop up a little box that tells you what it's going to do so this is going to insert a new line here we're going to get dollar signs a pair of dollar signs Etc so you can look at these different options a fraction is something that people frequently use so that's handy to have it right here in this toolbar same with the square root but remember in tech maker when you start typing a command so let's say we want to square root with open Math mode with a dollar sign if I start typing backslash SQ it's going to pop up some suggestions for me so the top one would be for an nth root and the bottom one would just be as for a square root so that would give me the square root of x so you can decide if it's faster to just type it by hand or maybe to click on some of the buttons over here before we look at some of the other things in our menu so let's go ahead and open the tech maker preferences and see what we have going on there under this commands tab I just want to point out that you do have the option with your PDF viewer to use the built-in viewer or an external viewer when you use the built-in viewer that's what allows the PDF to show up in this pane over here on the right which again you can toggle on and off at will if I switch to an external viewer let me go back into my preferences if I switch to an external viewer and it's one or the other you can't have both selected the external viewer is going to when I ask to view the PDF it's going to open it up in a different application outside of techmaker so by default my computer uses Adobe Reader to open PDFs so I'm pretty sure that's what where it's going to open so now you'll notice I don't have the option to view the PDF in a pane over here that went away so now when I want to view my PDF so I can quick build remember we'll also run view PDF or if I just want to view the last successful PDF I can click here and that popped open in Adobe Reader so there's my PDF I prefer to have the built-in PDF viewer because I'm constantly looking at my PDF I'm constantly compiling as I work to make sure that I catch any errors right when they happen so let me go back into my preferences and go back to that built-in viewer if you use something other than Adobe Acrobat you can always change the path here so click on this folder and then just go into your applications folder and find that executable file that will launch whatever PDF reader you have installed okay so let's move on to quick build actually nothing new to talk about here I showed you how you can change the setting but I'm confident that this is the one that most of you are going to want to use under the editor if you change the font family or the font size here it's not going to affect your PDF output it's only going to affect this little text editor part of your screen okay so it's not going to affect what's put on your PDF output document now for the purposes of this video tutorial I made my font size pretty large 24 point is pretty large because I wanted you to be able to see the text clearly when I'm working I normally work with it at size 16 so that's more comfortable for my eye and I can see more of the code on my screen this is normally the font size I work in but again you can change this you can make it smaller you can make it larger so when I'm recording videos I like to set it to 24. there are some options over here for you to consider word wrapping I like to have word wrapping turned on so in my text editor let's slide this over here uh we'll just slide that over some more when I get you know when I run out of room here it's just going to wrap down to the next line so I like that because I always want to see all of my code on the screen but it does make the this file take up a lot more space on the screen so if that's not something you want you can turn off the word wrap completion so this is that auto completion like when I started typing the code for a square root and it popped up the suggestion on how it thought I might want to complete that command then you just hit enter when you like the suggestion so that is um I find that to be a Time Saver I like having the completion turned on show line numbers is also really useful especially when you are trying to debug your code because an error message will come up and tell you hey there's an error on line 14 and then it's very easy to find that in your code you can just go right to line 14 and see the code you'll notice that some lines don't have numbers next to them and that's because of the word wrapping so this technically this part right here it's not going to let me click on it because I have this other window open this where it says to solve this is not a separate line it's part of the previous line so it doesn't get numbered as a new line versus this empty line here you know I had to hit return to get to this empty line and then return again to get to this line so even though there's nothing there this does count as a line number okay back over to our preferences here back up your document every 10 minutes you can certainly turn that on if that's important to you the reason I don't have that turned on is because when you do have this turned on then for all of the files you're working in it the compiler is going to or the program is going to create this extra file it's going to be also called tutorial 8 and it'll have the extension bank so in your folder let's see if I still have that fold yep in the folder here there would be another file that says tutorial underscore 08.bak and my folders I just feel like I have a lot of files them in them as is and I don't like having that extra file in there but it's no big deal if you want the safety of backing up your document every 10 minutes you can do that I almost always recompile more frequently than 10 minutes so it's not really useful for me because every time you compile it's going to save that file on your computer so that acts as backing up every so often as well now this is a good time to point out when I first launched this file these this tutorial8.aux.log and this dot syntax dot gz we're not here the only thing that was in here was this CMG project and then the tech file and the PDF but while you are compiling your file these other auxiliary files are being created these helper files are being created and they will stay in there and they will clutter up your folders and you really don't need them once I close uh tech maker I'm going to show you I'm just going to come in here and close tech oh it's not going to let me because I have this window open okay so now let me try closed techmaker and look those helper files disappeared that doesn't happen automatically that only happens because I set that up in my preferences to happen that way but it helps just clean up the folder so I don't have a lot of extra unneeded files cluttering up my folders so let me launch this again I'm just going to double click on this to open that up and if we look at that we see we just have these two files but now if I compile or I could have actually I could have stayed on this no I couldn't off there we go okay so now we've got all those helper files in there so how do we change that setting to get rid of those helper files when we don't need them in your preferences right here you're going to make sure this box is checked launch the clean tool when exiting techmaker so when you X Out of the program it's going to remove those extra files that are not needed okay so um we were looking at the editor window tap with number of spaces you can increase or decrease that as you like so that would be when I'm working on my code and I want to indent by hitting tab that's just how many spaces it will indent so you can customize that you can change the color of certain things so you'll have to know the hex code for the color that you want this is white so the background that I'm working in again it's not going to affect your PDF output it's just this editor panel here where you're typing your code if you want the white background there's a dark theme and there's a light theme so if you like working uh with like white text on a black background you can go with the Dark theme or I don't know if it's white text actually I don't typically use the Dark theme but right now the background color is set to White are the highlighted line I forget what color that is that might be correct I don't remember this is black this is gray um this is green so the when you're in math mode it's going to show up as green so you can customize that if you don't like the default colors you can come in here and change the hex code okay and then the shortcuts tab here is just going to give you a list of keyboard shortcuts and if there's something that you find you're doing frequently and there's not already a keyboard shortcut for it you can add a keyboard shortcut for it so the things that say none you can click on that and then you can Define your own custom keyboard shortcut all right so that takes care of preferences and we've looked at the this toolbar uh we sort of talked about the important stuff on this toolbar what have we got up here so tech maker this is where we found preferences if you're on the Windows version you may have to go to options to find preferences at least that's the way it used to be but on the Mac it's tech maker and then preferences file we've got uh standard stuff here edit these four commands are very helpful and I use the keyboard shortcuts for these all the time so if you want to comment out a line let's say for example I don't want these last four items in my list to show up on my PDF I can use the keyboard shortcut which is command T and it's going to put a percent sign at the beginning of each line and so by line I mean the number line is where they're numbered and then when I click off of that you'll see that it also changed the color to gray so it that's another indication to me that something is commented out and what we mean by commented out is that the compiler will ignore that line of code it will not even consider it when it is running your code it's just going to ignore it when it gets to that line that's been commented out so one use of commenting things out is you know maybe you don't want something in your document let's compile so there I just got rid of some of those questions but you don't want to delete it because maybe you're uncertain and you're you you want to show it later on so I do that sometimes when I'm writing a quiz or a test I have a question that I decide to Omit but I don't want to delete it because I think well maybe in the future or if I'm making um a makeup test I might want to then turn on that question so that's a good way if you're troubleshooting and you're trying to figure out where an error is commenting out a bunch of lines can really help you pinpoint exactly where the problem is and help you fix it now to undo that to a bunch of lines at once we can use the keyboard shortcut command U and that will make them all visible again another use for comments is just to leave little reminders for yourself especially when you're first learning latex maybe you don't you know remember what a certain piece of code means this for example on line three will remove paragraph indenting so I could leave a comment here for myself I just go to the end of the line not the beginning because then I won't run the code at the end of the line time type your percent symbol and make a note so this will remove the indents and it doesn't necessarily have to remove the indent but the zero is going to cause it to have an indent of zero space so I could put a number there instead if I wanted 10 ex is a unit of measure then that would give me large indents but I typically turn off indenting in my documents so another good use for comments there indent indent indent and unindent would be not for the PDF output not to confuse you because I was just talking about indenting here this is the code that will affect the indenting in your output document but sometimes you want to indent your code so maybe we want to indent these lines right here I can do that all at once if I hit and I'm on a Mac so it's command shift and then the right angle bracket and that will indent if I hit it again it will indent more so it's a good way to organize your code make sure things are lined up that all belong together and you can undo that or reverse that by command shift and then the left angular bracket and again if you forget the keyboard shortcut you can always just access it from the menu here or you can look and see what the keyboard shortcut is from the menu here under the latex menu here you've got all kinds of different options if you forget the code for something you've got it right here you can just click on it and it'll insert the code for you I don't know where my cursor is at the moment let's put my cursor in a good place well we'll just put it at the end of that sentence there okay so one that I find hard to remember I have a lot of this stuff memorized but one that I find hard to remember sometimes are the international accents and this comes up when I'm trying to type l'hopital's role so for low vital's role we need a special accent over the O and this is the command right here just put an O there so it's capital l apostrophe h o but it's the accented o will be tall and then let's build that and we can see it right there it's got the special accent over the o so the pull down menus are great for things that you don't use too often you don't remember what the code for them are it is our math we have other menus here if you just kind of hover over you'll see what's available there the wizard is cool um let's I'm going to just close this document I'm not going to close tech maker I just want to close this document and let's start a new document so this old PDF is just hanging out over here just because I haven't recompiled something yet so let's start a new document so I'll just click the new and you know we can start from scratch or we can use this wizard to get started quick start it's going to ask me for some basic settings we want uh and to use the document class article if you're doing a slide presentation you would use Beamer but we have article and you've got some options here you don't have to use any of these options you can ignore that if you don't need it I don't see anything here that I want you can decide if you want to go 10 11 or 12 point let's go 12 point just so this is a little bigger for the video paper size you can choose the size of paper that you would be printing on so in the US we use letter paper the author if you want to include that if you know that you want to include your name in your document you can do that if you know the title of your document I mean you probably do this one that we're working on is critical thinking question or we'll just say IB math analysis and approaches HL okay geometry package do you want to load the geometry package that's pretty useful and then you can specify all of your margin sizes although I don't like the ones that are being offered here I would prefer one inch margins and if I don't want to if I want them all to be one inch I can just say margin equals one inch AMS packages absolutely I always include those the graphic X package if you're going to have images in your file so that one is useful and that's all I need I'm going to hit OK and I've got some basic stuff here to get me started I usually like to space out things a little bit here after my packages I'll leave an empty line okay that looks good and if this I don't know what's going to happen with the dot here let's see if we get an error yeah we do oh for but for a different reason it won't compile your document if you haven't saved it and named it so you got that could not start the command error it looks like hey I have code here why aren't you compiling it and it looks like it has a name but it actually doesn't I have not saved this file yet and named it so we have to do that so do file save as and then sure let's keep put it in the same folder tutorial underscore 08 B and we'll save that okay so now my file is named never never never never use spaces in your file name you'll notice I put the underscore there instead of typing a space do not put spaces in your in your Tech file names or your image file names it can cause issues okay now let's see if we can if this dot is gonna still result in an error it does not okay so sometimes people message me and they're having and they did something like this and then they try and compile and they get an error oh now it's not going to work because it still remembers this but if that happens to you the reason that you're getting a compiling error here is because you haven't actually typed anything between your begin document and your end document it looks like you know you have typed a lot of stuff up here but this is what we call the Preamble the part of the code that comes before begin document is just your Preamble it's like pre-setting certain things up and you can't run the code unless you actually have something in between your begin and end document so even if it's something simple like hello and then we can run that and no issues there okay so quick build not quick build the wizard quick wizard quick start there we go quick start can be helpful way to get you started from a blank document and you've got an option to do a quick start for a beamer presentation and some other options as well if you want to insert a table you can also use the wizard there quick tabular is going to bring up this window and you can enter how many rows and columns you want in your table and you've got other options here if you want to align the contents of your cells left right or centered or if you want them to be in like paragraph form if you're not entering numeric values if you're entering text you might want to switch to a paragraph and where you define the width of your columns there you can also merge some columns and decide if you want a border on the left and the right and at the top and at the bottom so you can have all of those or none of those or some but not all and you can check what you want there um you can add a vertical margin for each row if you want that and when you click on okay you can even come up here and type I think can you type contents yeah absolutely you can even type the contents of your table now that should be in math mode so tables can be a little bit tricky to code by hand so that's not cooperating so this is really nice to have sort of a visual way to create your table and then you hit OK and it's going to insert the code for you at least it's a good way to get started you can add more columns you I mean you can obviously edit this table now in any way that you like so let's take a look at that there we are it's pretty simple what else are we going to look at under user I want to show you this this is super helpful I use this all the time you can store bits of code and then just call them up instantly so this is really great when I am let's see which one do I want to look at well if you want to add your own you're going to go to edit user tags and then click on one you can only store up to ten so click on this one is empty we could do a new one here or we can just look at something I already have so this is something that I use often and I'm certainly not going to have this code memorized but this is going to insert a little calculator symbol so I often do this next to like calculator active problems if I'm assigning homework so I have this stored Under menu eight and I can type the code let's say um I want the little graphing calculator symbol right here so the command is slash calculator and then I need to put the code for that in the Preamble so I'm going to come up here now I can come up to user user tags and then just either click here for calculator icon or if I know the keyboard shortcut it's just shift F shift f8 so I can just do shift f8 and that inserted all of these lines of code here for me so I don't have to have them memorized now I have lots of little code Snippets that I use over and over again and I only have 10 slots to store them here in techmaker so what I actually do is open Google Keep and I store all of my code snippets on separate little Google keep notes and so I can always find them easily there as well that's another tip for you okay so that is looking good and now when I run this I've got my little calculator symbol in front of hello okay view you can turn on and off different uh toolbars options help so notice under help you do have access to a latex reference and a user manual the user manual is going to help you with tech maker specific stuff that opens that up in a separate window here but you can learn all about tech maker and the different options and if you're having trouble with some aspect of tech maker that can be helpful you also have the latex reference which you can look up different types of commands so if you want to learn more about equation arrays you can click here and then read more about equation arrays and get some sample code and some explanation on how that works or any packages you might need like this one it tells you you have to use the AMS math package if you're going to use in equation array so that can be a great resource for you as well okay let's switch over to overleaf and I'll show you how to do a few things here so I am logged in if I want to start a new project I'm going to click on new project blank project notice that there are lots of templates available though in the and overleaf has a template library with with tons and tons and tons of templates that you can use so which is really great if you're typing up a science lab report they have some templates that you can start with resumes all kinds of things but we're just going to go with blank project and we will again call this tutorial eight overleaf and that's just the title of the project but notice that when we create this that's not the title of the file I told you never never put spaces in your file name and I did put spaces in the title but that is not the name of the file the name of the file is what we see right over here main.tech and I always recommend to my students when they're using overleaf to change the name of that file because every time you start a blank project in overleaf it's going to call the file main.tech and so it just gets confusing when you have lots of files that are different but they're all called main.tech so I always recommend renaming that we'll call this tutorial 8C there we go and you can um in this this pane is like the structure pain that we had in Tech makers so if you do add more files to this project they will appear in the list here if you want to go back to the main menu you would think that you should click on menu but that is actually not going to take you back to the main menu if you want to go back to the main menu you click on this Arrow right here and that's going to take you back to this main screen here so now to go back to my project I can just click here and we've got some basic code here to get us started if you don't like what's here you certainly can type over it or delete it and start with something else you can if you're loading a template you'll have lots of code in here for you and you can just edit it as you need to so I'm not going to do much with the code I just want to point out where certain things are in overleaf and also show you how you can download copies of your Tech file and your PDF document in case you need to send it to someone or submit it to your teacher this panel right here is just like in techmaker is where we're typing our code and you have the option to switch to the Rich Text Editor I don't recommend this but I guess it can be helpful if you're really you know kind of unsure of what something is going to look like and maybe it's not compiling because there's an error this might give you an idea of what your work is going to look like but I recommend sticking to source and just working with the actual code here when you're ready to run your code you're going to click on recompile and then it will refresh and show you your PDF output over here on this panel if you are working on a small screen and you you know this is very tiny and you can't see it very well you can also collapse some of these paints so you can click on right here to go full screen and now it's just the PDF so you get a nice big zoomed in view of your work and then you can go back split screen you can also drag this separator to the left which will increase the size here and has the same effect as zooming in or you can drag it to the right this side will get smaller this side will get larger so you have some options there you can also close these panels using these little arrow symbols right here so now I've hidden that PDF panel and then I can bring it back like so if you want to share your document and have multiple people working in this same document you can do that so here's what I recommend for my students when you want to share a document don't use this option here where it says share with your collaborators I mean intuitively it seems like that's what you should do right you type in someone's email address and then you share it with them well in the free version of overleaf you are limited to how many people you can collaborate with and so another option instead of doing that would be to turn on link sharing up here turn on link sharing and then anyone with the link can edit your project if you share this link with them or anyone with the link can view your project if you share this URL with them okay so if you are working in a group of four for example this is the way you want to go turn on your link sharing anyone with the link can edit the project send your collaborators this link and they will all be able to work in the document with you you can also turn on chat and so if multiple people are working in the document you can have a chat message going on about certain things you also have the option of commenting commenting in techmaker is gray when you comment here in overleaf it's this bright blue so it's really easy to see the con actually I like that maybe I'll change that in my tech maker and make it blue instead um so it's easy to see comments that's another way you can communicate with people is by leaving comments in parts of the code but the chat is another option for you okay let's say you're done with your project and you want to download a copy of your PDF so that is very easy to do you just click on this icon right here and it downloads the PDF for you and then you can open that on your device and it'll open in whatever PDF viewer you normally use there's my PDF and it downloaded it by default into my downloads folder so I can find it there on my computer if you want to download your Tech file that is not quite as easy in fact it's much more difficult to do that especially for my students who are working on a Chromebook but if you want to download your Tech file you're going to come over here and click on menu the thing that you think would take you back to the main menu but it doesn't so click on menu and then you've got two options here if you click on PDF it's going to download the PDF but frankly the other way to do it was easier or you can click here that says Source that's what you're going to want to do you want to click on source and it's going to download not your Tech file it's going to download a zip folder and in that zip folder you will find any of the files listed here so if you've uploaded images or you have multiple text files here or whatever files here any files you have here that are associated with this project when you click on Source it's going to download all of them in a single folder and zip that folder and send you the zipped folder so that folder is called tutorial 8 overleaf that's the title of my project dot zip now on a Mac this is really easy to deal with so I just find it I just clicked on on that and said show in finder but you can also just go to your downloads folder and it's right here tutorial 8 overleaf.zip all I have to do on my Mac is double click on that and it unzips it and actually when there's more than one folder it looks a little different so let's let's go back here and add something let's add an image in here I'm going to upload and I'm just going to drag an image from my desktop okay so I've added an image here and I warned you not to have spaces in your file name so I'm going to rename this okay so now I have an image and a text file and I'm going to I want to download at least my tech file but really it makes sense to download both because no one can run your Tech file if they don't have a copy of the image you'll get a compiling error okay so let's try this again all I have to do is click on this and it's going to this was the zipped file I already had one with the same name so that's why I put the one at the end this is the zipped file and when I double clicked on it it unzipped it or sometimes we call that extracting but now I just have a regular folder this is not zipped anymore so when I look inside that folder I see all of my individual files I've got my tech file and I have my image file what I don't have here is my PDF this doesn't make sense to me why don't they just don't also include the PDF as part of this that would be nice but you you if you need both you're going to have to download them separately okay so now you have access this is in my downloads folder I can move it anywhere else I want to on my computer I can upload it into Google Drive I can upload it into my learning management system like canvas or really I can do anything I want with it and to get back to our Tech file just click on it and then that will make that the active file again so I think that covers everything I wanted to show you in overleaf and I hope you're able to use some of these tips to help you work more efficiently hello and welcome to another video in my latex tutorial Series today we're going to be talking about some common notation that you would see in calculus such as limits integrals summations and Vector notation I'm starting with a very basic setup all latex documents start with the command backslash document class and I've set this one up to be 11 point and the type of document is an article the only package I'll be using for this tutorial is the geometry package and that is simply to adjust the size of my margin so that is optional you don't have to use that the body of our document will type in between the commands slash begin document and slash end document I'm going to begin by identifying the domain and range of a function the function and now I want to enter Math mode so I type my dollar sign f of x equals and in parentheses I want x minus 3 squared so I raise that to the power 2. plus one half backslash frac and tech maker is going to fill in the rest of the command when I hit enter and I can tab to get to the next part and move my cursor outside of the braces and let's go ahead and compile this and make sure it looks the way we expect remember when you open a new document you must save it and give it a name before you try and compile it or you will get a compiling error now I usually hit F1 as a keyboard shortcut to compile my document but for the sake of the tutorial I'll probably move my cursor up here and build it by pressing the arrow that looks good we have the function f of x equals the quantity x minus 3 squared plus one half so I'm going to continue typing has domain and now to describe the domain I want to name it with capital D and I'm going to go into Math mode I want a subscript of f because it's the domain of function f colon and the domain for this function is all real numbers now we do have the option of using the symbol for all real numbers but I'm going to use interval notation so our domain goes from we're using it's an open interval so parentheses negative Infinity negative we're just typing the minus key on the calculator for the infinity it's backslash i n f t y That's negative Infinity comma and now I want positive infinity or just Infinity so backslash i n f t y close my parentheses and let's end Math mode and compile that see what it looks like okay now the one thing I would like to change is the D I don't want it to be italicized because it's in math mode letters are always going to be italicized but I can make that not in italics if I come back to my code and I type I basically wrap it with the tag math RM so backs go move your cursor in front of the D backslash math RM and then the curly brackets around the D now when we compile it our D should not be italicized but the F still is because it's outside of those curly brackets so let's finish by describing the range so the function f of x has domain from negative Infinity to Infinity and range so I'm going to do something very similar here I'm going to use a capital R for the range so I'm going to go into Math mode but I don't want the r to be in italics so backslash math RM and in tech maker you can see it's trying to complete the command for me so if I hit enter it'll type the braces for me and I can just type my r r in the center there and use the right arrow to come out of the braces we want the subscript of f colon and now our range goes from one half to infinity and I do want to include the one-half so I'm going to use a square bracket around the one-half to get the one-half I'm using the command for a fraction comma Infinity so backslash i n f t y open parentheses close Math mode now let's typeset that and I have a feeling I'm not going to be happy with the way it looks let's try okay so what I'm not happy about is the square bracket here it's not large enough to surround the fraction one-half so I explained this in an earlier video on delimiters but if we want to expand automatically expand the size of the brackets or braces or parentheses then we can change the command slightly so I'm going to find where those where that bracket is so right here I'm going to put my cursor in front of it and I'm going to type slash left and that is going to expand automatically fit that bracket to the size of what comes after it and then the parentheses on the right I also want to insert my cursor just before it and Taps type slash right so if you use the slash left then you have to balance it somewhere with a slash right the compiler will be looking for that okay so now we can see that both of those delimiters have expanded the other thing I might want to do notice that the one-half is smaller than the three this has shrunk it to fit neatly on a line because it's in line if we wanted that to display at full size we could go back and use the display style command this doesn't bother me I think it looks good the way it is so we'll see how to use the display style in a in another example here in a moment let's move on and look at how we can type a limit and I'm going to go ahead and end this with two backslashes to give myself some more space and to type a limit the basic command in math mode is backslash l i m if I just end Math mode here and compile you can see all we get is Lim and even though we're in math mode these letters are not in italics because the compiler understands that this is a special string of letters now we want to adjust this we want to take the limit of something and we want to take the limit let's say we want to take the limit as X approaches a I'm going to use another command backslash limits and that is going to be followed by I'm trying to get as X approaches a so underscore and then in curly brackets I want to type X and then an arrow and then a so the symbol to get that right arrow is backslash 2 t o a and I'm going to close my curly brackets and now we should see when we compile it the limit as X approaches a okay if I did not use this limits take that out and recompile as X approaches a will not be underneath the Lim it will still be a subscript because we used that underline but it's going to appear to the right which you may want I don't like it like that so I'm going to go ahead and put the backslash limits command in front and now the X approaches a will be underneath the word limit if I want to take the limit and we have to take the limit of something so let's come back and add our function in general let's just call it f of x so we want the limit as X approaches a of f of x if I want to take the left hand limit the limit as X approaches a from the left I just come back to my code and after the a use the carrot you can type a plus if you want to approach from the right hand side if I want to approach from the left hand side I'll type A minus okay let's do one more example with limits we want the limit so backslash Lim and to make the notation look a bit nicer I'm going to use backslash limits underscore and I want again just the limit as X approaches a so in my curly brackets X backslash 2 t o the limit as X approaches a close my curly brackets and this time I'm going to use the definition of derivative at a point so the limit as X approaches a of now I want the fraction f of x minus F of a over x minus a so backslash frac in my numerator that's the first set of curly braces or curly brackets we're going to type f of x minus F of a in the denominator so this goes in the second pair of the curly brackets x minus a and that let's come outside of the brackets there is equal to F Prime of a so F and I'm just hitting the apostrophe for that Prime symbol of a close my math mode Let's compile this and see how it looks all right I forgot to end my line with two backslashes that'll give me a little bit more space in between there now this looks good but the fraction is displaying rather small and that's because it's trying to fit it nicely in with the line but I want to make it look normal size so I'm going to come back to my command and wrap the entire thing with display style backslash display Style curly bracket and then at the very end before the last before I exit Math mode put the closing curly bracket and let's compile this again okay so now the fraction looks much larger same size as the rest of the notation and that line with two backslashes and now let's look at how to type set in integral in math mode we're going to start with backslash int for integral let's take the integral of sine of x now if I just type S i n when I compile that it's going to be italicized I don't want that so for sine cosine tangent all the trig functions we do backslash first so backslash s i n of X and that should give me the integral of sine X now I also need my DX I can type DX just like this close Math mode Let's see what that looks like now notice that the X and the DX are kind of look like they're running together there so what I like to do here is just force a space to be inserted between those because remember just because you type type a space over here in the code doesn't mean it's going to appear as a space when you compile your document but to force a space right there I'm going to hit backslash comma so let's compile that and see if it makes a difference okay good so now there is a space between my X and my DX now if you don't want the d italicized we saw as we did when we were typing domain and range how we can wrap that lowercase D with the backslash math RM tag and it wouldn't be italicized but the italics don't bother me with the DX so I'm going to leave it like that let's go ahead and solve this integral so the integral of sine X DX equals negative cosine X so I'm going to do backslash cosine X now let's talk about spacing for a moment over here I left a space in between or in front of this slash sign that's optional I didn't over here but I did leave a space between the S and the X here otherwise the compiler might get confused and think your command is backslash cos x all is one thing so we want to separate that with a space and let's not forget R plus C very important and we'll compile that and there we go if I want my integral sign to be longer so when you see it in a textbook you see it online usually it doesn't look that short and it's shrunk here to kind of make it fit in that line neatly but we can expand that simply by using display Style so backslash display Style curly bracket and then just before we end math mode put the closing curly bracket and that elongated that integral symbol next let's look at a definite integral so we also start with backslash int that's the command for integral but this time we need to show that we want to take the integral from A to B now I can simply use an underscore and type a carrot B let me close Math mode and see what that looks like okay so that gives me the short integral but it is going from A to B and my lower limit and upper limit of integration appear to the right of the integral symbol we can also use backslash int with the backslash limits command underscore a carrot B and now we have an integral where the A and the B are not to the right of the integral symbol but they're above and below the symbol so you can decide which one of those you prefer if you want the integral symbol elongated simply wrap it with display Style I'm going to just copy those last two commands and we'll see what they look with display Style in front okay so we get logger integrals which sometimes looks nicer let's continue working with our definite integral to talk about some problems you may encounter along the way if you're one of your limits is more than one character then just using the carrot is not going to be sufficient so for example let's say for some reason you wanted to go from 2A to B let's see what happens when we compile this okay that's probably not what you were expecting to see so the what we're going to do to fix this is after the underscore the lower limit you want to wrap that in braces or curly brackets and then we can do the same for the upper limit now if it's just a single character it's not going to be a problem but if you have more than one character you will need to do that so just to be on the safe side you can always use the curly brackets then you shouldn't run into any trouble there so now we have our integral with the lower limit of 2A and the upper limit of B let's go back to Just A and B I'm going to keep the braces okay now I'm moving my cursor in front of the last curly bracket because that goes with the display style command so let's take the integral of something let's take the the integral of x squared DX and remember I want to insert a space just typing a space is not going to insert a space when I compile this so I'm going to use backslash comma DX and we'll compile that make sure it looks good so we have the integral of x squared DX from A to B and that is equal to now there are a couple different notations you might see for evaluating a definite integral I usually use the square brackets around the expression so I'm going to type the square bracket for the left side when we integrate this the antiderivative for x squared is X cubed over three so I could write 1 3 x cubed I'm just going to go ahead and write X cubed over 3 so I want the fraction x cubed over 3. because this is a definite integral we need to input our lower limit and upper limit so let me end with a square bracket and then to get my limits on there I'm going to use the underscore and then lower limit of a carrot upper limit of B so again if it's a single character you don't have to wrap it with the curly brackets but to be on the safe side we can go ahead and do that and just so you're familiar with the notation okay now let's see what we what that looks like because I have a fraction I have a feeling I'm not going to be happy with the brackets okay so the lower limit and upper limit do appear in the correct place in relation to the bracket but the bracket needs to be expanded to the height of the fraction so I'm going to go back where I typed my opening square bracket and in front of that backslash left where I typed my closing square bracket in front of that I type backslash right and we'll compile that and that looks much better and let's go ahead and finish evaluating our integral here so that is equal to backslash fraction B Cubed in the numerator over 3 in the denominator and I need to move my cursor to the right so that I'm outside of that first fraction and now it's minus we plug in our lower limit of a so I need another fraction backslash Frac our numerator is a to the power 3 denominator 3. let's compile that the next thing we're going to look at is summation notation to get the capital Sigma we're going to use the command backslash sum if I compile that it's going to be pretty short so usually that is written much larger than the text beside it so we can make it larger using display style backslash play style curly bracket and we go to the end and put the closing curly bracket if I compile that now you can see the size is much larger we want our sum to go from n equals 1 to Infinity I'm going to use backslash limits so I'm going to use then an underscore and on the bottom I want n equals one that's not a single character so this time I have to use the curly brackets n equals one close the curly brackets use the carrot and now we're going to type our upper bound so this time I want to go to Infinity so in the curly brackets I'm going to type backslash i n f t y and close the brackets let's compile and see what we have there okay so we have the sum from n equals 1 to infinity and let's keep going with that I need to be in front of the last curly bracket because that closes the display Style and we want to take let's see the sum of let's do geometric series a times R to the power n and that is equal to let's go ahead and compile so we can see where we are I'm going to go ahead and expand that sum so that is equal to a plus a times R Plus a times r squared Plus now I want dot dot dot plus my nth term a times R to the power n let's compile and see what we have I have the dot dot dot but the dot dot dot should be centered vertically so that it's kind of aligned with the horizontal crossbar of the plus sign and instead of typing dot dot dot there's a command for the three dots I don't need to insert space between it but just to keep the code nice and clean I will and that command is slash if you just want a single dot it's C Dot if you want the three dots put an S at the end backslash C Dots so when I compile this those three dots should be vertically Centered for our next command we're going to put all of this stuff together and give the definition of a Riemann sum using a definite integral so let's open Math mode and the first thing I want to type is the definite integral of f of x from A to B so we're going to do display Style open curly brackets I'm going to go ahead and end them and end the math mode and then just type in between those brackets so we're starting with an integral so backslash int underscore and then a carrot B my function will just be f of x and then to insert a space here backslash comma DX equals let's compile just make sure we don't have any errors to this point and everything looks the way we expect okay with the integral from a to b f of x DX is equal to now we want the limit as n approaches Infinity so backslash Lim I want to use backslash limits so that the X approaches Infinity part appears underneath the Lim so underscore curly brackets X and then to get the arrow backslash 2 to Infinity backslash i n f t y closing curly brackets so that should say the limit as X goes to Infinity let's compile make sure we're doing everything correctly that looks good let's put my cursor back in front of the last curly bracket because we still want to be working inside of display style now I want the sum as K goes from 1 to n so backslash s-u-m backslash limits underscore and I want k equals 1 on the bottom so in curly brackets k equals one close that carrot on the top I just want n the curly brackets are optional since it's a single character so let's make sure we have our sum displaying correctly good now we want to take the sum of f of x sub K so X underscore K and I don't think I need to expand the parentheses we can see what it looks like when we type set it times Delta X now this is optional but I'm going to go ahead and put the dot to indicate multiplication so backslash C dot that will be a single dot centered vertically and I'm multiplying that by Delta X now to get the Delta symbol for those Greek letters it's backslash and the name of the letter but if I just type all lowercase Delta X I'm going to get the lowercase Greek letter so let's see what happens there okay so I've got my f of x sub K the parentheses look fine I don't need to expand them I've got my DOT and that is not what I wanted to see for Delta X so the Delta symbol the triangle is actually the capital letter in the Greek alphabet so we're just going to go back and instead of lowercase T it's backslash Delta with an uppercase d and pile that again and now I have my Delta X we have one last thing to look at that you might run into in calculus notation and that is vectors so to get the vector symbol it's simply backslash v e c and then in curly brackets what you want to put the symbol over so I'm going to call this vector v ector V is equal to and let's do the IJ notation so we have our first component V sub 1 times Vector I so backslash v e c Vector I plus v sub 2 so V underscore 2 times Vector J so backslash v e c and J in the curly brackets and that is equal to if we want to write this in component form I like to use angular brackets so it would be for the left angular bracket it's backslash l angle and that's going to insert the bracket so now we need our first component V sub 1 comma our second component V sub 2 and then we want the closing bracket the right angular bracket so backslash r angle and that should do it let's close math mode compile and see how that looks and I forgot to put two backslashes earlier to give myself a little more vertical spacing okay that looks good so vector v equals V1 times Vector I plus v sub 2 times Vector J we're in component form just V1 comma V2 in the angular brackets and that concludes this tutorial on calculus notationlatex is a type setting system for creating professional looking documents commonly used in Academia and scientific publishing with the focus on content rather than appearance Michelle crummel is your instructor in this latex course for beginners she is an experienced teacher with multiple mathematics degrees welcome I'm Michelle crummell and in this video I'm going to show you how to get started using latex latex is a document markup language and it's used to create professional looking documents with consistent formatting it's especially useful if you're typesetting mathematical notation so it's great if you're writing a paper that contains mathematics if you're creating tests and quizzes or typing up homework assignments I use it for other things too like creating slide presentations and even writing letters of recommendations it has many many uses as a teacher some of the main reasons I prefer using latex over word processors besides just how professional it the output looks is that latex is cross-platform it's backwards compatible it produces PDF files that are small and can be opened on any device and it's free open source and highly customizable but before you get started creating your own latex documents you have a decision to make do you want to work and store your files online or offline the advantages of working online are that you don't have to download install or update any software onto your computer so you can get started right away you can even work collaboratively in real time using shared documents the advantages of working offline on the other hand are that you have complete control over how you organize and store your files and you don't need an internet connection to work on your files both options work really well it just depends what's going to be best for you so I'm going to start by showing you how to work online because for a beginner that's probably the fastest and easiest way to get started so to work online we're going to use a website called overleaf so you can just do a Google search for overleaf or you can go right to overleaf.com now I already have an account set up so when I went to overleaf.com it automatically logged me in but if this is your first time visiting overleaf you will want to create an account and you can do that using an email address so because I don't have any files created so far in my account this is the screen I'm seeing when I log in once you create at least one Tech file you're going to see a different screen when you first log in and you'll see a list of all of your files but for now we're going to click on create first project and we want a blank project and you're going to have to come up with a name for your project I'm just going to call this tutorial one so when we create a new project in overleaf it's automatically going to populate some code for us this is really really just the basics here and we can see that we have sort of three Windows here on the far left this is going to show us our file structure the name of our Tech file is main.tech and then in the middle here we have the place where we're going to be typing our code and then over on the right we have our PDF output so we can see what our final document is going to look like so just a couple of things to point out here when you make any changes to the code and you want to see what they look like in the output you are going to have to click recompile when you make changes over here it's not going to automatically update on the right you do have to hit recompile and generally if you're not working in overleaf you're not going to get this sort of starter template here you're just going to have an empty slate to work with now if I try and compile right now I'm probably going to get an error because there is no code let's see what happens yeah so it's not giving us just a blank PDF it's actually coming back with an error and saying that it can't compile the code and that is of course because we don't have any code so let's just do some really basic code in here in overleaf and then I'm going to switch over and show you how you can work offline that's my preferred method and that's what I'm going to be using in my future tutorials so to start our document we're going to hit backslash and we want to make sure that we are always using the backslash and not the forward slash so the backslash is starting our Command and then I want document class now as I start typing document class you can see that it's kind of guessing what I'm going to be typing and I can now just click on that to complete the command or I could have just continued typing it out with my keyboard so we have document class then we have a pair of square brackets followed by a pair of curly brackets and we have to type something in these brackets this is part of the code so in the curly brackets at the end we're going to Define what kind of class that we're using and for us it's going to be an article now that doesn't mean we're writing an article like a newspaper article but that is just the name of the class the type of document that we are creating there are other document classes that you can use for example if we had entered Beamer there we would be creating slides almost like a PowerPoint presentation if we typed exam there then we have a different type of class where that I use for creating tests and quizzes but most of the time I use article now the square brackets these are for optional arguments so I could actually delete the square brackets and not use them at all I could even just leave them there blank with nothing inside but here we can type some options so one of the things that we can type in here is the font size so I think the default is 10 point I'm not sure I always use 11 points so now I can't even remember now what the default is but if we want to use 11 Point instead of 10 point or 12 point then we can type that the PT stands for point and that's going to change our font size now if I try compiling right now I have some code here right I suspect I'm still going to get an error yeah I'm still getting error because I haven't really started my document yet there's no real content in here so that's like the bare minimum that you need to declare before you actually begin your document the next thing we're going to type is backslash begin and then in curly brackets document so again it's anticipating what I want I can just hit enter and it will fill in for me or I could have continued to type it out on my keyboard now when I hit enter notice not only did it give me begin document but it also gave me end document so this is a command that comes in a pair it's got a begin and an end if you type backslash begin document and you forget to type backslash end document your file will not compile so it knows when it sees a begin to be looking for a matching end so we want to make sure and do that and it's a good idea to go ahead and just type the ending command and then move your cursor back in between and type the rest of your content so you don't forget and let's do just something really basic like hello and I'm going to compile recompile and see what we get so we do have something now something on the screen you can see that not everything I typed in the code is showing up on the screen the commands aren't going to show up but the text itself is and we can use the color coding to kind of give us an indication of what's what so the text that I typed is colored black whereas the commands the backslash document class backslash begin backslash end those are blue so we can distinguish between them so let's type a little bit more than that this is my first latex document and recompile it's a good idea to compile frequently because if you wait for too long before you compile you may end up with five or six errors and then it's very difficult to go back and figure out exactly where the errors happened you know it ideally you would only want you know one error to deal with at a time so it's it is a good idea to compile frequently and that way you can catch any errors right when they when they happen all right so hello this is my first latex document and you may have noticed if you've been kind of looking at things online that the the word latex is often typeset in a very particular way it's kind of got a special font if you will to make it look a certain way and we can very easily accomplish that here by putting a backslash in front of latex now you do have to spell it exactly how I spelled it with a capital l a lowercase a a capital t a lowercase e and a capital x so let's recompile and see what happens now actually this doesn't look great I mean it's nice that uh the word latex is typeset correctly but there's no space between the X and the word document so to get the space in there I'm going to just put another backslash at the end of that command okay and that fixed that right up now you might be wondering why it's spelled l-a-t-e-x and I keep saying latex and not latex the letter at the end of the word is actually not an X it's actually the Greek letter Chi and the Greek letter Chi sounds more like a k than it does an X it doesn't sound exactly like a k but that's the closest I would say letter in our alphabet to what it sounds like so it's a it's like a hard k sound it's not an X sound at the end a lot of people say latex instead of latex both are correct it's just a matter of preference so there we are which is just a really basic document that we've gotten started here and I do want to do a little bit more with this to explain especially like how line breaks and some very basic format formatting works but I'm going to go ahead and switch over now to working offline and show you how to do that if you have lots of latex files like I do I mean I have thousands and thousands of latex files that I create um I prefer to be able to store them on my hard drive if I'm working an overleaf everything kind of gets let me go ahead and show you before we leave I'm going to hit this up Arrow to go back to kind of this main screen here and if I list all my projects I only have this one that I created tutorial one but as I start creating more projects you're just going to see a long list of files here I like to be able to put things in folders and subfolders and in some cases Sub sub folders and move things around on my computer to store things the way that I want so that's the one downside I personally find with using overleaf is just the file structure and how you store and find things now you can tag your files which does allow you to filter things and make it easier so instead of having a list of 100 files you know maybe you can narrow it down by by tags and that does help a bit so if you do want to work offline you are going to need to install some software on your computer and there are two pieces of software that you need to create latex documents you need a latex distribution and then you need a text editor so the latex distribution is what is going to turn your code into some kind of output file like a PDF file the text editor is just what you use to type the code and there are all kinds of text editors right you can even just use notepad something really basic as a text editor to type your code it's important when you're installing these two pieces of software that you do so in the correct order install the distribution first you need to install your latex distribution first so I get quite a few comments people asking for help and saying you know they're they're trying to compile their first file and it's not working they're getting errors it's really important that you install your distribution first so that's up and running and then install your text editor and try using your text editor okay so what you what are you what should you install where there's lots and lots of options and then your options are going to be different based on whether you are a Windows PC user or a Mac OS user so if you have a Windows computer then my recommendation is to install mictec as your latex distribution you're going to do that first and then to install tech maker as your text editor now mid Tech when you install it does come bundled with its own text editor and you can use that I just don't find it as user friendly as tech maker tech maker is so wonderful for people who are starting out with all of the nice options and and the way that it color codes things and the way that you can create macros I really love techmaker and even though I'm not a beginner I that's still my go-to program for editing latex code if you are a Mac User I'm a Mac User then you want to install Mac Tech for your latex distribution and tech maker for your text editor okay so again please install your distribution first so that's either mctech or Mac Tech and then once that is installed you can install the text editor and all of this is absolutely free to download install and use so here I am in tech maker right so because I'm on a Mac I've got Mac Tech installed as my latex distribution now Mac Tech is not something that you would ever like click on and open it just works in the background the text edit editor is what you're going to interface with so I don't have to worry about Mac Tech or creating a shortcut um you know to it or anything like that you can once you have it installed and it's working you can just completely ignore it but tech maker my text editor is what I'm going to use to create my documents and type my code so right now I'm in techmaker now I this isn't a fresh install so I'm not sure that my screen looks exactly what like what you will see when you first log in it's possible that um that you have see this structure thing turned on here uh I'm just clicking through some of these other right now what I'm seeing looks more like what we saw in overleaf where you've got some um information over here I mean there's nothing here yet because we haven't created anything but some file structure information over here and then in the middle is where we will be typing our code and then over here on the right is where we will be viewing our PDF but to save on some screen space I really don't need to see the structure tag tab so I'm going to turn that off and then my messages log I mean it's I can turn it off it's going to automatically come back up when I compile so it's not that important the PDF viewer I do want to be able to see my PDFs as I work so I will leave that showing now we don't see anything because we we're not actually working in a file at the moment so the first thing we're going to do here is to create a file actually the first thing we should do is look at our preferences and and make sure that we have some good options selected so I'm going to go into tech maker sorry that's just a cut off you can't see that but if you go to your your menu here click on tech maker and preferences and I think it's different on the Mac version if you are on a Windows PC you might have to go to like preferences or options but somewhere in here you should be able to pull up the window that I'm seeing right now so it might be called options or it might be called preferences based on whether you have the Mac version or the windows version okay so what in this first screen for this commands tab you want to make sure that you have this box checked right here PDF viewer we want to embed the PDF that's what's going to allow us to see the PDF on the right and the code on the left so we want to check that box I'm using my built-in viewer to view the PDFs and then you also want to check this box down here launch the clean tool when exiting techmaker that's really useful when you create latex documents and you close your document you're going to see a lot of files that are created in that process you have your Tech file you have your PDF file and you have log files and a bunch of other files and really the only ones that you are going to need are the tech file which is you know your source code and then your PDF your output so just those two files so if you click launch the clean tool it will automatically delete all of those like helper files and make your just your folder structure and navigation so much easier to to deal with if we go to quick build you want to make sure that you've selected PDF latex view PDFs if your intention is to create PDF files under editor you can change some of these options if you like I normally don't have my font size this large but for the purposes of the video I want you to be able to see what I'm typing more clearly so I increased that I usually have it about 16. word wrapping I I recommend that you do keep that on and completion if you like that that's if you start to type a command it's going to suggest what it thinks that you're trying to type so you can just hit enter and then show line numbers is also really helpful because when you get error messages sometimes you can look at the line number and go right to that line number and try and figure out what the error is back up your document every 10 minutes you can turn that on if you like I I don't have any particular reason why I did not have it turned on let's see everything else looks pretty good shortcuts these are just keyboard shortcuts that that you probably don't want to worry about when you're first starting out but you might want to take a look at those as you get more comfortable with this okay so let's create our first document now you do have to actually create a document so I'm going to click on new here or you can use the menu and click on file new now this new document here it says Untitled we haven't saved it yet so I haven't actually created anything and even if I type some code and try and compile it I'm going to get an error message you have to save the file first name it and save it first before you're going to be able to compile it so don't skip that step because that can be frustrating you're wondering why this is not working you actually have to save the die it's not enough just to say I'm here I'm creating a new file you actually have to save it so file let's save this and I'm just going to call this tutorial one tutorial 01 now one thing I want to stress here is that you should never use spaces in your file names for your Tech files don't use spaces if you don't like your words all running together you can do something like a hyphen hyphens are fine if you want to do that you can do an underscore if you want to do that like if you have want to put multiple words in your title I usually do an underscore when I name my files but do not use a space so I'll just keep the underscore in here and the file extension is going to be dot Tech but that's you know that's going to happen by default so I don't really have to type the dot Tech when I am naming that so I'm going to just open up that folder and show you what I've just created okay here we go so this is my file that I just created tutorial01.tech and you can see that there aren't any other files in this folder so let's go ahead and recreate just the basic code that we had when we were using overleaf so backslash document class and I'm going to fill that in I think we had 11 points it's an article and then backslash begin documents and we have our end document and then we said hello this is my first latex document now to compile this we see that we don't have a recompile button like we did in overleaf I'm going to click on this Arrow to compile the code and it used to be I just clicked on this arrow and it would run both of these I'm not sure what my issue is at the moment but it's it's making me click both arrows like over here to compile and then here to view the PDF this isn't generally the way I do it the way I generally do it is to just hit F1 on the keyboard so as I'm working throughout these tutorials if you wonder like how how is it seem to be refreshing so quickly you didn't see me come up here and press on the Arrow it's because I just hit F1 on my keyboard that's a really fast way to do it oh wait I think I do know why that's not working quite right so the PDF latex will compile the code and then view PDF is going to is going to refresh the PDF so we can view it over here but if I want to do both of those things at once what I actually want to select here is quick build so that when I click on this Arrow it's going to do whatever I have saved in quick build and if we go back to our preferences quick build is right here I have PDF latex view PDF in my quick build so when I choose quick build it's going to do both of those two things and then while we're in here I'm going to go ahead and uncheck this backup every 10 minutes and the reason I'm going to uncheck that is because if I leave that on then not only am I going to be creating a tech file and a PDF but I'm also going to be creating a back Bak file and I just don't want to have all of that stuff in my folders it's absolutely not a big deal if you want to leave it on there and have backup files in your folders that is perfectly fine so here's what we have so far hello this is my first latex document and we can fit this to the width so it's a little easier to see we can you know zoom in or outfit it to a full page and so I'm going to continue to work in tech maker but if you are more comfortable working in overleaf you don't want to hassle with trying to get the software installed and up and running that is perfectly okay you can still type the same code that I'm typing and your output should look exactly the same I'm gonna go back to fit width so we have we can see this a little bit better it's not too small on your screen and let's move on so I have you know one line typed here next I want to type a little bit of math so I'm going to say a rectangle it has side lengths of X Plus 1 and X plus three so let me hit return and type that out and because this is in a sentence I know that it would look better if I used parentheses around the X Plus 1 and the X plus 3 so let me do that and let's compile and see how that looks so again you can use the arrows up here I'm just going to hit F1 on my keyboard and this is what we have now this might look okay to you it doesn't look that great to me there's a couple things I want to point out the first thing you might notice if you're used to working with a word processor is that a rectangle has side lengths of X Plus 1 and X plus 3 is not on a new line it just continued at the end of the first line and when we look at the code that's not what we might expect to happen because in in a word processor when you hit return right here then the output actually shows that you hit return right there and that's not going to happen here with our code our code is only going to create a line break if we tell it to create a line break and there are two ways to create line breaks and the same thing is true in a word processor there's two ways to create line breaks you can do a soft return you can do a hard return so a hard return is going to start a new paragraph if I want a hard return what I want to do is to just insert a blank line in between hello this is my first latex document and then the next sentence so if I leave a blank line in between those two sentences then the compiler knows to insert a hard return so let's compile recompile that and now we can see that we did in fact get a hard return so a rectangle has side lengths blah blah that is the second paragraph now that's a hard return if you want a soft return so let me go back here if you want a soft return then at the end of your line where you want the line break you type two backslashes okay so we will compile that and now we can see that we got a a new line for a rectangle has side lengths of however this looks a little bit strange right it looks different than what we saw before because a rectangle is starting further off to the left than hello this is a soft return so it didn't create a new paragraph and therefore the line is not indented so by default I haven't typed much code granted but by default here new paragraphs are going to be indented so the hello is indented a rectangle is not indented because it was just a soft return it's not a new paragraph now you can do something like this but it's it's not preferred what's going to happen if I do this let me turn on my messages log oh it actually didn't mind it okay I was expecting it to not like the combination of the soft and hard return there but it seems to be okay I like having this space in my code because it makes it easier you know for me to go back and find things versus this where everything just kind of runs together but you can decide which one you like better softer turn or a hard return there and you there are also ways that you can turn off the indenting because remember whether you do a softer turn or hard return is going to affect the way that your paragraphs are indented or your lines are indented so let's go ahead and do a hard return right these do seem like they're probably separate paragraphs and we'll update that I'm just using F1 to recompile and there's still an issue here something that's okay but it's not great and that is that the x that I typed doesn't look like math it just looks like the letter X as if I had typed a word with an X in it so when we type variables in math typically we want them to be italicized so they look like variables and that's going to happen automatically as long as we tell the compiler that hey this is math it's not text so we're going to use something called Math mode to enter Math mode you type a dollar sign to start Math mode and then another dollar sign to end Math mode and you can see that the color changed when I did that when I typed that first dollar sign everything after the dollar sign turned green so Math mode things are going to be green and then when you end Math mode everything that's outside of math mode is going to go back to its normal color so the word and is black that's text mode okay so Math mode text mode and I want this X plus 3 to be in math mode as well so I'm going to type dollar signs around the X plus 3 and let's recompile and we can see the difference visually now that X is italicized the spacing is a little nicer because it knows that it's math and it needs to space things in a certain way to make everything look uniform all right I'm going to add some more to this I'm going to add another sentence so we have a rectangle has side lengths of X Plus 1 and X plus three I'm going to say the equation a of x equals x squared plus 4X Plus 3. gives the area of the rectangle so I want you to just anticipate what's going to happen when I compile what do you think this is going to look like so I'm going to hit F1 to compile and I have encountered my first error okay I can see that below here these things are popping up in red something has gone wrong something's wrong on line six and line seven and it's kind of giving me an indication it says missing dollar sign inserted right it didn't actually insert it for me but that is a a clue for me of what went wrong oh I probably forgot a dollar sign somewhere so a of x equals x squared now the letter A the letter X like those could be text so that's not what caused the issue I think it was this symbol right here this carrot symbol is only going to work in math mode it's not going to work as text so I'm going to put my equation in math mode by typing dollar signs around it and now we should be okay so again we see that the paragraphs are indented now that now that the paragraph is long enough to wrap down to another line we can see the way the indenting is working here so things are not great right this is okay it's in math mode the math actually looks good except for the fact that a of x equals is on one line and then the rest of the equation is on another line so that's not great if you want to make sure that to um keep your equation on a line you can put curly brackets around it and now when I recompile it's going to protect that for me so a of x equals x squared plus 4X plus 3 all got pushed down to the next line okay so looking pretty good still like if I I mean I'm still not that happy with it I think there should be some space between the paragraphs right but you know we're just talking about the basics right now so the next thing I want to tell you about is the difference between there's kind of two different math modes there's displayed Math mode and then there's inline Math mode if you use displayed Math mode whatever is in your displayed Math mode is going to be on its own line so we often see this in math textbooks where equations are put on their own line and to enter displayed Math mode all you have to do is type two dollar signs to begin displayed Math mode and then two dollar signs to end displayed math modes let's recompile and now we see that the the math in displayed Math mode got centered on its own line and there's some nice spacing there to separate it from the text and then the text just continues after that it's this is still happening like within a paragraph versus inline Math mode like the X Plus 1 and the X plus three those just appear in line with the text Okay so we've covered some basic information let's go ahead and I'm going to close this and then just show you now what I have in my folder where I created my tech file okay so if we navigate back to the folder where I created and saved my tech file now I see there are actually two files there there's the tech file that ends with DOT Tex and then there's the PDF file so the tech file is our code and here we can just see what that what just the text the code itself looks like there's a little preview of that and then here is the PDF so that's not all fitting on the screen let me make that a little smaller and there we go okay so that is the PDF document that I created check the description below for links to the files I created in this video as well as links to the software that I recommend using in the next tutorial we'll look at how to typeset commonly used mathematical notation using latex hello I'm Michelle crummel and in this video I'm going to show you how to type commonly used mathematical notation in latex I'm working with the software program called tech maker but you can use any text editor that you like if you watched my previous video creating a latex document I showed you how you can use overleaf so that you don't have to download and install any software overleaf runs right in your web browser so there is a link in the description below that you can click on if you want to create an overleaf account and work purely online if you want your screen to match mine exactly you're going to want to download tech maker make sure that you do have mictec or Mac Tech installed before you install techmaker so I am in techmaker right now and I'm going to create a new file so just click on that icon here and it looks like I have you know a new file ready to go it looks like it might be called Untitled one but actually we haven't saved this we haven't really created it yet so before we start typing any code this is very important we need to save this file and name it otherwise guys you could type all kinds of code in here and when you go to compile you're just going to get an error and it's not going to be able to do anything we have to save this file and name it first before we're going to be able to compile it so let's do that file will save as and you can save it anywhere you like on your computer I'm just going to call this one tutorial two and I mentioned in my last video you don't want spaces in your file names your text files should not have any spaces in the file name so use an underscore or a hyphen or simply just you know run all of the words together and that will automatically assign an extension of dot t e x to that file so here's my tutorial O2 Tech file and now I can start typing my code so we always start with backslash document class and tech maker is making this suggestion for me so I can hit enter as a shortcut here and have it fill in some of that for me now the square brackets are where we would Place optional arguments here it's unnecessary if I didn't want that I could delete that and just have the curly brackets we do need the curly brackets here the clasp that we are using today is article so that's fine I can do that if I do want to include some optional arguments one of the more common ones would be to declare the font size so your choices are 10.11 point or 12 point I usually like to go with 11 point and then we're always going to have backslash begin document and backslash end document that pair of commands there so I'm not going to compile yet I don't actually have any content we have to start typing something first we're working on mathematical notation today so I'm just going to go through lots of different categories and then show you how to type various Expressions that you might need so let's start with superscripts so I'm just going to type the word superscripts and now that I have something here when I build we should be able to see that and I'm just going to set this to oops not that um let me just set the width here so that we're seeing the whole page that that looks about good right there okay so superscripts and we want to actually type something with the superscript in it so that was just in text mode and I'm going to type 2x to the power 3. so 2x cubed 2x for the exponent we use that carrot symbol from the keyboard so there's 2x cubed however if I compile this right now I'm going to get an error because this carrot symbol needs to be in math mode not in text mode so to put this in math mode remember we wrap it in dollar signs and now I can build so I'm building by hitting this Arrow up here which is quick building for me so it's doing two things it's compiling the code and producing the PDF that we see over here on the right but I usually prefer to use my keyboard shortcut which is just F1 so if you don't see me come up here and press this button in the video then it's because I just hit F1 on my keyboard if I hit F1 then it will compile so I can tell that the 2x cubed is in math mode because it turned green that's one of the nice features about tech maker that I like it does color code different parts of the code so it's easy to keep track of what you're doing and if we look at a result we've got I mean it's okay superscripts 2x cubed but I would like to separate the 2x cubed from the text and put it on its own line so we're going to do that by using displayed Math mode I'm going to use two dollar symbols at the beginning and the end of that and it puts the math mode on its own line centered on the line like so so next we're going to look at 2x to the power 34. again I'll use this displayed Math mode 2x to the power 34. so think about what that's going to look like the fact that I used double dollar signs means it's going to be placed on a separate line and it'll be centered on that line so I don't have to worry about putting in any kind of manual line break like we practiced in the first tutorial the double dollar signs will automatically start a new line for me so that's fine but if I want 2x to the power 34 what I'm expecting to see is x in the base and 34 in the exponent and if we build this and let me zoom in a little bit more so it's easier for you to see if we build this you can see that the 4 didn't go up into the exponent so by default when you use this Keras symbol only the single digit that comes next is going to be placed in the exponent if you want more than that in the exponent then you have to use curly brackets and you can use the curly brackets even if you only have a single digit but I normally don't bother if it's just a single digit I don't bother putting the curly brackets but now when we compile we can see that the 34 has moved up into the exponent which is what I had intended so another example let's do 2 times x to the power 3x Plus 4. 2 times x to the power 3x plus 4. so if I want 3x plus 4 all to be in the exponent then I need to put curly brackets around that and that looks like I expected it to look and then let's do 2x to the power 3x to the fourth plus 5. so we're going to have an exponent inside of an exponent so 2x to the power curly brackets now generally when I'm doing this I find it quicker and easier if when I type the first curly bracket I go ahead and type the end one as well so that way I don't forget it at the end especially if I'm going to be using multiple curly brackets just makes it less likely that I'm going to forget to close one of my opening brackets and then sometimes I'll even just go ahead and go and do the same thing with my dollar signs and then I can just back up and enter what I need to inside of the brackets so we're going to put 3x to the fourth plus 5. 3x to the power 4 plus 5. so this exponent here I didn't bother to use the curly brackets I could have wrapped the four and curly brackets but since it's just one single digit in the exponent it's unnecessary okay so now we have 3x to the power 4 plus 5 all in the exponent here and now let's move on to subscripts subscripts work in a similar way so let's start with x sub 1 x sub 1 to get the subscript you use the underscore is that what it's called underscore and then whatever you want in your Sub sub script and again it will only put the next single digit into the subscript unless you use curly brackets so here we've got x sub 1 and if I want x sub 12 for example x sub 12 this is not going to work it's still going to just do x sub 1 and then put a 2 right next to that so that's not what we want here we want 12 to be in the subscript so we put curly brackets around the 12. and now we've got 12 in our subscript you can have subscripts inside of subscripts as well so let's just do x sub 1 sub 2. and I think this might cause an error if we just type it like this yes it did cause an error so we have to use curly brackets here so the compiler knows what it is we're trying to do because it's different if you want x sub and then 1 sub 2 versus x sub 1 sub 2. so you have to decide how you're going to put your curly brackets where you're going to put your curly brackets generally I would say x sub and then everything you want in the subscript should go in curly brackets like this now look inside your curly brackets do we need more brackets well since there's just a single digit after the 2 right here is just a single digit after this subscript we should be okay with this and let's see how that looks so that's x sub 1 sub 2 and we could even go further with that if we wanted to do x sub 1 sub 2 Sub 3 like so but we're going to have to figure out our brackets so x sub and then use curly brackets around your entire subscript now within that Curly brackets we have we need more brackets because we've got two subscripts in there so we want to be clear one sub and then we'll put curly brackets around the two sub three so I'm like nesting my subscripts here let's see how that looks so one sub two sub three and you could continue you know to to do this as many times as you need to so let's do one more example let's say we have a sequence and I'm not going to to use the curly bracket notation and let me just list some values so we might have a sub 0 comma a sub 1 comma a sub 2 comma and then I want dot dot I'm not going to type the dot dot dot there is a latex command for that backslash L dots is going to do three dots the L is for lower they're going to be aligned at the bottom like lower aligned versus C Dots would be aligned in the center but l-dots will work for me fine right here and then we'll say a sub 100. now with 100 again I'm not going to type it like this or it's only going to be a sub 1 and then two zeros next to it that's not what we want we want 100 to be in the subscript so we need curly brackets there there we go so a Sub 0 a sub 1 a sub 2 dot dot a sub 100. next let's look at some Greek letters we often use Greek letters in math notation and one of the most popular Greek letters that we use is the Greek letter Pi if you want to type Pi it's just backslash pi now that is the lowercase Pi if I wanted the capital Greek letter Pi backslash capital p i like so and that's the capital Pi if we want other Greek letters we can just type the name if you use a capital letter it's going to give you a a capital Greek letter if you use lowercase it's going to give you the lower case Greek letter for example we can do backslash Alpha and that's going to give us the lowercase Greek letter Alpha so you get the idea there and we might do something like a equals pi r squared right area of a circle so backslash Pi now it's important here that I enter a space and then do my r squared otherwise if I don't have the space there let me take out the space and show you that because it's all running together the compiler sees the command as backslash PIR th backslash PIR is not a valid latex command so it's going to get confused and we're going to get an error I'm pretty sure we're going to get an error let's try yep we're going to get an error and you can kind of see it's giving me a hint here of what what the error is it's something like that PIR see how to put a space between your command and the next thing and now it should be fine there we go area equals pi r squared right here okay so those are Greek letters there's you can do many other Greek letters I'm just showing you an example of a few let's talk about some trig functions if we want to enter for example y equals sine of x y equals you're going to use a first let me do it the wrong way because beginners might be beginner students often will just type this and they might not even think there's anything wrong with the way that looks right I mean you can read it it says y equals sign X but it is not displaying the way we would like our mathematical notation displayed the compiler because you're in math mode here thinks that the S is a variable the I is a variable the N is a variable and the x is a variable and so it's typesetting them all the same way and you can see it looks very uniform the way these letters have been typeset they're all italicized and spaced kind of the same way and they're all running together that's not how we want the sine of x to look so we put a backslash in front of our trig function sine cosine tangent secant cosecant cotangent and now when I compile you can see the difference the s-i-n is not italicized and there's a little bit of a space between the n and the X okay so this is how it's supposed to look we can do that for our other trig functions like I said y equals cosine X tangent X is t a n backslash t a n if we want to do the reciprocal trig functions y equals unless you do cosecant is CSC secant would be s e c cotangent would be c o t and instead of X let's just do theta so Theta is one of our Greek letters we're going to do backslash and then type out Theta I want a lowercase Theta here we've got y equals cosecant Theta and you can play around with it and see you know what happens if you did a capital Theta well we would get the Greek Capital Theta but that's not what we normally use for angles we use the lowercase there we go so you don't want to forget when you're doing your trig functions sine cosine tangent secant cosecant cotangent to put the backslash in front and the space between the trig command and then the argument or the angle we can do inverse trig functions as well so let's do sine inverse of negative one y equals sine inverse so backslash sine and then for inverse that we're going to use the notation where it puts a negative 1 as a subscript so remember how we did subscripts it's the carrot I want negative 1 in the subscript so I can't just do this that's not going to work that's only going to put the negative symbol in the exponent the one will not be in the exponent if I do that so I have to use curly brackets negative 1 like so and then of X or Theta or whatever we happen to be using oh I did say sine inverse of negative 1 didn't I although that's that's a little confusing because we would have negative one in two different places but if I wanted the sine inverse of one half for example we haven't done fractions yet we're about to do fractions let's keep it simple sine inverse of 1. there we go could do that or Theta or X or whatever we need there okay so that's sine inverse now we could also use the arc sine notation instead of using that negative one superscript we can just do y equals arc sine and it again is backslash and then you tarp type arc sine Arc s i n and then your angle okay so by putting the backslash in front of the arc sign it's indicating to the compiler hey these are not variables don't typeset them like variables so it looks like it's supposed to look here okay uh let's do log functions next and we will start with just a common log y equals log X now again think about what's going to happen if I compile this right now I'm in math mode it sees the Y the L the O the G the X thinks those are all variables so it's going to look funny I mean you can understand what it's supposed to be right but I do see beginning students doing this a lot in their papers and forgetting to put the backslash in front of the log use the backslash and then you need a space between the G and whatever comes next and then it will typeset this correctly so only the variables X and Y are italicized and the rest of the equation is not so there's the our common log y equals log of x let's change the base in our log so if we want log backslash log oh that's supposed to be equal y equals backslash log if we want base 5 for example we need a subscript so remember how we did subscripts it's the underscore five and then I'm going to type a space it's not strictly necessary because if I don't use curly brackets it will only subscript this the next digit but just to be clear I like to always put a space there like that so this log oh what did I do wrong oh I'm missing a dollar sign double dollar signs okay log base 5 of X and then let's do a natural log y equals backslash Ln Space X that's going to give us a natural log next let's talk about square roots and not necessarily square roots let's just say roots in general because we can see how to do cube roots or fifth roots or seventh roots so we'll just say roots in general we'll start simple square root of 2. so do a square root we're going to hit backslash s q r and tech maker is making two suggestions for me here so we can see it's backslash sqrt and then we have an option where there's square brackets curly brackets or we have an option where it's just curly brackets if you're just doing the square root of two you don't want the square brackets you just want the curly brackets so sqrt curly bracket two curly bracket like so and that's going to give us the square root of 2. the other option is for when you want roots that are not square roots so let's do the cube root of two you're still going to type backslash sqrt so it's like you're starting the square root command even if it's not a square root but then you're choosing the one that has the square brackets followed by the curly bracket so I can hit enter here to accept that and then start typing or I could just keep typing it manually so here the square brackets are for the root if I want a cube root then I type A 3. the curly brackets are for what goes inside of that radical symbol so we want the cube root of 2 it's going to look like so cube root of 2. now this one down here is my page number it's bugging me a little bit so I'm going to go ahead and turn off the page numbers and to do that I'm going to scroll back up and I am going to after document class I'm going to type backslash page Style curly brackets empty I think that'll take care of that so let me recompile and then yep our page number is gone so I'm turning that off just so that's not in our way okay back to more Roots let's do something more a little slightly more complicated like square root of x squared plus y squared so backslash square root x squared plus y squared okay looks good and now let's get um a little more complicated and put a square root inside of a square root so the square root of 1 plus square root of x so we'll start with the outside root the square root okay the square root of now once you start putting things inside of other things it can get a little bit confusing so what I will sometimes do is just insert some Extra Spaces just so it's easy for me to tell what's inside of what because it's got a little cushion around it so this is my like my outside square root my big square root and inside of the square root I'm going to put 1 plus the square root of x so 1 plus backslash square root of x like so and compile and we've got one plus or the square root of 1 plus square root of x all right and then finally let's look at fractions so we'll do start with something really simple we'll just do the fraction two-thirds so the command is backslash Frac for fractions and you can see that tech maker is is prompting me I can hit enter to accept that and this is in general what it looks like when you want to make a fraction or if I'm typing it manually if I'm typing it manually I usually still do kind of a template thing so I'll do curly brackets for the numerator and then curly brackets for the denominator and then I'll just use my cursor and go back in uh and that way I don't forget to close my bracket so you have a pair of curly brackets for the numerator and then the next pair of curly brackets for the denominator so in the numerator is 2 and in the denominator we want three so this should give me the fraction two-thirds okay that looks good now I'm going to next I'm going to type this in a sentence so let's just say about and because I'm typing this in a sentence I'm not going to use double dollar signs I'm going to use single dollar signs because I want this to be inline Math mode so my fraction two thirds and I did that more quickly using my keyboard because let me do that one more time and explain backslash okay so here I just hit enter Because tech maker is going to populate that for me and notice it automatically highlighted the numerator so I type 2 and then I can hit tab on my keyboard and then type the three so it goes pretty quick once you get the hang of it like that rather than just typing it manually so about two-thirds of the glass is full and there's that sentence so the two-thirds it's it's smaller obviously in this sentence than the two-thirds up here when you're in inline Math mode it's going to resize to to fit your sentence right you don't want this huge two-thirds but sometimes like if you're writing a homework problem quiz it worksheet something like that sometimes your fraction is too small in the sentence here and you do want to make it larger so easy way to do that is instead of backslash Frack use backslash defrac The D is going to put it in displayed Math mode defrac so now when I compile it it's going to be oh it didn't like that oh I may need a package in order to use that okay let me try this let me try this a different way because I haven't talked about packages yet but packages we will be using packages soon another way to get into displayed Math mode is to type backslash display Style let's try that there we go so now it made the two-thirds bigger same size as it made it up here when you use double dollar signs you're all you're automatically in displayed Math mode and so everything is large like this if you just do the slash Frac in inline math mode it's going to be small so this looks kind of silly the two-thirds is is really big compared to the rest of the sentence I don't like that so I'm gonna well I'll leave it in here just for tutorial purposes let's maybe copy that one more time and take it out take out the display Style so you can see a comparison now because I'm not using double dollar signs it's not automatically creating a new line so here's where we have to decide how we're going to break that line do we want to do a double backslash like that which will break the line you can see I I'm sort of running into an issue here because the lines are not far enough apart I can manually add some vertical spacing using square brackets and then inside the square brackets tell how much space I want so six and then you can use any unit of measurement here you can use centimeters six centimeters would obviously be way too big I usually use PT Point like Point size so give me six points of space at the end of this sentence and then when we compile you see it just it inserted some vertical space there for me your other option if you don't want to break the line that way would be to leave an empty line in between and that would also create a line break we talked about this in the last tutorial though notice it looks odd because this new line right here is starting a new paragraph and it's indented versus this line up here did not this this line up here is not indented so that's why it looks a bit funny there so I usually and it's just it just depends on what you need but I usually do something like this when I want line breaks and generally I if I want displayed um fractions display style fractions rather than typing out display style I just do backslash defrag but I did get an error when I tried that a moment ago let's try it again not that I'm expecting anything different two-thirds and I just have to figure out which package I need to use in order to get that to work properly so I'm going to go back up to the top and really quickly just figure this out use package and let's go with um AMS math I'm gonna I'm gonna use a couple packages here because I don't want to do them one at a time and try and figure this out AMS math AMS Sim and AMS fonts okay one of those worked because now it did compile correctly and oh that was unnecessary because I had double dollar signs so let me try that one more time because the double dollar signs automatically put it in displayed Math mode so it's kind of redundant that I used defrak inside of Double dollar signs it's not necessary to do that let's just try this again and verify that we are getting a large fraction here when we use defrac yep and I needed a line break there Okay so uh you can accomplish the same thing this way and this way let's try a more complicated fraction so I'm going to do a line break here again um now go ahead and put it in double dollar signs so this isn't technically necessary let's do this uh let's do a square root inside of our fraction so let's do the square root of X Plus 1 over the square root of X Plus 2. so we'll start with fraction fraction like so in the numerator we want the square root of x plus one so backslash square root like so X plus one that's my numerator then here is my denominator so we're going to do square root X Plus 2. and then close our dollar signs and there we go so I did use you know tech maker to my advantage there I wasn't typing it all out manually if I wanted let's try that one more time if I were typing it out manually backslash Frac your curly bracket then slash square root you have to open another curly bracket so at this time you have to kind of mentally keep track that you have two curly brackets open and eventually you need to close the two curly brackets so X plus one close it for the square root close it for the numerator then we open curly brackets for the denominator backslash square root open curly bracket for the square root X plus two close the square root close the denominator and then close Math mode there we go now sometimes we work with complex fractions where you have a fraction inside of a fraction so let's try that so outside fraction and Let's do let's do one over so just one in the numerator that's it and then in the denominator let's do one plus one over X so 1 plus now I need a fraction so backslash frac 1 over X like so 1 over 1 plus 1 over X and you can of course have fractions inside of fractions inside of fractions you just want to pay attention to your brackets make sure that they're paired and like I showed you a moment ago sometimes it is helpful to space things out so my um denominator here had a bunch of stuff in it you might find it's helpful to kind of leave lots of space in the curly brackets for the denominator so that if you do get a compiling error you can go back and see that's probably where it would have occurred because that you've got you know complicated things inside of other things can be helpful as well that wraps up this tutorial on common math notation I do have another tutorial on calculus notation which will be much more involved there's lots of notation that we use in calculus that we need to use latex 4 because you can't type a lot of the calculus notation using your keyboard but in the next tutorial before we do that the next tutorial we're going to look at brackets tables and arrays so brackets include things like parentheses and square brackets and curly brackets and absolute value symbols we're going to see how to make those things expand in size because if you just type parentheses let me show you real quick right here around this it's going to look really bad well actually it doesn't look too terrible but the 1 over X here is longer vertically than the parentheses so we're going to see how you can fix that make your parentheses taller so that they do wrap around the content inside of the parentheses and then we will look at tables we'll do simple table we'll do a slightly more complex table and then we'll look at some arrays hello I'm Michelle cremolin in this video we are going to look at how to type set brackets tables and arrays using latex I'm working in tech maker but you can work in any text editor that you like or you can work online in overleaf and there are links in the description below to register for an overleaf account if you want to just work in your web browser so we have lots of different type of bracketing symbols when we use math notation but probably the most popular would be parentheses square brackets and curly brackets so let's start there if you have a short object then you don't need to do anything special for parentheses let's say for example the distributive property states that a times and notice I did use a dollar symbol to enter Math mode a times B plus c equals a times B plus a times C for all a b c i can get fancy here with my notation if I want I can use the element symbol or the backslash in and then if I want to say the set of real numbers then there's a special way to type that symbol as well backslash math BB curly brackets and then for the set of all real numbers I need a capital R now I think I'm going to have to load a special package to make this work let's see if I get a compiling error I do okay so let's come back up here in my Preamble everything before begin document it's called The Preamble and I'm going to use a package let's see AMS fonts AMS Sim AMS math I always load those three packages right off the bat so to be honest with you I don't even remember which one of the three I need it's only one of those three that I need to make this mathbv command work I'm just so in the habit of using all three packages all the time so don't remember which one does what that worked and we can see the result here the distributive property States and so here we have this in math mode a times B plus C the parentheses look good they are sized appropriately for what's inside equals a B plus AC for all a b and c in the set of real numbers now square brackets work in a similar way you can just type them using your keyboard so let's use a line break here there's a couple ways to do a line break I like to do the double backslash and then insert a little bit of extra space there are lots of other ways to get spacing between your lines things that you can do in your Preamble so that you don't have to do this every single time you can change the line spacing throughout your whole document but that's a little more complicated and we're trying to keep things really simple for right now so I'm just going to to do that and next we'll say the equivalence class of a I'm putting a in math mode is and then we'll use square brackets around the a there and I will typeset that so I'm just using F1 on my keyboard because that's a keyboard shortcut for tech maker to compile otherwise I could also come up here and click this Arrow okay so the equivalence class of a is a and you can see the square brackets appear as expected a is just a normal sized element so the brackets don't need to be larger smaller they're sized appropriately okay this does look a little weird though because the first sentence is indented and the second one is not this double backslash creates a soft return it doesn't start a new paragraph and so this um sentence that I have here is not considered a new paragraph and it is not indented I'm not in the habit of worrying about that because I almost always turn off indenting in my documents so I'm going to come back up into the Preamble it's the area before begin document I'm going to type slash pair indent is going to change the the rules for paragraph indenting I'm going to say 0px so indent my paragraphs by zero pixels in other words don't indent my paragraphs and then I'll recompile and you can see that none of my lines are indented that's just my preference the way that I like to work you certainly don't have to do that now let's take a look at curly brackets so parentheses easy you just type them on your keyboard square brackets easy just type them on your keyboard curly brackets not quite so easy say the sets a is defined to be and then we'll just call a the set of the numbers one two three so curly bracket one two one two three curly bracket close Math mode and then compile oh what did I do wrong here forgot my square brackets in front let's try that again okay now I didn't get the result I expected because I typed curly brackets around this set but the curly brackets didn't show up on my PDF and that's because the curly bracket is a symbol that is reserved for part of the coding in latex that is a special symbol that tells the compiler something and so you can't just type a curly bracket and get it to show up you have to do something different if you want the curly bracket to show up you type a backslash in front of it and that's true for this opening curly bracket and also the closing curly bracket you put a backslash in front of it and now when we compile the symbols will show in the PDF so the compiler knows that this is not um the coding curly bracket is actually one that needs to be displayed now another symbol that is reserved for special syntax in latex is the dollar symbol and we've seen that many times so far the dollar sign is used to indicate that we're starting Math mode but sometimes you might want to display a dollar sign right if we're talking about money so for example the movie tickets costs 11 and 50 cents okay so right away I know that I have a problem here because this has turned green this has turned green so the compiler thinks that I'm I've opened Math mode and I have not closed Math mode well I can close it here and that's a little better we're back to normal down here but now clearly the dollar sign this dollar sign is not going to be displayed because this is just telling me that I'm in math mode so let's compile that and I don't see the dollar sign so if you want to see a dollar sign well first of all if we type in extra one inside Math mode we're going to have issues you that confuses the compiler so if you want to display the dollar sign you just type A backslash in front of it same with the curly bracket and now when we compile it knows oh this dollar sign is meant to be displayed and so it will print it on our PDF and we've got 11.50 now sometimes you want to put brackets whether they're parentheses or square brackets or curly brackets or absolute value symbols or some other symbol's greatest integer symbols that type of thing sometimes you want to put those around notation that is much bigger taller so let me show you what I mean by that and here I'll just do I'm just going to do a hard return here and let's type this fraction I'm going to do double dollar signs to get give me displayed Math mode so it's going to put this math on its own line Center it on the page and I'm going to type a fraction so my fraction is going to be 1 over x squared minus 1. here's my fraction 1 over x squared minus 1. let's say I want to put parentheses around that I don't know why maybe there's a two in front of it yeah let's do that okay that looks pretty bad the parentheses are not tall enough they're not surrounding the information inside of the parentheses now if I wasn't in displayed Math mode it would be a little better so instead of double dollar signs let me go back to single dollar signs and show you it's a little bit better it's still not perfect the parentheses still don't seem to be tall enough to cover what's inside of them so it's not just because I'm in displayed Math mode that that's an issue but it's more pronounced when you're in displayed Math mode how can we fix that well we can make the parentheses automatically change in size to fit whatever's inside of them by typing go to your your parentheses where they start so your left parenthesis I think is the singular of parentheses go to your left parenthesis and type backslash left in front of it and then go to the right parenthesis and type backslash right in front of that one and now let's compile that and you can see that they've automatically expanded to an appropriate size that looks much better so this works with lots of different bracketing symbols I'm just going to copy this a couple of times and we're going to change the parentheses to square brackets square bracket square brackets and curly bracket now remember to get the curly bracket to show up you have to put a backslash in front of it and compile and there we go so we've automatically expanded the size of our brackets in these three examples if you're working with vectors you might even want an angular bracket so let me delete I'm just going to space this out a bit um if we want parentheses we would type parentheses like this let's go back to parentheses okay that's normal parentheses but if you want an angular bracket instead of parentheses you're going to type backslash L angle so left angle and then over here instead of parentheses you're going to type slash R angle slash R angle for right angle and then when we compile that you get your angular brackets you might also need to do this for an absolute value expression so instead of this left angular bracket we can just use on the keyboard type the I think it's called a pipe but it's right above the return key or the enter key to get your absolute value symbol to expand so backslash left backslash right is going to expand the size of those brackets now there might be a case where you just need a bracket to show up on one side not the other an example of this could be in calculus if we have something like d y d x at x equals one we could use a notation so let me start with a fraction for the dydx to backslash frac d y d x and now I want dydx at x equals one or when x equals one so normally the way we write that is we would do a vertical bar and then a subscript so here's a subscript of x equals one now if I just type x equals one only the x is going to be in the subscript so I need to put curly brackets around my x equals 1 if I want that all in the subscript let's see how that looks so I'm almost there but that vertical bar that pipe symbol it's not tall enough I want it to expand so let's try that trick where we type A backslash left or backslash right in front of it let's do slash right to get it to be larger now when I try and compile this I'm going to get an error because when you use a slash write command you have to have a matching slash left and vice versa so when you do slash left you need a slash right but I don't want a symbol to show up on the left we can get around that though I'm going to go ahead and type the slash left and then in order to tell it to not display a symbol I'm just going to use a period just type a period on your keyboard and it won't display that so now the notation looks proper so hopefully that covers all of the the types of bracketing symbols that you need and you can certainly have bracket like brackets around something that's inside of something else so you could have multiple pairs of brackets all in sort of one expression for example let's let's kind of build off of well let's do a fraction we'll do a complex fraction so fraction we'll do one over one plus X to start with and let's say we want um to put parentheses around that so we'll do slash left and then the left parenthesis slash right and the right parenthesis compile that so that looks good and I'm going to put a One Plus in front of this okay so there we are now now I want to make this all the denominator of another fraction so it'll be one over one plus one over one plus X okay so this whole thing that I've typed right here I want to be in the denominator of a fraction so I'm going to put curly brackets around it that's the curly brackets for my denominator in front of that I'll do another pair of curly brackets for the numerator and the numerator is just going to be one and in front of that I need my fraction command let's compile that so there we go and notice that the parentheses are adjusting in size to fit like the container what's inside now let's say I want to put big parentheses around all of that so in front I'll do a slash left oh I'm in the wrong place sorry go to the very front there we are slash left parentheses and then go to the very end here slash right parentheses compile now you can see those parentheses are really big so they are automatically going to adjust to the content inside of the parentheses okay let's move on and talk about tables I'll just give myself some space here and we will look at tables we'll start with a very simple table and then we'll add some more components to it so first of all to start my table it's backslash begin curly brackets tabular actually I'm gonna yeah hit enter and let it kind of finish that out for me so with the begin tabular you'll have an end tabular and notice that we have an extra pair of curly brackets after begin tabular so here you have to establish like how many columns you want in your table let's say we're going to make a table with X values of one two three four five so we need six columns in our table six columns in our table I can type c c c c c I typed a c six times each one of those C's represents a column so this is going to be a table with six columns now the reason I typed C was not C doesn't stand for column C stands for centered because your the text or the whatever it is you're putting in the cell of your table it can be Center aligned left aligned or right aligned so right like normally I would say probably your mathematical tables your values are going to be centered in the table cell so I normally use seeds if I wanted items in my cells to be left aligned I could use else that would give me a table with six columns if I wanted the content to be right aligned I would use ours you can also do any kind of combination you identify for each column if you want the content to be aligned left Center or right let's go back to Center aligned and then we have to type some content for our table so I'm going to type this is what I want in my table x one two three four five so this is not going to work right now if I compile oh it actually did give me something but it's not a table this is just one this is all in one column right now all in one column the way that you separate items into columns is with the ampersand so now if I compile X is in the First Column and then right now one two three four five is in the second column so we want to go through here and put an ampersand in between like so okay now we have a table with six columns which is what I wanted I guess it would be easier to see you just kind of have to trust me right now how many columns I have it would be easier to see if we had you know lines separating so I should have done that let me go back and show you how to do that if you want vertical lines like in between your table columns then you come back up here and you use that pipe symbol on your keyboard it's above the return key or the enter key and put that in between each one of these like so let's recompile and we get those vertical bars so now I can see how many columns I had so let me take out my ampersands let me go back to what it was one two three four like that and you can see that it was all smushed into one cell which is not what we wanted so you need to use the ampersands to separate the the content into your different columns now when you get to the end of your first row you hit two backslashes to indicate that that is the end of the row okay so here we are then you can do your next line so the next line let's say we want f of x and and then whatever our f of x values are we'll just do 11 . 10 11 12. 13. 14 and we'll end that line okay that's all right now the X and the f of x they don't look like math they're in text mode they're not in math mode so let's fix that put dollar symbols dollar signs around the X and around the f of x all right that looks much better now we're missing the lines that separate our rows right so in order to get a horizontal line we're going to type backslash H line I will compile that and it gives me a horizontal line so I did that at the end of the first row and I'm going to do that again at the end of the second row now I need to do that above my first row okay and there is a basic table sometimes I like to after the First Column put a double pipe here to separate the label x f of x from the values in the table like so so we can do that so that is a very basic table right there let me copy that and let's say that instead of 10 for f of 1 we had a fraction here so we'll do we'll do math mode slash Frac and we'll just use the fraction one half oh let's let's put let's separate these tables a little better so I'm going to insert some vertical space here slash V Space and then I can decide how much vertical space I'm going to put one centimeter of space right there to separate those tables and I'm going to turn off my page numbering as well so I'm going to go all the way back up to the top slash page Style empty compile and that turned off my page numbers okay so there are my tables let me scroll back down here so I'm working with that's the copy of my first table right here we changed F of one to equal one-half and you can see that the one half because it is taller than these other values is sort of touching the the top and the bottom of the row border we want to give this a little more space and so let me show you how you can add a little more to this table instead of starting with begin tabular we're actually going to start with Slash begin table now if I hit enter it's going to put my end table right here I need the end table to go after the end tabular it's like a sandwich right we've got begin table begin tabular and then at the end we have end tabular end table okay so I mean that hasn't changed anything yet let me recompile we're still in good shape actually I lost my second table I think that begin table requires a package hang on let me do full page I wasn't expecting that to have oh okay here's the second table up here yes so this is the frustrating thing about working with tables in a word processor when you enter a table you're very specific about where you want that table to appear it's wherever you type it wherever you enter it that's where it's going to be displayed right in a word processor not so here here when you enter a table the compiler is going to decide where it thinks that table will fit best on your page so you can see what happened to us here and the second table is the one that had the fraction one half for f of one so that's this table at the top here it it got moved up to the top of the page that's not where I want it I want it down here at the bottom of the page and normally you're particular about where you want your table to go if you're creating a a long paper you might not matter so much whether it's you know on the page before or on the next page or at the top of the page or at the bottom of the page like you might be fine with giving the compiler the flexibility to decide where it thinks the table will fit best there is a way that you can tell it no no no I want it to appear right here in the code where I've entered it and all we need to do for that is square brackets and a capital H so let me recompile and I think I need the flow package for this let me go back up to the top backslash use package float yes I did we'll talk about packages more in another tutorial but for certain commands in latex you need to load a package before the command is going to work so in order to use this right here we need to load the float package all right so now we're good to go let me make this larger again there's our second table and we were talking about the spacing issue I want to add more space in there so in between begin table and begin tabular I'm going to type backslash def that's going to define something new and then backslash array stretch and then in curly brackets you're going to type a number and the number that you type is going to determine how much extra spacing you have I usually go with 1.2 so let's compile that and see how that looks so just added a little bit of space right you can make that bigger make like sometimes I'll go up to 1.8 go with 2 and see what happens okay so if you go with two then you get that's too much space like now it's starting to look a little bit weird maybe we'll we'll split the difference we'll go like 1.5 all right that looks pretty good it's not perfect like there's more space at the top than the bottom so you can play around with that if you don't like exactly how it looks but that's an easy way to get some extra padding if you will in your table cells the other thing we can do by starting our table with begin table in addition to the begin tabular is we can now add a caption to our table and you can add the caption above your table or you can add the caption below your table let's add it below and so after the in between the end tabular and the end table I'm going to type slash caption and then you can enter your caption so I don't know what we want to say these values represent the function f of x and we'll compile that and yeah that looks a little weird because let me go back full page the caption looks like it's being centered whereas the table is not being centered so that is a bit strange if I want my table centered then again in between begin table and Define and begin tabular I can do backslash centering and that will Center the table I normally Center my tables so I wasn't expecting that issue I'm not used to that popping up especially when I'm captioning things I'm just I like normally in my workflow I Center my tables so I'm sure there is a way to get the caption to go to the left you can force things to be flushed left if they're not automatically that way um but it's easy it's an easy fix if you just want everything settled centered and there we go now there are a lot of other things you can do to create more complex tables um I don't want to spend too much time but there are some instances where you might want um what's it called where you have like uh something that spans over two table columns I know there's a word for that I can't think of it off top of my head but you can do something oh oh merging cells I think is what it's called in like in the spreadsheet program where you can merge cells together so you can do things like that as well with tables you can also sometimes you might want to have a sentence in a table cell that sounds that sounds kind of weird but I I could think of of an instance let's just do one real quick I'm going to copy this table so here's a copy of that table which didn't fit on page one so it got pushed down to page two we'll make this a little bit bigger and um let's do something where we have just like two columns in our table and I'm gonna put text in here so we might want to set centered we might want it flush left we'll see how it goes I'm doing this off the top of my head and we'll only have two columns so it needs to look something more like this okay and we're going to say at the top f of x and then in the second column at the top we'll do F Prime of x and here we'll say x greater than zero and here we'll say function f of x is increasing so let's see what that looks like so this is a different kind of table is just doesn't have just numeric values in it it looks a little bit odd let's change the caption too so this makes a little more sense we'll say the relationship between f and F Prime okay and we could if we want to this time move the caption to the top and notice that that automatically numbered the tables I didn't point that that out either it didn't happen with this table because with this really simple table we just used begin tabular end tabular with these next two tables we started with begin table before we did the begin tabular and that gave us all these extra options and one of them is that it will number your tables as you go so I didn't type table one that was this table right here I did not type table one anywhere it just knows that that is the first table in this begin table sequence and then this next one when I began a new table now it knows oh that's table number two so it is numbering that for me which is nice okay um what I wanted to show you though was how you can deal with long sentences in your table so I'm going to copy this sentence a couple of times which isn't very realistic but let's just say like you had a lot of text to put in your table salt okay then this happens let me make this okay this looks horrible right the table got cut off because the the content inside of this one cell is so long it doesn't fit and so it ran off the page which is definitely not good we don't want that so an option if you're trying to type text like long text in a table instead of using a c here and let's go ahead and change these to L's anyway first just to show you that when I do that now in my table this became left Justified instead of centered all of this became left just Justified but what I can do with this instead this second column because I know that it has to accommodate such long text is to put a p and the P stands for paragraph So it's indicating that there's we want this cell to contain a paragraph and then in curly brackets you indicate how wide you want that paragraph to be so maybe we want it to be two centimeters you can use inches you can use other measurements that you want okay so now at least it fits on the page it still looks a little funky right but you can change this we could even go with two inches three inches you can adjust it to fit your needs and you can do that for each column so if you have multiple columns with a lot of text in it you can do that all right that's the basics of working with tables there are a lot of other ways to customize tables you can do shading you can do all sorts of things but this will get you through most of what you need to do with tables we're going to wrap up this video today by talking about equation arrays and so the easiest way I have found to create arrays is with the Align command now there is also an equation array command and by that I mean you can do backslash begin EQ n you can see right here begin equation array you can do it this way and I used to do it this way but now I have a different way that I prefer to do it so I'm going to do slap let me first of all just say put a little header here arrays and we're going to do backslash begin a line now we have two options here we've got a regular a line and then we have an align with an asterisks asterisk after it let's go with the regular one first and then I'll explain what the S drisk does okay so begin a line and we have to put some kind of content in here so let's use this to solve an equation 5X squared now notice when I type started typing this is in green and green indicates that we're in math mode but I didn't type a dollar sign when you're inside of the Align environment you are automatically in math mode so if I start typing text now see the text is still green that text is actually in math mode let me compile and show you right this this looks really wonky everything in a line is in math mode so if you actually want text you have to have some way to tell it wait wait I don't want this to be Math mode and you can do that with backslash text and then just type your text let me change the text um place your words here oops curly bracket let's compile that so now it knows that that's text and we still have a lot like a spacing issue here in math mode this hasn't come up yet but in math mode the compiler ignores spaces like after the between the five and the X here I can type as many spaces as I want they're not going to appear on the document when I compile it the 5 and the x squared are still right next to each other so in math mode spaces get ignored and that's why this space is being ignored so the p in this word is right next to the two if you need a space there's a couple things we can do in the text mode we can just type a space and that'll take care of that so that worked or in math mode if you need to force a space that will be displayed you do backslash comma so either one of those methods will work okay but that's not actually what we're trying to do here so let me take that out 5x squared we're going to solve an equation 5x squared minus 9 equals X Plus 3. so what I want to do next is subtract the X on both sides subtract the 3 on both sides and then write the result okay so I need to end this line with a double backslash and on the next line type what I want next 5x squared minus X minus 12. oh equals zero right equals zero okay so that's all right notice that I've got my equations on their own lines and the equations are being numbered so I didn't have to tell it this is line number one this is line number two it's going to number them and if I create another a line just duplicate this one and compile it it continues numbering from where it left off before which is really nice in a math paper because your equations are all numbered and then when you're talking about them in your paragraphs you can refer to them by number you can say in equation four blah blah blah so that is that is nice there what I don't like about what I'm seeing though is that the equations are not aligned at the equal sign it's much easier for the reader to follow the mathematics when you're solving an equation or simplifying things you're going step by step if you line up your equal signs that's the proper way to do it so in order to line up the equal signs you just have to put an ampersand in front of them now if you only do it on the one and not the other it doesn't know what it's supposed to be lining up so that's not going to work it's going to be funky but if you put the Align in front of both equal signs it knows to line up those equal signs and this looks proper this is what I wanted to see here and we can of course add more lines than this just do double backslash and keep going if you get to the point where there's nothing on the left side of the equal sign that's okay too we can just say Ampersand equals and it's going to start with an equal sign and line it up um so I don't know we could do 12 plus x minus 5x squared like so and everything is lined up at the equal sign there now if you don't want the line numbers to appear not just appear but if you don't want your lines numbered that's when you would use the asterisk if you do it in the begin you have to also do it in the end if they don't match you'll get a compiling error so this is going to turn off the equation numbering so when I compile the 3 4 and the five have disappeared and then if I copy this one again and compile you'll see that it picks up where the first numbered one left off so it's not that it's just hiding the line numbers it's not even numbering them so think about that carefully when you use it which way you prefer to go okay that does it for this tutorial we looked at lots of ways to use brackets and to customize the height of the brackets we looked at tables and we looked at arrays hello I'm Michelle Cromwell and in this video I'm going to show you how you can create lists in latex so we'll be looking at enumerated lists which are numbered lists and then also itemized lists which are bulleted lists and let's begin by just listing some basic school supplies so pencil calculator ruler notebook if I compile now take a minute to think about what this is going to look like so pencil calculator ruler notebook in a word processor we would see these four words each on their own line but in latex we can see that that does not happen I don't have any line breaks coded here so the words are just kind of flowing all together on one line I could insert line breaks but that's not what I want to do I'm intending to make a numbered list here and so let's start over to create a numbered list we call this an enumerator list we start with backslash begin enumerate and when you have a begin enumerate you also have to have a matching and enumerate okay so this begins this environment enumerate environment but now I have to actually uh list out all of my items so then we're going to type backslash item and enter our first item which was pencil hit enter and I don't need to do anything to indicate a line break when I type backslash item again the compiler knows that this is a new item and it belongs on a new line so slash item calculator slash item ruler slash item notebook so let's try compiling this again and now we have our enumerated list so as simple as that if we want a bulleted list then we change from enumerate to itemize so an itemized list is a bulleted list and then when we compile that we see that we have bullets instead of numbers but I'm going to go back just undo that go back to my enumerated list because I want to show you how we can then have an like a nested list so another enumerated list inside of this one so let's say under notebook we have several items that we want to keep in our notebook so I'm going to hit return and I'm going to indent you can indent just once or twice however you like it and this is just kind of to help organize the code and make it easier to find things later if we need to so I'm going to do a new enumerated list so I started with backslash begin enumerate and I need to end this enumerate and you can see how it's indented and then backslash item to list my first item so in my notebook I have notes and then we'll do backslash item homework we'll say these are the sections in my notebook slash item assessments and let's compile that and see what that looks like so we have these sub items and the compiler automatically indented for us and instead of numbering it one two three four now these are numbered a b and c and you've got the parentheses around the number so all of the the numbering is happening automatically you don't have to enter any of that manually let's do this one more time let's see how we can have like another level and under assessments we'll say that we have different kinds of assessments so I'm going to hit enter I'm going to indent again and I'm going to start over with another begin enumerate slash item to list my first item so tests quizzes journal entries and we'll compile that and you'll see how that is now numbered differently as well instead of ABC now it's one two three and if I want to add a fifth item I just have to figure out where that belongs so this was item number one two three four and the indenting really helps to stay organized because now I if I want a fifth item I can kind of see where that's going to go that's going to go right here slash item and what's another Supply that we might need we'll say highlighters and that is now number five now there are some things you can do to change the way the numbering appears if maybe you don't want one two three four maybe you want capital a capital b capital c capital D or maybe you don't want the parentheses here so let's look at a few other options I'm just going to copy my first list and let's put some space in between there with V Space we'll do one centimeter of space to separate that and now instead of the default one two three four let's say I want capital letters here in square brackets I'm going to type it the way that I want it to appear so I want it like that capital A and then a period and let's compile okay so we ran into a compiling error in order to make this work we're going to need to load a package so I'm going to go into my Preamble that's before the begin document and use package enumerate okay use package enumerate let's come back down here and try this again and now you can see that that changed that for me instead of one two three four I've got the ABCD now let's try this again I'm going to copy this here so just made a copy and maybe I don't want it to be like that maybe I want to start out like that and we can do that maybe I want a numbered list but I don't want it to start with number one so here's just kind of the default really basic list right here but maybe I don't want it to start with number one for whatever reason maybe I'm creating a worksheet and I you know on the last page I left off with number five and now I want this list to begin with number six I'm going to type backslash set counter enumi and then six and you can see that now it started with number seven so that wasn't actually what I wanted I forgot that I need to say five if I want my list to start at 6 then I need to set the counters position at five so that the next time it sees an item it will think the last item was number five and it'll make the next item it sees number six so let's compile this there we go that gave me I'm starting a list starting with number six now let's create this list again I'm going to go back up and get this first list that I made with all the different levels we'll add some vertical space here to separate things out visually okay so this list started over with number one and just make this easier for you guys to see I'm going to insert a page break here instead of this vertical space we'll do backslash page break and that way this new list is on a new page and instead of an enumerated list I'm going to change it into an itemized list again itemize and then I'm just going to copy this and replace all of these enumerates with itemize so I have a begin and an end three times because I have three different levels of my list here and we'll compile that and I just wanted to show you how this works in a bulleted list so for the first level you've got the the solid round black bullets and then for the second level you've got these dashes and then the third level you have the asterisks now sometimes you want to create a list but maybe you don't want the numbers to show so let's just copy one of these basic ones we'll take this one I'm just going to copy that let's add some vertical space here okay and let me take out the customization and we have just a really basic enumerated list one two three four let's say for whatever reason we just don't want these numbers to show while you can simply type square brackets and leave them empty don't type anything in the bracket and then compile and there's a space there where the number should be but it's hidden it's not displayed okay so that's one way around it you can still have something formatted like a list with all of your items and then you're not showing any values you can also customize really however you want this numbering to look you can do it manually now it's not ideal to number things manually it's the wonderful thing about latex is that everything does get numbered automatically so if you come back later and in between calculator and ruler you want to add pen it's going to automatically renumber things for you whereas if you had manually said one two three four now you would have to renumber everything manually after that so here if you're okay with taking that risk you know that you're not gonna you know it's not that big of a deal to you you can do some customization here let's say for example you wanted this to be an A but you didn't like you didn't like the parentheses before and after you could just do something like that it's compile and we see that it it looks like that you can um I don't know what else you might do here you can even type words there if you wanted to you could do one I don't know why you would do that but just to point out that you can really customize this and so these are right Justified so that is one thing to be aware of it looks a little weird because it's ragged on the left but if you do these customized labels they're going to be right Justified here and then your items themselves will be left left Justified over here hello I'm Michelle krummel and in this video I'm going to show you some different ways you can format your text and your document so for example we'll be looking at how to make things italicized or bold how to change the font size how to create sections and subsections and organize everything with a table of contents so let's start with just some basic text formatting you can change the appearance and the size of your text to some extent so I'm going to begin by typing a simple sentence and we'll say this will produce italicized text so it won't of course because I haven't done anything to indicate that I need the text to be italicized this right now is just producing normal text but if I want the text to be italicized let's just italicize the word italicized then I'm going to in front of the word type backslash text i t curly bracket then I begin typing whatever I want in italics and when I get to the end of the text that I want to italicized I close the curly brackets so let's compile this now and we can see that the word italicized has been italicized so it's that backslash text i t that's going to italicize your text let's try making something bold so this will produce bold text now in order to make your text bold you use backslash text the F for bold face font so we'll say bold face is it face or faced I don't know but it will be bold and let's do small caps this will produce so for small caps it's backslash text S C curly bracket so we'll say small caps and your curly brackets and we'll compile that and we'll see that we have small caps and we can also do this will produce type writer font so backslash text TT nope TT so there's three T's there it's text TT uh hype writer font text so that typewriter font you might be wondering why anyone would want to use that but it is um like mono spaced so it's good in certain situations it's also I think good for urls to make them look a little bit different than the rest of the text you can offset something like saying please visit Michelle crumbles website at and then I can do my backslash text TT curly bracket Opening Our bracket and then it's http slash slash Michelle crumble.com and you can see that it just sets the text apart now if I were actually doing a hyperlink this isn't the way I would do it because we can load a package that will make this link clickable which would be even nice you can use the hyperref package for that I guess since I brought it up I'll go ahead and show you so we go into our Preamble which is before the begin document after the document class and we're going to do use package hyperref okay that and then instead of this backslash text TT I can just do um URL and let's compile that and now I have a clickable URL and you can see that it automatically put that in the typewriter font I didn't have to tell it to do that the that's just part of the hyperf package it's doing that and so now if I click on that in my PDF is going to take you to my website you can also customize this even more because sometimes websites are really long and ugly so you can do backslash href and then the URL but then you need another set of curly brackets and that's the text that you want displayed so maybe I'll just say my website and we'll compile that and now when you click on the words my website oh it didn't work oh it did work it just didn't give me the little um the little gloved hand icon okay so it did work when I clicked on it so those are the some of the things you can do to change the way that you're displaying your text we can also change our text size so let's play with the sentence please excuse my dear Aunt Sally which most math students are familiar with right order of operations parentheses exponents what is the m multiplication yes parentheses exponents multiplication division wait what's the a addition subtraction there we go it's been a while sorry parentheses exponents multiplication division addition and subtraction okay please excuse my dear Aunt Sally so let's compile this just so we can see what we're comparing this to and let me give myself some vertical separation here slash V Space I'll just do one centimeter of vertical space there separate it from the work that we did before and we are going to make dear Aunt Sally change size okay so let me copy this I'm going to paste it several times and this first time I'm going to make dear Aunt Sally large really large so to do that I there's a couple of ways I can do that let's start this way backslash begin large with a capital l and then the text that you want large I don't know should we include the period or not include the period I I guess we will not and then backslash end large with a capital l they have to match remember whenever we do a begin you're going to have to matching end so let's compile that and see what we've got so my or just the dear Aunt Sally part of that sentence let me zoom in here so you can see this better did get larger I can I you know what I sh I should have started even larger because we can go larger I'm gonna copy this and try this with a lowercase L instead which should not be quite as large as the large with the capital L so now we're going to have normal a little bit larger and then a lot larger here we go and we can make this even larger if we change large to huge okay and we can make that even larger if we change the lowercase H to a capital h and you can see that that got even larger now we can go in the other direction and make things smaller let's go back to to just normal and we'll go a little bit smaller than normal so normal you could also call it normal size so sometimes you need that if you have like your whole document as large but then you want one part of it to go back to regular regular size let's do that I'll show you that so you would just do normal size all smushed together as one word okay so that's the same as this this line oops this line right here the first one okay so let's go a little bit smaller than normal size and that's going to be script size and we can go even smaller than that and go I think I missed small I did we missed small so let's put small in here script size is smaller than small and I'm trying to do this in a logical way so normal size and then if you want it a little bit smaller you can go too small and then if you want a little bit smaller than that you can go to script size if you need it even smaller than that we'll go to Tiny okay and let's compile that and see what we've got there we go so progressively larger and then progressively smaller all the way down to Tiny now we can also change how our text is Justified so sometimes you want your text to be centered sometimes you want it left Justified sometimes you want it right Justified so add in some vertical space for this new section here and let's do centered text so for centered text begin Center and we're of course going to need an end Center as well then everything you put in between begin Center and and Center will be centered so this line is centered and I could do all of that on one line let's save some space so we can do something similar I'm going to copy that two more times instead of Center we can do flush left so we need to begin and end or we can do flush rights okay so then we can see our text and zoom out a little bit this line is centered this line is Oh I should change that is left Justified this one is right it's Justified that makes more sense all right so the begin and the end is a nice way to do this with either changing the font size or changing the way that it is Justified because it's just easy to see where that starts and where it stops it's very definitive like where that ends it's not the only way you can do it let me copy these sentences here and show you a different way and this would work not just with the justification but also with sizing as well if you do backslash centering now notice I don't have a begin and an end if I do backslash centering it's going to affect everything that comes afterwards so all of those lines are going to be centered if I were to do backslash large say for example then everything that comes after that is going to be large I don't know what's going on with the uh that's weird why is it oh I see this is indented all right I thought maybe it was like weirdly centered in one part of the page nope this is just end indented that's all that's going on because I did soft returns here there we go they're all indented now okay so uh if we change this to Tiny then everything after that becomes tiny so it just depends what you want to do if you want to change your whole document then you can do this something like this is very simple I usually like the begin and the end again because then when I'm going back and looking at my code it's very easy to see where that started and where it ended so that's what I've got for text formatting now let's talk a little more about document formatting if you want to create a little title section at the top of your document then you're going to come into your Preamble so before the begin document you're going to come up here and you're going to enter three different lines backslash title with curly brackets backslash author with curly brackets backslash date with curly brackets now you don't have to type anything in the curly brackets but obviously if you want your title to show then you would type something let me do a full page view here so we can see what's going on so let's just say for my title I'm going to write my latex documents and for author I'm going to put my name Michelle crummell and for the date I have a couple of options I can manually type the date what is today's date hang on let me check Sunday July 26th so I could say July 26th 2020 like so now I'm going to compile and notice nothing changed on the PDF my title is not showing up so I've entered the needed information to create the title but I haven't actually told the compiler to print the title in my PDF to make it we have to actually tell it to make the title so after begin document you're going to type backslash make title all one word and we'll compile and now I have a title so there's a couple of things I want to point out with the date if you want to manually enter the date you can change that to anything I want any text I want even if it's not a date if you just want to put some other kind of text there you can and you can still use the backslash date coming and to do that oftentimes what I will do for the date is backslash today and then when each time I compile it'll figure out what is today's date and then it'll display that date so if I come back make some edits compile this again later it'll always have the most current date on it my students don't always like to do that because sometimes they turn in things late and they don't want me to know that they compiled it late the other thing I want to fix here is the word latex my latex document so the word latex is normally typeset in a very special way and to accomplish that you have to do backslash and then you type l-a-t-e-x and it needs to be done like so with a capital l a lowercase a a capital T lowercase e capital x and then when we compile you'll see that it did change like the font and spacing and formatting of that latex let me zoom in because it doesn't look quite right because there's no space between the letter Chi and the letter d so I can create that space by typing another backslash at the end of that word and compiling it again and now we get the space between the chi and the D that is a basic little title section on your first page there's lots of other ways to create title pages that then wouldn't have other things on them but we'll get into that in another tutorial how to format a math paper what we want to do here next is to create some sections and subsections in our document so let me go to the end here but before my end document and create a section so my first section I'm going to hit backslash section and then in curly brackets type the name of your section or the title for your section so this will be linear functions that's my first section I'll compile that and you can see that there's some automatic formatting that happened to that that's not like normal text linear functions for my section here it's bold It's a larger font size and it's numbered and I didn't manually number it the compiler will number it and so if I create another section create another section and call it quadratic functions pile and now that's section number two we can create subsections so underneath section one I'm going to indent again just for my own organization it's not absolutely necessary I'm going to type backslash subsection curly bracket we'll say slope intercept form and then let's do another one backslash subsection standard form and one more slash subsection point-slope form let's compile that so now we have subsections and the subsections again are formatted in a special way and they're numbered 1.1 1.2 1.3 if you don't like the way that the numbering scheme looks you can change that you can also add sub subsections so under our first subsection let's indent and do backslash Sub sub section example one and one more Sub sub section example two and compile and now we see those subsections are labeled 1.1.1 1.1.2 okay let's add a couple subsections under quadratic functions and the reason I'm doing this is because we are going to build a table of contents so I want to have enough to fill out my table of contents so subsection here we'll do vertex form standard form and factored form and compile okay there we go now if you don't want the numbering to be displayed then you type in asterisk after the word section so if I don't want those section titles to have numbers in front of them I can suppress that same with the subsections and do asterisks and hide those so just hide a couple of those okay so you can decide if you want them numbered or not I'm going to undo that because I do want them numbered for my table of contents okay so here we are I'm going to go back up to the top of the document and let's say the very first thing we want after being in document is our table of contents so backslash table of contents all one word compile and let me go full page now the contents is blank that's going to happen because it requires two compilings in order to create the table of contents so don't panic if you don't see your table of contents once you compile just compile again so let's compile one more time and there it is our table of contents formatted very nicely with our page numbers hello I'm Michelle krummel and in this video we are going to look at packages macros and graphics let's start by saving our file so I have a file that I've already started and I am just going to save that as tutorial 6. so let me find the folder where I want to save that tutorial 6. and if we look at that folder here we can see that it is tutorial 06.tech and we're going to start by looking at some packages that we can use to change how this document looks packages are used to load special instructions for the compiler so you can do things like add features that aren't included in the standard distribution or modify the standard rules for fonts and document formatting if you want to use a package you place it in the Preamble so the Preamble is the section of code between document class and begin document so I'm going to come up here to line number two and just hit enter a few times to give myself some space and we can start entering the packages that we want to use so the first package I'm going to show you is one that I use in almost every document I create and that is going to affect the size of the margin for my output document if you'll notice and I'm going to change the zoom here so that we can see the entire page there's a lot of white space at the top and on the left and on the right and even at the bottom below the page number so this is just the default margins that are set here and normally these margins are too large for the kinds of documents that I'm creating I prefer to have about a one inch margin so we can use a package to deal with that now the easiest way if I just want one inch margins on all sides is to use a package called full page to use a package we're going to type backslash use package I'm going to choose the option with the curly brackets and then I'm going to type the name of the package inside of the curly brackets so it's just full page and then I'm going to compile so we can come up here to compile or I can just hit F2 as a keyboard shortcut so notice what happened now we've got a one inch margin at the top at the left at the bottom and let's go back to full page view and you can see we also now have decreased that margin at the bottom so that's just really quick easy package to use if you want one inch margins on all sides now you can use different size papers in the United States typically we use paper that is eight and a half inches by 11 and if you want to make sure you are set up for that you can come up here and type letter paper to make sure we're using letter paper if you are using a four size paper you can type A4 paper up here and when I compile I don't know if you noticed that it went pretty quick there was only a very slight difference but look at the bottom of the page here that did make quite quite a difference so let me go back to letter paper and that's going to give me that eight and a half by 11 size paper now I might not want one inch margins on all sides we can customize this further if we use a different package so instead of the full page package I'm going to use the geometry package and this is the one that I use when I create all of my documents just because it does give me some more control so the geometry package I think if I compile right now it's not going to do anything I haven't really told it what I want it to do yeah it looks like it maybe it just went back to the default let's zoom in here a little bit now I'm just a fit to page width here and we can come in front of those curly brackets and put square brackets and that is where I'm going to enter the options that I want to use with this package so if I do want one inch margins I'm going to type margin equals one inch and compile um F1 to compile I may have said F2 earlier I don't remember F1 to compile and now I have one inch margin so this really has the same effect as that full page package when I when I do it like this and just say give me one one inch margins all all the way around uh although it looks like we don't have a whole lot of space under the page number there I can make this really specific and say no I want the top to be one inch and the bottom to be one inch but the left to be 0.5 inches and the right to equal 0.5 inches and let's compile that and now you can see that I do have those larger margins on the top and bottom compared to what I have on the left and right okay um now my margins are a little bit too small for my taste so I might change that and you certainly don't have to use inches you can use centimeters you can use any valid measurement that latex will accept here okay typically I just use one inch but we will leave that like so for now and let's talk about another package actually before we move away from the geometry package you can also explicitly specify your paper size so let me just show you that real quick we could say paper width equals 8.5 inches if we're working with eight and a half by eleven and then we can say paper height equals 11 inches okay so if I did want to change the size of my output for my paper I don't know maybe I want to do something crazy like uh five by seven and then we can see what happens so when you print this it's going to print 5x7 instead of now eight and a half by eleven so there might be some applications for that if you're if you want if maybe if you're making flash cards for example and you want them to be smaller then you could adjust that paper size even if your actual paper is not that size it would restrict the output to that size for you okay so let's just go back this is bugging me just because it's not what I like to use okay there we go that's making me feel more comfortable I've got one inch margins all around okay let's talk about another package and sometimes you're trying to type mathematical notation maybe you're looking up some syntax to do something like the symbol for the set of all real numbers and you try and type the code and then you get some kind of error well that actually requires a package some do use package and the name of the package that we're going to want to use for that is Ams fonts that package is going to allow us to use some specialized math notation so let me come over here to my questions and then add in before question number one uh let's just say I we want something something to do with all Runners I'm just going to type this is the symbol for all real numbers and the uh code for that we have to be in math mode we're going to backslash math BB you can see that it's popping up as a suggestion for me here and then we're just going to put capital r closed Math mode and compile and I will zoom in over here so we can get a better view of that but now we have there the symbol or a misspelled symbol the symbol for all real numbers and we of course have other symbols that we can use like the symbol for these set of integers so let me just copy that the symbol for and I probably should say for the set of yeah let's do that properly for the set of integers and that is going to be the capital z and we can see that it produces that symbol for us there we might want the set of rational numbers and that would be a q you get the idea now if I didn't have this package loaded I'm going to remove that and compile and you'll see that I get an error it's looking for when you see this undefined control sequence it doesn't recognize that command we do need to load a package I don't know if it tells me in the error message that which package I need but sometimes you will encounter that so we want to make sure that we're using that package and whenever I'm creating a document I automatically load the AMS fonts package whether I need it or not because I never know when I'm going to end up typing some mathematicals you know symbol that might require it and if you are not including any options so you're not using the square brackets to Define any specific options then you can actually load multiple packages all using one command so here I can type for example AMS fonts comma and then the name of another package that I want to use so I typically will load AMS fonts AMS Sim and what's the other one AMS math I think those three I just always when I start my documents I load those three packages just in case I end up needing them and you know in the end if you comment that out and compile and everything looks fine you didn't really need those packages you can always just leave a commented out or you can delete it from your code but I always just keep it in it's not harming anything all right so you load your packages again in the pre-ample that is before the backslash begin document now you can also load some macros in your preamble so macros are used to define your own custom latex commands and there are a few macros that I use often that I'm going to share with you but before I do that let's just you know look at how a macro might work in general so let's say you're working on a document and there's a little snippet of code that you know that you're going to use multiple times in your document you can Define it once using a custom latex command and then within the body of your document whenever you want to call that up you can just type that you know command that you've created instead of having to type the whole code so for example let's just say we were we were typing a paper and we were we knew that we were going to be working with a rational function and having to type it several times throughout the document so let's just say that that function is y equals and then we've got the fraction X over 3x squared plus X Plus 1. okay now I'm in the Preamble right now so compiling will probably give me an error like it doesn't make sense to have this up here I don't know that I've ever tried doing that before yeah I did get I did get an error because I'm trying to type this before my begin document doesn't like that but I just wanted to establish that this is an equation in fact let's move it on down here just so we can take a look at it on our document doesn't look that great at the moment if I want that to be a larger fraction I can go with d Frac instead and it would look more like that okay so let's go ahead and set up our macro and all we have to do is type backslash def for Define we are going to define a new command what do we want to call our rational function maybe we'll just call it backslash eq1 for equation one so we're defining equation one and then in curly brackets you're going to type the code that you want the compiler to run every time you type backslash eq1 inside of your document so you're gonna have to decide if you want to include the dollar signs as part of the command or exclude them I would say it's safer to exclude them just in case you're in a situation for example if you're doing an equation array or you're in a begin a line of environment where you don't want to use dollar signs uh you might run into issues there so I am going to omit the dollar signs and just type the actual equation part there now when we do want to call up this function within our document we're going to have to type the dollar signs so again you can decide if you want to include the dollar signs or not as part of the way that you have defined this special command slash eq1 so now that it's defined we can use it and it didn't look great just sitting there above critical thinking questions let's just make this a new item in our list here let's examine the function backslash eq1 now again this is going to be problematic because it's going to try and display equation one but it's not in math mode so you can see if I compile it doesn't like that it's telling me right I can see right away oh you're missing a dollar sign so we just have to put dollar signs around our EQ one and we should be good to go there we are let's examine the phone so without having to retype the equation I can just call it up like this and then any at any point throughout my document I can call that up again quickly just using slash eq1 so that can be helpful let me show you um some of the macros that I commonly use in my documents I have this document open right here this is one that I use very frequently and this one again we're in the Preamble is where we're defining these custom commands so this one starts backslash new command and then the name of the command in curly brackets so this is the actual command that if I were not using a macro I would just type this out within the body of the document whenever I want to use it and this is going to increase the vertical space between items in my list so it's adding more separation if you want to think of it that way the item set it's adding separation between list items and this pound one is for is where I am going to input a value so each time I this is this one is a little bit different because it's not a a static command that is going to be the same every single time this one I have to enter a value when I use this command and this is the part in the code that's telling me that I'm going to enter a value right here where typically a number would be so how do we use that after my begin enumerate if I decide that I want more space between my list items I can just bring up this command and I'm going to just type backslash set like this backslash set and then in curly brackets I'm going to type how much space I want so I can type the number one here let's compile and that has added some space if I want more space I could type the number two and that gave me even more space let's just really exaggerate it I'm going to type the number five and that's giving me a lot of space typically I normally just stick with about 1.2 that's my my go-to unless I'm trying to leave room maybe if I'm typing a quiz I want to leave room for students to write answers although I typically do that with a V fill rather than the set command so that is one that I use often another one that I use often let's go over here um let's look at this one now this one is going to require I believe that we use a certain package yeah we're gonna have to use our packages you can see I have a lot of a lot more packages loaded in this sample document than the one we're working in right now but let me go ahead our commands go in the Preamble so I'm going to put that one up here and this one is going to insert a calculator symbol the command that I would be typing is just slash calculator but we are going to want to use these two packages tixi pgf plots so I'll come back up here where I've loaded all of my packages and let's compile or I haven't actually asked it to use that command so let's try using it and make sure it works so I'm just going to right here let's say I want um to let people know that this is a calculator active question I can type backslash calculator pile and then it's going to insert that little calculator symbol now I need a space between that and let's so I always just put an extra backslash like so and that's going to give me that little extra space that I need there and so if I'm typing up a set of homework problems and my students know that they can use a calculator on that particular question so that um is a really great use of this macro because I don't want to have to type this code every single time I want to insert that calculator icon I just do it once in the Preamble and then whenever I want to use it I can just type the backslash calculator so that's how you do custom commands in latex okay and then the last thing we're going to talk about here is inserting Graphics now it's important when you insert graphics and by Graphics I mean image files jpegs pngs are typically the ones that you're going to be working with it's important that you save those image files in the same folder where you've saved your Tech file so let me open my finder window this is the folder where I've saved my tech file this is the tech file we are working on right now it is in this folder latex tutorial 6 packages macros and Graphics so I'm going to find the image that I want to use I've saved it to my desktops to make it easy to find it's right here so I'm going to copy that and then I will come back here this is the folder where my tech file is and I'm going to paste that image file in this folder they need to be in the same folder for the compiler to find the image otherwise you will get a compiling error so let's go back up top because we do need to load a package in order to insert images so the package that we're going to use use package graphic X graphic X that is the package that we are going to use and then where I want to insert my image let me go back to a page width view here let's put the image right above question number one here where's statement number one here we'll put it before the enumerated list so in between critical thinking questions I'm going to insert my image right here and the most basic way to insert this image backslash include Graphics you can see that the suggestion is popping up the scale now I can go with a scale of one I find that typically a scale of one it sounds like it should be the right size right because it's 100 percent scale but it's usually really big so if I do use scale I find that I normally have to use a number between zero and one but we'll we'll just try it and see what happens so scale equals one and then you type the name of your file so let me go back to that folder because I've forgotten the name of it so the file is limit dot PNG so here I'm going to type limit I don't have to type the dot PNG you can it's fine but you don't have to you can omit the dot and then the file extension so if I had a limit dot JPEG file I could also just type limit and let's compile and there is our image so it is bigger than what I would like for this document you can see the font size here on the axis is a whole lot bigger than what I have in the rest of the document so we can decrease the scale maybe try 0.8 still too big I mean let's go with 0.6 I typically don't use scale I typically want to make sure that all of my images have a consistent width or maybe a consistent height so there is another option for sizing your image besides using scale you can specify the height of your image you can specify the width of your image so let's just do width equals and we will try five inches okay so that's pretty big I don't know why I went with that that big let's try 3.5 inches now you can also specify the height instead of the width or at the same time so if you change the aspect ratio things are going to look a little wonky let's try height equals five inches and you'll see that I haven't maintained that aspect ratio so typically I just do one or the other either width or height you don't have to use inches you can use centimeters you can also use percents so we could say something like with equals to do a percent you want to do something like this zero let's if we want 50 we could say 0.5 so slash text width so that's going to make the width of the image half of the text width yeah that looks about half right if I went with 0.75 that's going to be really big because it's going to take up three-fourths of the um I can't say page width because it's not including the margins but the text width right so that's another way that you can size your images there and if you want something smaller now it's only one-fourth of the text width now if you want the image to be centered let's go back to 0.4 if you want your image to be centered and this is the way that you're inserting your image then before the image we can do backslash begin Center and after the image backslash end Center so we don't want to Center everything on the page we just want to Center the image okay so that is the a really simple way to get uh Graphics into your document there's nothing fancy here we don't have a caption you know labels any of that kind of stuff so if you do want to have a little more control maybe you want to add a caption to your image or you want to have a little more control over the placement of your image then we can put our image inside of the figure environment so let me take away begin and end Center because there's a better way to do that if we right before the image backslash begin figure and then right after the image backslash and figure all right let's compile that and you'll see that it moved the image now in the code I've placed the image between critical thinking questions and my enumerated list but the compiler moved the image and it displayed it at the top of the page well if if you don't like that you have some options for telling it where to place the image here we can do in square brackets in h for here place the image here now that might not always work because sometimes the compiler thinks it knows better about where that image would fit best like if there's not quite enough space where you want to put it or I honestly I don't know how it how it decides exactly where to place the images but sometimes even this lowercase H doesn't work if you want it at the top of the page you can use a t if you want to place the image at the bottom of the page you can use a b that moved it down to the bottom of the page but normally I want my image to be right where I coded it and so I use a capital H but if I try and compile this I'm going to get an error because the capital H requires a special package and that is the float package so that is one that I almost always load in my documents in case I need it because it is also really useful for placing tables not just images but also tables and so if you load that flow package and you use the capital H here it will put the image right where you have the code for the image regardless of whether it fits well in that space or not and if you want to Center your image then inside of that figure environment you can just type slash centering so that will Center the image and also the caption if you use a caption so if we want to place a caption below the image I can end my line here and type backslash caption and then in the curly brackets type my caption so this is a visual or oh let's just call let's just say this The Squeeze theorem now notice all I said was caption The Squeeze theorem I never typed figure one but look when it displayed the caption it labeled or numbered this figure for me automatically which is really nice if you have several images in your paper it's going to number them as you go and then later if you go back and insert another image it will automatically you know reset all of the numbering and number everything appropriately now for those of you who are using overleaf let's talk about how to insert an image here so I've just copied and pasted the code from my techmaker file over here and when I hit compile I did get a compiling error it looks like I have two errors and it's because it can't find the image I've asked it to include in the document so it's looking for this this file called limit and it can't find it because I have not uploaded it here into overleaf so you're going to want it to appear in this list along with your Tech file so here's our you know main Tech file I can rename this if I want so that it matches the other one tutorial 06 so you don't want to always have main.tech be your file names here because then when you start exporting things to your computer you'll have multiple Ted files that all have the same name so I do like if you're using overleaf get it in the habit of renaming those files okay so we need to upload an image and place it here in this list so here is the icon to upload and then you're going to find that image on your computer you can drag and drop it into the box I have that image on my desktop so let me do that I'm just going to drag it over here and drop it and it appears right here so now when I compile it should work out okay and there we go there is my image I had no problems finding that file because it is again in the same folder here in the same directory as the tech file itself so that does it for this tutorial we talked about loading packages we looked at defining some custom commands and then how to deal with inserting images into our documents I'm Michelle krummel and in this video we are going to take a look at errors and debugging so for errors I have intentionally made some very common errors and we're going to go through them one by one and see if we can fix them so I um haven't tried compiling this document yet I'm going to go ahead and compile it and when I do that I run into an error so I'm not actually seeing PDF output produced over here if the the file will not compile and so I have a number of errors and I can see in my log down here I can scroll through I have all kinds of errors and it's telling me it's giving me some Clues as to where these errors are and then what types of Errors they are so having the line numbers is very helpful and if you're not seeing your line numbers appear here you can go into your tech maker preferences and make sure you have line numbering turned on in your editor so that is a check box right here that you can select or deselect but I like having the line numbers show because it really does help when you're trying to find errors okay so let's look at that again now the first error apparently is occurring on line five and that's where my cursor is at the moment so it kind of worked its way through the file while it was trying to compile and there's a problem here on line five so the first thing I like to do is just read it very carefully and see if anything jumps out at me and I can you know make sometimes I'll just notice oh I see the mistake that I made there you know we're starting with double dollar signs we're closing with double dollar signs that's not an issue I have my left parentheses now whenever you use a slash left you need a matching slash right and I'm noticing I don't have a slash right so that's probably the issue and if we read the actual error it says right here missing slash right so that's a big clue to me to let me know what kind of mistake it is I'm dealing with so I do have clothing parentheses or parenthesis right here but I did not type slash right in front of it okay so I'm going to try compiling again to see if that fixed the error now it still did not successfully compile but that's because there are other errors in the document I can tell that I've fixed the error in line five because now when I look down at my error log the first error is occurring on line eight so we fix the problem in line five now let's deal with line eight notice we don't actually have any code in line eight so when that happens I usually go to the line right before it and and look for an error there another good tip when you're trying to troubleshoot here or debug your code if there are too many errors or you're just not sure exactly where their error is you can have the compiler temporarily ignore part of your code by commenting it out so anything you want to comment out you can type a percent symbol in front of it notice that this turned gray the line turned gray the compiler is going to completely ignore everything on line nine so sometimes you'll want to use that strategy just to narrow down where the error is now we the log says it's on line eight I know it's not actually on line eight so what I'm going to do just to show you how you can use this commenting thing I'm going to comment everything out except for endocument I don't want to comment that out because we have a begin document we need an end document or it's never going to compile so I highlighted everything else here and I can go individually and type percent symbols but there is a keyboard shortcut I can type command t on my Mac and that will comment all of the lines that I've highlighted alternatively you can come up here to edit and choose comment and it will do the same thing now I've just done it twice so I'm going to I think if I undo it'll only do one line so let me do edit and uncomment to okay there we go so now the only code that is going to run when I compile is the lines that are not grayed out here and I know that I fixed the error in line five so let's see what happens okay now it's just giving me errors on line eight supposedly line eight but I know for sure that it's happening right here because everything after that is being ignored and everything before that we have fixed so let's take a look at this and see if we can pinpoint what's missing the dollar signs look okay A lot of times um there's a missing dollar sign and that's an a common error that you can make but I'm noticing you know for every opening dollar sign I have closing dollar signs so that's good slash Frack I've got curly brackets around the numerator ah but I don't have curly brackets around the numerator because I accidentally typed parentheses here instead of the curly bracket so let's change that to a curly bracket now I think I've fixed it so I'm going to try compiling again and success the the file did compile now I've hidden all this other stuff so it's not showing so what I can do now is just unhide these lines one at a time I can uncomment uh them and back and then try and compile and we have an error now on line nine if I look at the error it says missing curly bracket so that's probably what the problem is and I sometimes I will count this is open number one open number two close number one open number three closed number two oh what did I just do there we go let's try that again actually when I'm doing this because it's hard to to kind of keep track I'll count all the open uh curly brackets and then all the closing curly brackets so I have open one two three I have three opening ones and then let's look for the closing ones we've got one and then two so I know that I'm missing a curly bracket somewhere now notice the color coding that's going on to help me if I put my cursor right after a closing curly bracket it shows me the pair it shows me the one that's opening and then being closed by this bracket so that's that pair is good this pair is good when I click here nothing nothing got highlighted like up here if I put my cursor next to that it's going to highlight the pair but when I put my cursor here it's not highlighting a pair so this opening one right here is missing a closing one so then you're going to look at your code and see okay where does the square root end and that means I have to put one at the end right here and now I've got that pair highlighted so let's compile and see if that worked that did work so that was successful let me go ahead and zoom in here okay so now I'm not going to just uncomment begin enumerate because that would certainly give me an error whenever you have a begin you need an end okay but now I don't I think I might get an error here because I'm saying hey I'm making an enumerated list but then I didn't put any items in my list so you need at least one item and if we compile that works there's my first item so I'm just going to take a chance maybe there's no errors in here and I'm going to highlight all of this and to uncomment them all back I can hit command U on my keyboard or I could have gone up here to edit uncomment and it would have the same effect and now we will compile that and I am getting an error so I know there's an error somewhere here okay so let's see if we can figure out what it is we've got the second item that looks fine begin enumerate and anytime you see begin something ask yourself do you have a matching end and I don't because the end enumerate right here matches the begin enumerate right here so this beginner numerate does not have an end enumerate so I need to come down right here and add an end enumerate that's a common error that happens especially when you're making nested lists and now everything is okay indenting can help with this if you don't indent and you have everything like this then it's hard to see which begin enumerate is paired with which and denumerate it's a lot easier if you indent and you can indent a bunch of lines at once if you highlight them and then for my Mac it's command shift and then the right angular bracket on the keyboard the one where you uh same key you hit for a period and you can do that multiple times if you want to indent more and if you want to go in the other direction you can use the left angular bracket to go the other direction okay so then let's comment out this next part and see if there's an issue there also I'm going to try compiling nope I've got a problem here and I'm if I read the error message it says undefined control sequence so undefined control sequence often happens if you well the compiler doesn't recognize a command so you typed backslash something and it doesn't recognize it and the most common reason common two reasons for that are one the commands you're trying to use requires a package that you don't have loaded or two there's a typo in your command you accidentally misspelled it which is the case here because I meant frack and I spelled farc so we'll change that to frack and see if that fixes that and it does there's my fraction there I'm going to go ahead and just uncomment all the rest of this stuff and we'll see how many more errors we have in this file okay scrolling down here it looks like we still have quite a few so I'm good up to line 24 even though it's telling me that the next error is on line 26 missing dollar sign inserted and I can see right away that it's a dollar sign issue because remember when you open Math mode using a dollar sign everything in math mode turns green and looking at this there is way too much green here too many things are green that aren't supposed to be green only the math should be green so this text if that discriminant that should not be green so I forgot to close my dollar sign right here and as soon as I type that dollar sign you can see that that text now turned black which is how it's supposed to be so let's try compiling now I still have errors in the document so it did not update the PDF this is the PDF from the last successful compile that we did so be aware of that as well if you feel like you're clicking compile and nothing's changing over here it could be because you have a compiling error and it's not updating your PDF for you and you can turn these this message log off so if you're not you know maybe you wouldn't realize that you had an error your PDF is just not updating but for me the message log automatically pops up when I have errors okay so now let's look at line 27 and see if we can figure out what issue we're having here so in the Align environment first of all I noticed something's weird because it's colored in a strange way I'm expecting the math to be green and things that aren't math to be black but this stuff right here I clicked a dollar sign to start Math mode but this is black why isn't it green if it's in math mode well when you're when you start the a line environment here when you type backslash begin a line it's it automatically puts that in math mode so I'm in math mode before I ever type anything when I do begin a line like that I'm in math mode right now so if I start typing you'll see it's green because it is in math mode now let me go back to what I had so what happened when I typed the dollar sign is it actually closed the math mode and that's causing me errors here so when you're working in a line never use the dollar symbols you're automatically in math mode now things look a bit more normal the math mode is green like I would expect it to be so let's compile and we still have an error it's still saying line 27. now obviously the problem is not on line 27 because there's nothing wrong with this code right here the syntax but it's something to do with my align environment here if you look at the other code messages that are popping up so sometimes this will give you a clue as to what's wrong and other times you know maybe it's not you're not real sure what this means miss it looks like missing dollar sign inserted but that's not really what the issue is here misplaced alignment tab character that's talking about the Ampersand that's not the issue here the issue here is that we have a blank line in our align environment and typically blank lines don't matter at all you can put as many blank lines in your code as you want it's not an issue it's not even going to show up as blank lines over here on your document in fact the compiler ignores spaces as well I don't know that I've mentioned that yet so not in text I don't not in text mode in text mode Let's see what happens if I put a bunch of spaces here actually I think it probably will still ignore it oh let me hide this because it won't compile so there's an error there so I'm commenting that out so we can see what happens here when I put in all these spaces there and look here then there are no real Roots it ignored all of those spaces you can type as many spaces as you want here and it's going to ignore it which is kind of nice because sometimes when you're you have a lot of code it's helpful to your eye to space things out for example up here where we have the square root especially when you're trying to find an error in fix and error sometimes I'll come in here and I will just put a bunch of space like I know the slash square root goes with that closing bracket right there and I'll just put a bunch of spaces just to visually separate it so I can focus on the interior because if I'm sure that this looks correct and it's matching with this right here then I don't need to focus on that part of the command I I really want to just focus what's in the middle here so spacing things out in your code can be helpful and this absolutely will not affect your output the compiler will ignore spaces sometimes it's frustrating frustrating because you want a space and it's ignoring the space when you type it but there is a way to hard code a space if I want to put a spacer I can just do backslash comma and then I could do that as many times as I want so let's insert some spaces here and now when I compile I should see the square root symbol and then a weird amount of space and then my fraction so that's happening right here I've inserted some extra space there let's take that away because that's not proper okay and now it looks normal again so let's go back to trying to fix our issue here and I think I already told you what the problem was in an align environment you cannot have an empty a blank line you cannot have a blank line so let's remove the blank line and try compiling and oh I still have another error okay I thought that was going to work okay so I'm not getting any any good Clues from the message here so I'm going to look at the code very carefully and make sure I didn't misspell something make sure that I have all the matching stuff that I need everything looks good so my next uh thing to check is is there a package missing that maybe I need so at this point I'm not sure what the issue is I always go to Google Google is your best friend when you are trying to troubleshoot latex errors so I am just going to Google's you know some kind of words that are going to indicate what my problem is so latex and then begin a line and let's see I think it's a package issue so let's see what pops up so a couple of Clues here I'm seeing use AMS math use package AMS math the very first hit aligning equations with AMS math so I think that was the package I needed and not that float package so let's come back up here and try AMS math AMS math and compile and sure enough that fixed the issue so that was the package I needed and I think I mentioned this in an earlier video whenever I create a document I always load AMS math AMS Sim and AMS fonts because I can never remember which one does what and I frequently need to use these three packages so just out of habit I go ahead and load those packages for all of my latex documents so that fixed the issue that we were having here okay so uh fixing errors you know it can be frustrating certainly but you want to try um just a systematic approach to it use that tip I showed you about commenting out parts of the code so you can really narrow in right where the error is use that error log to help provide clues to you so you can see what the error is and before we go let's just hop on over to overleaf and I'll show you what debugging looks like in overleaf it's a little bit different to be honest with you it uh it's not very pleasant okay and I think I made this sample document it was a copy of our tutorial with all of these errors in it so the reason I said it's not very pleasant is just because you see all of this red like it just induces panic when I see this I'm typing on a document and then things all of a sudden turn red right it's very jarring but it's showing me that I do have issues now in overleaf so I'm trying to compile it's not compiling clearly I'm having a problem because everything turned red it's giving me some indication of maybe what the problems are but but you see that it's not quite as um explicit as it was in tech maker where it said line five and then line eight and then line nine we are getting a little clue right here this l.5 is referring to line five uh and it looks like slash right it's also identifying what the problem might be there you really have to read these read these and look for Clues uh and then also this red X right here is indicating that we have an error on this line so we're going to try and fix it if you remember from last time the problem was we were missing the slash right in front of this other bracketing symbol okay now as soon as I fixed that notice what happened the Red X in front of line five disappeared but now I've got all these other red X's so these are indicating other problems now this one doesn't make a whole lot of sense uh backslash begin document like that's there's nothing wrong with that but if we hover over this and look at the message it's saying it's unclosed in other words like we have a begin document but we don't have an end document well clearly we do have an endocument it's down here but look what it says down here hey I found an unexpected end document after a begin enumerate so it's it's seeing this slash end and trying to close and enumerate so now I'm kind of piecing together the actual problem it's not the begin document it's not the end document it has something to do with a begin enumerate that probably wasn't closed and I have to really like hunt through here look very carefully at all my beginner numerates and make sure they have matching end in new rights and if you remember this one does not so it's a little harder I think to troubleshoot this problem in overleaf slash end enumerate and you can see as I'm fixing things some of that red is going away it's not panicking quite as much but now we have other coloring issues going on and oh things are turning red again that's not cool uh oh now we have a warning here this symbol is just a warning it's not necessarily going to cause a compiling error and if you read the message it's telling us something about the end of line which is happening all the way down here so to me like debugging an overleaf is definitely not as easy as it is in tech maker and I would highly suggest if you're working an overleaf that you use that strategy of commenting out a large chunk of your code so that you can really focus on one little section at a time but before you even get to this point the best piece of advice I have for you I can't believe I haven't said it before now in this video but the best way to prevent errors or to to debug errors is to compile all the time compile frequently right after you type a line of code compile and so you can see oh that works no errors keep going type A next little bit of code compiled don't try and type your whole document and then hit compile and end up with 25 errors then it's a nightmare to try and fix them all so compile as you go frequently every line every couple of lines hit that compile button and make sure that everything is running properly okay I'm not going to go through fixing all the rest of these because we already saw how to do that how to fix them but I I did want to show you what the interface is like over here um even though it's tempting to fix them just to get rid of all of this red here I'm Michelle crumble and in this video I'm going to show you some tips for using tech maker and some tips for using overleaf so we're going to get started by opening up a tech file that I've already created techmaker is set to be the default program that will open Tech files that are stored on my computer so if I double click on this file it's automatically going to launch techmaker and open the file within techmaker so here is a file and this is what our tech maker window looks like yours might look a little different because I I may have changed some options some of my viewing options so in terms of what you see on the screen right now you can change that with these four buttons at the bottom if we open up the structure panel over here we see first of all our file structure and right now I just have the my my tech file here I don't have anything else added in here if I click on some of these other buttons we're going to see a list of symbols and if I click on one of these symbols it's going to insert the code for that symbol so I want to think about where I'm going to insert this let's just insert it at the end of this first list item so this particular symbol requires Math mode so I'm going to hit dollar sign and then let's say I forgot the symbol for plus or minus I can come over here click on plus or minus and it's going to insert the code for that symbol for me right here and now when I compile I should see the plus or minus appear so to compile my document I have a few options what I usually use is just F1 F1 is keyboard shortcut that is going to run the code for me so I hit F1 on my keyboard and my document compiles and I can see the result over here and sure enough I've got that plus or minus symbol right over here another way that I can compile my code is using the quick build option up here and in this drop down menu you can decide what's going to happen when you press on this Arrow so I like to have it set to Quick Build and quick build is going to do two things it's going to run the code it's going to turn it into the PDF and then it's going to show me the PDF so we can change what quick build is doing in our preferences if we go to tech maker preferences quick build right now when I run quick build when I press quick build it's going to run PDF latex view PDF so you can see that there are quite a few other options that you could select instead but this is probably the one that you're going to want to use so I would hit this Arrow right here and that like I said is going to run the code and then show me the PDF now if I let's say I take away the plus or minus okay so now when I run my code it should remove that plus or minus symbol and I should not see it on my PDF if I come over here view PDF and I click that nothing changed I still have the plus or minus there even though it's not over here in the code and that's because view PDF does not recompile your document it only shows you the PDF from the last successful compile I have not recompiled so just clicking on this Arrow right here is not going to do anything but show you the PDF from the last time you compiled it's not going to recompile so you have to make sure you're clicking on this Arrow not this one over here click on this one or like I said use your keyboard shortcut of F1 and that recompiles and we can see the plus or minus symbol has disappeared so you have other categories of symbols over here we've got arrows different symbols brackets Greek letters most used symbols this is going to populate automatically based on what you've clicked on in the past and then we've got our favorites the star here is a place where you can store your favorite symbols so if there is something that you think you'll use frequently maybe I don't know I'll just use this summation symbol you can right click add to favorites and then you can quickly find it by clicking on that star icon and then just choosing it over here if I click on this it's going to insert that into the code but I don't actually want that there okay I'm going to go ahead and close the structure panel so I'm not using it so I don't want it to take up space on my screen we have some other things that we can click on over here to call up some other commands so if you need to start a new section you can do that this way and you can type the name of the section that you want I'm not sure where I left my cursor so this is probably going to put it in a bad place in fact let me cancel let's say I want to create a section right here so I can go to section and I don't know what I want to call it section one and I'll hit OK and it's going to insert the code there to start this section for me and then if I compile we can see that it added section one for me there you have other options that you can use just click on here to see what you've got all of your different font sizes this one can be helpful it's hard to remember sometimes what the smaller font sizes commands are if you want to use this one right here to make something bold you want to highlight the text first so let's say I want to have chain rule in bold I would highlight chain Rule and then I would click on the B and you can see that it inserted slash text BF the curly brackets and my text is inside so now when I run my code chain rule is in bold okay so that can be a bit of a Time Saver and same thing here with italics emphasis is another way to do italics here we've got some justification symbols this one and if you hover your mouse over here it'll pop up a little box that tells you what it's going to do so this is going to insert a new line here we're going to get dollar signs a pair of dollar signs Etc so you can look at these different options a fraction is something that people frequently use so that's handy to have it right here in this toolbar same with the square root but remember in tech maker when you start typing a command so let's say we want to square root with open Math mode with a dollar sign if I start typing backslash SQ it's going to pop up some suggestions for me so the top one would be for an nth root and the bottom one would just be as for a square root so that would give me the square root of x so you can decide if it's faster to just type it by hand or maybe to click on some of the buttons over here before we look at some of the other things in our menu so let's go ahead and open the tech maker preferences and see what we have going on there under this commands tab I just want to point out that you do have the option with your PDF viewer to use the built-in viewer or an external viewer when you use the built-in viewer that's what allows the PDF to show up in this pane over here on the right which again you can toggle on and off at will if I switch to an external viewer let me go back into my preferences if I switch to an external viewer and it's one or the other you can't have both selected the external viewer is going to when I ask to view the PDF it's going to open it up in a different application outside of techmaker so by default my computer uses Adobe Reader to open PDFs so I'm pretty sure that's what where it's going to open so now you'll notice I don't have the option to view the PDF in a pane over here that went away so now when I want to view my PDF so I can quick build remember we'll also run view PDF or if I just want to view the last successful PDF I can click here and that popped open in Adobe Reader so there's my PDF I prefer to have the built-in PDF viewer because I'm constantly looking at my PDF I'm constantly compiling as I work to make sure that I catch any errors right when they happen so let me go back into my preferences and go back to that built-in viewer if you use something other than Adobe Acrobat you can always change the path here so click on this folder and then just go into your applications folder and find that executable file that will launch whatever PDF reader you have installed okay so let's move on to quick build actually nothing new to talk about here I showed you how you can change the setting but I'm confident that this is the one that most of you are going to want to use under the editor if you change the font family or the font size here it's not going to affect your PDF output it's only going to affect this little text editor part of your screen okay so it's not going to affect what's put on your PDF output document now for the purposes of this video tutorial I made my font size pretty large 24 point is pretty large because I wanted you to be able to see the text clearly when I'm working I normally work with it at size 16 so that's more comfortable for my eye and I can see more of the code on my screen this is normally the font size I work in but again you can change this you can make it smaller you can make it larger so when I'm recording videos I like to set it to 24. there are some options over here for you to consider word wrapping I like to have word wrapping turned on so in my text editor let's slide this over here uh we'll just slide that over some more when I get you know when I run out of room here it's just going to wrap down to the next line so I like that because I always want to see all of my code on the screen but it does make the this file take up a lot more space on the screen so if that's not something you want you can turn off the word wrap completion so this is that auto completion like when I started typing the code for a square root and it popped up the suggestion on how it thought I might want to complete that command then you just hit enter when you like the suggestion so that is um I find that to be a Time Saver I like having the completion turned on show line numbers is also really useful especially when you are trying to debug your code because an error message will come up and tell you hey there's an error on line 14 and then it's very easy to find that in your code you can just go right to line 14 and see the code you'll notice that some lines don't have numbers next to them and that's because of the word wrapping so this technically this part right here it's not going to let me click on it because I have this other window open this where it says to solve this is not a separate line it's part of the previous line so it doesn't get numbered as a new line versus this empty line here you know I had to hit return to get to this empty line and then return again to get to this line so even though there's nothing there this does count as a line number okay back over to our preferences here back up your document every 10 minutes you can certainly turn that on if that's important to you the reason I don't have that turned on is because when you do have this turned on then for all of the files you're working in it the compiler is going to or the program is going to create this extra file it's going to be also called tutorial 8 and it'll have the extension bank so in your folder let's see if I still have that fold yep in the folder here there would be another file that says tutorial underscore 08.bak and my folders I just feel like I have a lot of files them in them as is and I don't like having that extra file in there but it's no big deal if you want the safety of backing up your document every 10 minutes you can do that I almost always recompile more frequently than 10 minutes so it's not really useful for me because every time you compile it's going to save that file on your computer so that acts as backing up every so often as well now this is a good time to point out when I first launched this file these this tutorial8.aux.log and this dot syntax dot gz we're not here the only thing that was in here was this CMG project and then the tech file and the PDF but while you are compiling your file these other auxiliary files are being created these helper files are being created and they will stay in there and they will clutter up your folders and you really don't need them once I close uh tech maker I'm going to show you I'm just going to come in here and close tech oh it's not going to let me because I have this window open okay so now let me try closed techmaker and look those helper files disappeared that doesn't happen automatically that only happens because I set that up in my preferences to happen that way but it helps just clean up the folder so I don't have a lot of extra unneeded files cluttering up my folders so let me launch this again I'm just going to double click on this to open that up and if we look at that we see we just have these two files but now if I compile or I could have actually I could have stayed on this no I couldn't off there we go okay so now we've got all those helper files in there so how do we change that setting to get rid of those helper files when we don't need them in your preferences right here you're going to make sure this box is checked launch the clean tool when exiting techmaker so when you X Out of the program it's going to remove those extra files that are not needed okay so um we were looking at the editor window tap with number of spaces you can increase or decrease that as you like so that would be when I'm working on my code and I want to indent by hitting tab that's just how many spaces it will indent so you can customize that you can change the color of certain things so you'll have to know the hex code for the color that you want this is white so the background that I'm working in again it's not going to affect your PDF output it's just this editor panel here where you're typing your code if you want the white background there's a dark theme and there's a light theme so if you like working uh with like white text on a black background you can go with the Dark theme or I don't know if it's white text actually I don't typically use the Dark theme but right now the background color is set to White are the highlighted line I forget what color that is that might be correct I don't remember this is black this is gray um this is green so the when you're in math mode it's going to show up as green so you can customize that if you don't like the default colors you can come in here and change the hex code okay and then the shortcuts tab here is just going to give you a list of keyboard shortcuts and if there's something that you find you're doing frequently and there's not already a keyboard shortcut for it you can add a keyboard shortcut for it so the things that say none you can click on that and then you can Define your own custom keyboard shortcut all right so that takes care of preferences and we've looked at the this toolbar uh we sort of talked about the important stuff on this toolbar what have we got up here so tech maker this is where we found preferences if you're on the Windows version you may have to go to options to find preferences at least that's the way it used to be but on the Mac it's tech maker and then preferences file we've got uh standard stuff here edit these four commands are very helpful and I use the keyboard shortcuts for these all the time so if you want to comment out a line let's say for example I don't want these last four items in my list to show up on my PDF I can use the keyboard shortcut which is command T and it's going to put a percent sign at the beginning of each line and so by line I mean the number line is where they're numbered and then when I click off of that you'll see that it also changed the color to gray so it that's another indication to me that something is commented out and what we mean by commented out is that the compiler will ignore that line of code it will not even consider it when it is running your code it's just going to ignore it when it gets to that line that's been commented out so one use of commenting things out is you know maybe you don't want something in your document let's compile so there I just got rid of some of those questions but you don't want to delete it because maybe you're uncertain and you're you you want to show it later on so I do that sometimes when I'm writing a quiz or a test I have a question that I decide to Omit but I don't want to delete it because I think well maybe in the future or if I'm making um a makeup test I might want to then turn on that question so that's a good way if you're troubleshooting and you're trying to figure out where an error is commenting out a bunch of lines can really help you pinpoint exactly where the problem is and help you fix it now to undo that to a bunch of lines at once we can use the keyboard shortcut command U and that will make them all visible again another use for comments is just to leave little reminders for yourself especially when you're first learning latex maybe you don't you know remember what a certain piece of code means this for example on line three will remove paragraph indenting so I could leave a comment here for myself I just go to the end of the line not the beginning because then I won't run the code at the end of the line time type your percent symbol and make a note so this will remove the indents and it doesn't necessarily have to remove the indent but the zero is going to cause it to have an indent of zero space so I could put a number there instead if I wanted 10 ex is a unit of measure then that would give me large indents but I typically turn off indenting in my documents so another good use for comments there indent indent indent and unindent would be not for the PDF output not to confuse you because I was just talking about indenting here this is the code that will affect the indenting in your output document but sometimes you want to indent your code so maybe we want to indent these lines right here I can do that all at once if I hit and I'm on a Mac so it's command shift and then the right angle bracket and that will indent if I hit it again it will indent more so it's a good way to organize your code make sure things are lined up that all belong together and you can undo that or reverse that by command shift and then the left angular bracket and again if you forget the keyboard shortcut you can always just access it from the menu here or you can look and see what the keyboard shortcut is from the menu here under the latex menu here you've got all kinds of different options if you forget the code for something you've got it right here you can just click on it and it'll insert the code for you I don't know where my cursor is at the moment let's put my cursor in a good place well we'll just put it at the end of that sentence there okay so one that I find hard to remember I have a lot of this stuff memorized but one that I find hard to remember sometimes are the international accents and this comes up when I'm trying to type l'hopital's role so for low vital's role we need a special accent over the O and this is the command right here just put an O there so it's capital l apostrophe h o but it's the accented o will be tall and then let's build that and we can see it right there it's got the special accent over the o so the pull down menus are great for things that you don't use too often you don't remember what the code for them are it is our math we have other menus here if you just kind of hover over you'll see what's available there the wizard is cool um let's I'm going to just close this document I'm not going to close tech maker I just want to close this document and let's start a new document so this old PDF is just hanging out over here just because I haven't recompiled something yet so let's start a new document so I'll just click the new and you know we can start from scratch or we can use this wizard to get started quick start it's going to ask me for some basic settings we want uh and to use the document class article if you're doing a slide presentation you would use Beamer but we have article and you've got some options here you don't have to use any of these options you can ignore that if you don't need it I don't see anything here that I want you can decide if you want to go 10 11 or 12 point let's go 12 point just so this is a little bigger for the video paper size you can choose the size of paper that you would be printing on so in the US we use letter paper the author if you want to include that if you know that you want to include your name in your document you can do that if you know the title of your document I mean you probably do this one that we're working on is critical thinking question or we'll just say IB math analysis and approaches HL okay geometry package do you want to load the geometry package that's pretty useful and then you can specify all of your margin sizes although I don't like the ones that are being offered here I would prefer one inch margins and if I don't want to if I want them all to be one inch I can just say margin equals one inch AMS packages absolutely I always include those the graphic X package if you're going to have images in your file so that one is useful and that's all I need I'm going to hit OK and I've got some basic stuff here to get me started I usually like to space out things a little bit here after my packages I'll leave an empty line okay that looks good and if this I don't know what's going to happen with the dot here let's see if we get an error yeah we do oh for but for a different reason it won't compile your document if you haven't saved it and named it so you got that could not start the command error it looks like hey I have code here why aren't you compiling it and it looks like it has a name but it actually doesn't I have not saved this file yet and named it so we have to do that so do file save as and then sure let's keep put it in the same folder tutorial underscore 08 B and we'll save that okay so now my file is named never never never never use spaces in your file name you'll notice I put the underscore there instead of typing a space do not put spaces in your in your Tech file names or your image file names it can cause issues okay now let's see if we can if this dot is gonna still result in an error it does not okay so sometimes people message me and they're having and they did something like this and then they try and compile and they get an error oh now it's not going to work because it still remembers this but if that happens to you the reason that you're getting a compiling error here is because you haven't actually typed anything between your begin document and your end document it looks like you know you have typed a lot of stuff up here but this is what we call the Preamble the part of the code that comes before begin document is just your Preamble it's like pre-setting certain things up and you can't run the code unless you actually have something in between your begin and end document so even if it's something simple like hello and then we can run that and no issues there okay so quick build not quick build the wizard quick wizard quick start there we go quick start can be helpful way to get you started from a blank document and you've got an option to do a quick start for a beamer presentation and some other options as well if you want to insert a table you can also use the wizard there quick tabular is going to bring up this window and you can enter how many rows and columns you want in your table and you've got other options here if you want to align the contents of your cells left right or centered or if you want them to be in like paragraph form if you're not entering numeric values if you're entering text you might want to switch to a paragraph and where you define the width of your columns there you can also merge some columns and decide if you want a border on the left and the right and at the top and at the bottom so you can have all of those or none of those or some but not all and you can check what you want there um you can add a vertical margin for each row if you want that and when you click on okay you can even come up here and type I think can you type contents yeah absolutely you can even type the contents of your table now that should be in math mode so tables can be a little bit tricky to code by hand so that's not cooperating so this is really nice to have sort of a visual way to create your table and then you hit OK and it's going to insert the code for you at least it's a good way to get started you can add more columns you I mean you can obviously edit this table now in any way that you like so let's take a look at that there we are it's pretty simple what else are we going to look at under user I want to show you this this is super helpful I use this all the time you can store bits of code and then just call them up instantly so this is really great when I am let's see which one do I want to look at well if you want to add your own you're going to go to edit user tags and then click on one you can only store up to ten so click on this one is empty we could do a new one here or we can just look at something I already have so this is something that I use often and I'm certainly not going to have this code memorized but this is going to insert a little calculator symbol so I often do this next to like calculator active problems if I'm assigning homework so I have this stored Under menu eight and I can type the code let's say um I want the little graphing calculator symbol right here so the command is slash calculator and then I need to put the code for that in the Preamble so I'm going to come up here now I can come up to user user tags and then just either click here for calculator icon or if I know the keyboard shortcut it's just shift F shift f8 so I can just do shift f8 and that inserted all of these lines of code here for me so I don't have to have them memorized now I have lots of little code Snippets that I use over and over again and I only have 10 slots to store them here in techmaker so what I actually do is open Google Keep and I store all of my code snippets on separate little Google keep notes and so I can always find them easily there as well that's another tip for you okay so that is looking good and now when I run this I've got my little calculator symbol in front of hello okay view you can turn on and off different uh toolbars options help so notice under help you do have access to a latex reference and a user manual the user manual is going to help you with tech maker specific stuff that opens that up in a separate window here but you can learn all about tech maker and the different options and if you're having trouble with some aspect of tech maker that can be helpful you also have the latex reference which you can look up different types of commands so if you want to learn more about equation arrays you can click here and then read more about equation arrays and get some sample code and some explanation on how that works or any packages you might need like this one it tells you you have to use the AMS math package if you're going to use in equation array so that can be a great resource for you as well okay let's switch over to overleaf and I'll show you how to do a few things here so I am logged in if I want to start a new project I'm going to click on new project blank project notice that there are lots of templates available though in the and overleaf has a template library with with tons and tons and tons of templates that you can use so which is really great if you're typing up a science lab report they have some templates that you can start with resumes all kinds of things but we're just going to go with blank project and we will again call this tutorial eight overleaf and that's just the title of the project but notice that when we create this that's not the title of the file I told you never never put spaces in your file name and I did put spaces in the title but that is not the name of the file the name of the file is what we see right over here main.tech and I always recommend to my students when they're using overleaf to change the name of that file because every time you start a blank project in overleaf it's going to call the file main.tech and so it just gets confusing when you have lots of files that are different but they're all called main.tech so I always recommend renaming that we'll call this tutorial 8C there we go and you can um in this this pane is like the structure pain that we had in Tech makers so if you do add more files to this project they will appear in the list here if you want to go back to the main menu you would think that you should click on menu but that is actually not going to take you back to the main menu if you want to go back to the main menu you click on this Arrow right here and that's going to take you back to this main screen here so now to go back to my project I can just click here and we've got some basic code here to get us started if you don't like what's here you certainly can type over it or delete it and start with something else you can if you're loading a template you'll have lots of code in here for you and you can just edit it as you need to so I'm not going to do much with the code I just want to point out where certain things are in overleaf and also show you how you can download copies of your Tech file and your PDF document in case you need to send it to someone or submit it to your teacher this panel right here is just like in techmaker is where we're typing our code and you have the option to switch to the Rich Text Editor I don't recommend this but I guess it can be helpful if you're really you know kind of unsure of what something is going to look like and maybe it's not compiling because there's an error this might give you an idea of what your work is going to look like but I recommend sticking to source and just working with the actual code here when you're ready to run your code you're going to click on recompile and then it will refresh and show you your PDF output over here on this panel if you are working on a small screen and you you know this is very tiny and you can't see it very well you can also collapse some of these paints so you can click on right here to go full screen and now it's just the PDF so you get a nice big zoomed in view of your work and then you can go back split screen you can also drag this separator to the left which will increase the size here and has the same effect as zooming in or you can drag it to the right this side will get smaller this side will get larger so you have some options there you can also close these panels using these little arrow symbols right here so now I've hidden that PDF panel and then I can bring it back like so if you want to share your document and have multiple people working in this same document you can do that so here's what I recommend for my students when you want to share a document don't use this option here where it says share with your collaborators I mean intuitively it seems like that's what you should do right you type in someone's email address and then you share it with them well in the free version of overleaf you are limited to how many people you can collaborate with and so another option instead of doing that would be to turn on link sharing up here turn on link sharing and then anyone with the link can edit your project if you share this link with them or anyone with the link can view your project if you share this URL with them okay so if you are working in a group of four for example this is the way you want to go turn on your link sharing anyone with the link can edit the project send your collaborators this link and they will all be able to work in the document with you you can also turn on chat and so if multiple people are working in the document you can have a chat message going on about certain things you also have the option of commenting commenting in techmaker is gray when you comment here in overleaf it's this bright blue so it's really easy to see the con actually I like that maybe I'll change that in my tech maker and make it blue instead um so it's easy to see comments that's another way you can communicate with people is by leaving comments in parts of the code but the chat is another option for you okay let's say you're done with your project and you want to download a copy of your PDF so that is very easy to do you just click on this icon right here and it downloads the PDF for you and then you can open that on your device and it'll open in whatever PDF viewer you normally use there's my PDF and it downloaded it by default into my downloads folder so I can find it there on my computer if you want to download your Tech file that is not quite as easy in fact it's much more difficult to do that especially for my students who are working on a Chromebook but if you want to download your Tech file you're going to come over here and click on menu the thing that you think would take you back to the main menu but it doesn't so click on menu and then you've got two options here if you click on PDF it's going to download the PDF but frankly the other way to do it was easier or you can click here that says Source that's what you're going to want to do you want to click on source and it's going to download not your Tech file it's going to download a zip folder and in that zip folder you will find any of the files listed here so if you've uploaded images or you have multiple text files here or whatever files here any files you have here that are associated with this project when you click on Source it's going to download all of them in a single folder and zip that folder and send you the zipped folder so that folder is called tutorial 8 overleaf that's the title of my project dot zip now on a Mac this is really easy to deal with so I just find it I just clicked on on that and said show in finder but you can also just go to your downloads folder and it's right here tutorial 8 overleaf.zip all I have to do on my Mac is double click on that and it unzips it and actually when there's more than one folder it looks a little different so let's let's go back here and add something let's add an image in here I'm going to upload and I'm just going to drag an image from my desktop okay so I've added an image here and I warned you not to have spaces in your file name so I'm going to rename this okay so now I have an image and a text file and I'm going to I want to download at least my tech file but really it makes sense to download both because no one can run your Tech file if they don't have a copy of the image you'll get a compiling error okay so let's try this again all I have to do is click on this and it's going to this was the zipped file I already had one with the same name so that's why I put the one at the end this is the zipped file and when I double clicked on it it unzipped it or sometimes we call that extracting but now I just have a regular folder this is not zipped anymore so when I look inside that folder I see all of my individual files I've got my tech file and I have my image file what I don't have here is my PDF this doesn't make sense to me why don't they just don't also include the PDF as part of this that would be nice but you you if you need both you're going to have to download them separately okay so now you have access this is in my downloads folder I can move it anywhere else I want to on my computer I can upload it into Google Drive I can upload it into my learning management system like canvas or really I can do anything I want with it and to get back to our Tech file just click on it and then that will make that the active file again so I think that covers everything I wanted to show you in overleaf and I hope you're able to use some of these tips to help you work more efficiently hello and welcome to another video in my latex tutorial Series today we're going to be talking about some common notation that you would see in calculus such as limits integrals summations and Vector notation I'm starting with a very basic setup all latex documents start with the command backslash document class and I've set this one up to be 11 point and the type of document is an article the only package I'll be using for this tutorial is the geometry package and that is simply to adjust the size of my margin so that is optional you don't have to use that the body of our document will type in between the commands slash begin document and slash end document I'm going to begin by identifying the domain and range of a function the function and now I want to enter Math mode so I type my dollar sign f of x equals and in parentheses I want x minus 3 squared so I raise that to the power 2. plus one half backslash frac and tech maker is going to fill in the rest of the command when I hit enter and I can tab to get to the next part and move my cursor outside of the braces and let's go ahead and compile this and make sure it looks the way we expect remember when you open a new document you must save it and give it a name before you try and compile it or you will get a compiling error now I usually hit F1 as a keyboard shortcut to compile my document but for the sake of the tutorial I'll probably move my cursor up here and build it by pressing the arrow that looks good we have the function f of x equals the quantity x minus 3 squared plus one half so I'm going to continue typing has domain and now to describe the domain I want to name it with capital D and I'm going to go into Math mode I want a subscript of f because it's the domain of function f colon and the domain for this function is all real numbers now we do have the option of using the symbol for all real numbers but I'm going to use interval notation so our domain goes from we're using it's an open interval so parentheses negative Infinity negative we're just typing the minus key on the calculator for the infinity it's backslash i n f t y That's negative Infinity comma and now I want positive infinity or just Infinity so backslash i n f t y close my parentheses and let's end Math mode and compile that see what it looks like okay now the one thing I would like to change is the D I don't want it to be italicized because it's in math mode letters are always going to be italicized but I can make that not in italics if I come back to my code and I type I basically wrap it with the tag math RM so backs go move your cursor in front of the D backslash math RM and then the curly brackets around the D now when we compile it our D should not be italicized but the F still is because it's outside of those curly brackets so let's finish by describing the range so the function f of x has domain from negative Infinity to Infinity and range so I'm going to do something very similar here I'm going to use a capital R for the range so I'm going to go into Math mode but I don't want the r to be in italics so backslash math RM and in tech maker you can see it's trying to complete the command for me so if I hit enter it'll type the braces for me and I can just type my r r in the center there and use the right arrow to come out of the braces we want the subscript of f colon and now our range goes from one half to infinity and I do want to include the one-half so I'm going to use a square bracket around the one-half to get the one-half I'm using the command for a fraction comma Infinity so backslash i n f t y open parentheses close Math mode now let's typeset that and I have a feeling I'm not going to be happy with the way it looks let's try okay so what I'm not happy about is the square bracket here it's not large enough to surround the fraction one-half so I explained this in an earlier video on delimiters but if we want to expand automatically expand the size of the brackets or braces or parentheses then we can change the command slightly so I'm going to find where those where that bracket is so right here I'm going to put my cursor in front of it and I'm going to type slash left and that is going to expand automatically fit that bracket to the size of what comes after it and then the parentheses on the right I also want to insert my cursor just before it and Taps type slash right so if you use the slash left then you have to balance it somewhere with a slash right the compiler will be looking for that okay so now we can see that both of those delimiters have expanded the other thing I might want to do notice that the one-half is smaller than the three this has shrunk it to fit neatly on a line because it's in line if we wanted that to display at full size we could go back and use the display style command this doesn't bother me I think it looks good the way it is so we'll see how to use the display style in a in another example here in a moment let's move on and look at how we can type a limit and I'm going to go ahead and end this with two backslashes to give myself some more space and to type a limit the basic command in math mode is backslash l i m if I just end Math mode here and compile you can see all we get is Lim and even though we're in math mode these letters are not in italics because the compiler understands that this is a special string of letters now we want to adjust this we want to take the limit of something and we want to take the limit let's say we want to take the limit as X approaches a I'm going to use another command backslash limits and that is going to be followed by I'm trying to get as X approaches a so underscore and then in curly brackets I want to type X and then an arrow and then a so the symbol to get that right arrow is backslash 2 t o a and I'm going to close my curly brackets and now we should see when we compile it the limit as X approaches a okay if I did not use this limits take that out and recompile as X approaches a will not be underneath the Lim it will still be a subscript because we used that underline but it's going to appear to the right which you may want I don't like it like that so I'm going to go ahead and put the backslash limits command in front and now the X approaches a will be underneath the word limit if I want to take the limit and we have to take the limit of something so let's come back and add our function in general let's just call it f of x so we want the limit as X approaches a of f of x if I want to take the left hand limit the limit as X approaches a from the left I just come back to my code and after the a use the carrot you can type a plus if you want to approach from the right hand side if I want to approach from the left hand side I'll type A minus okay let's do one more example with limits we want the limit so backslash Lim and to make the notation look a bit nicer I'm going to use backslash limits underscore and I want again just the limit as X approaches a so in my curly brackets X backslash 2 t o the limit as X approaches a close my curly brackets and this time I'm going to use the definition of derivative at a point so the limit as X approaches a of now I want the fraction f of x minus F of a over x minus a so backslash frac in my numerator that's the first set of curly braces or curly brackets we're going to type f of x minus F of a in the denominator so this goes in the second pair of the curly brackets x minus a and that let's come outside of the brackets there is equal to F Prime of a so F and I'm just hitting the apostrophe for that Prime symbol of a close my math mode Let's compile this and see how it looks all right I forgot to end my line with two backslashes that'll give me a little bit more space in between there now this looks good but the fraction is displaying rather small and that's because it's trying to fit it nicely in with the line but I want to make it look normal size so I'm going to come back to my command and wrap the entire thing with display style backslash display Style curly bracket and then at the very end before the last before I exit Math mode put the closing curly bracket and let's compile this again okay so now the fraction looks much larger same size as the rest of the notation and that line with two backslashes and now let's look at how to type set in integral in math mode we're going to start with backslash int for integral let's take the integral of sine of x now if I just type S i n when I compile that it's going to be italicized I don't want that so for sine cosine tangent all the trig functions we do backslash first so backslash s i n of X and that should give me the integral of sine X now I also need my DX I can type DX just like this close Math mode Let's see what that looks like now notice that the X and the DX are kind of look like they're running together there so what I like to do here is just force a space to be inserted between those because remember just because you type type a space over here in the code doesn't mean it's going to appear as a space when you compile your document but to force a space right there I'm going to hit backslash comma so let's compile that and see if it makes a difference okay good so now there is a space between my X and my DX now if you don't want the d italicized we saw as we did when we were typing domain and range how we can wrap that lowercase D with the backslash math RM tag and it wouldn't be italicized but the italics don't bother me with the DX so I'm going to leave it like that let's go ahead and solve this integral so the integral of sine X DX equals negative cosine X so I'm going to do backslash cosine X now let's talk about spacing for a moment over here I left a space in between or in front of this slash sign that's optional I didn't over here but I did leave a space between the S and the X here otherwise the compiler might get confused and think your command is backslash cos x all is one thing so we want to separate that with a space and let's not forget R plus C very important and we'll compile that and there we go if I want my integral sign to be longer so when you see it in a textbook you see it online usually it doesn't look that short and it's shrunk here to kind of make it fit in that line neatly but we can expand that simply by using display Style so backslash display Style curly bracket and then just before we end math mode put the closing curly bracket and that elongated that integral symbol next let's look at a definite integral so we also start with backslash int that's the command for integral but this time we need to show that we want to take the integral from A to B now I can simply use an underscore and type a carrot B let me close Math mode and see what that looks like okay so that gives me the short integral but it is going from A to B and my lower limit and upper limit of integration appear to the right of the integral symbol we can also use backslash int with the backslash limits command underscore a carrot B and now we have an integral where the A and the B are not to the right of the integral symbol but they're above and below the symbol so you can decide which one of those you prefer if you want the integral symbol elongated simply wrap it with display Style I'm going to just copy those last two commands and we'll see what they look with display Style in front okay so we get logger integrals which sometimes looks nicer let's continue working with our definite integral to talk about some problems you may encounter along the way if you're one of your limits is more than one character then just using the carrot is not going to be sufficient so for example let's say for some reason you wanted to go from 2A to B let's see what happens when we compile this okay that's probably not what you were expecting to see so the what we're going to do to fix this is after the underscore the lower limit you want to wrap that in braces or curly brackets and then we can do the same for the upper limit now if it's just a single character it's not going to be a problem but if you have more than one character you will need to do that so just to be on the safe side you can always use the curly brackets then you shouldn't run into any trouble there so now we have our integral with the lower limit of 2A and the upper limit of B let's go back to Just A and B I'm going to keep the braces okay now I'm moving my cursor in front of the last curly bracket because that goes with the display style command so let's take the integral of something let's take the the integral of x squared DX and remember I want to insert a space just typing a space is not going to insert a space when I compile this so I'm going to use backslash comma DX and we'll compile that make sure it looks good so we have the integral of x squared DX from A to B and that is equal to now there are a couple different notations you might see for evaluating a definite integral I usually use the square brackets around the expression so I'm going to type the square bracket for the left side when we integrate this the antiderivative for x squared is X cubed over three so I could write 1 3 x cubed I'm just going to go ahead and write X cubed over 3 so I want the fraction x cubed over 3. because this is a definite integral we need to input our lower limit and upper limit so let me end with a square bracket and then to get my limits on there I'm going to use the underscore and then lower limit of a carrot upper limit of B so again if it's a single character you don't have to wrap it with the curly brackets but to be on the safe side we can go ahead and do that and just so you're familiar with the notation okay now let's see what we what that looks like because I have a fraction I have a feeling I'm not going to be happy with the brackets okay so the lower limit and upper limit do appear in the correct place in relation to the bracket but the bracket needs to be expanded to the height of the fraction so I'm going to go back where I typed my opening square bracket and in front of that backslash left where I typed my closing square bracket in front of that I type backslash right and we'll compile that and that looks much better and let's go ahead and finish evaluating our integral here so that is equal to backslash fraction B Cubed in the numerator over 3 in the denominator and I need to move my cursor to the right so that I'm outside of that first fraction and now it's minus we plug in our lower limit of a so I need another fraction backslash Frac our numerator is a to the power 3 denominator 3. let's compile that the next thing we're going to look at is summation notation to get the capital Sigma we're going to use the command backslash sum if I compile that it's going to be pretty short so usually that is written much larger than the text beside it so we can make it larger using display style backslash play style curly bracket and we go to the end and put the closing curly bracket if I compile that now you can see the size is much larger we want our sum to go from n equals 1 to Infinity I'm going to use backslash limits so I'm going to use then an underscore and on the bottom I want n equals one that's not a single character so this time I have to use the curly brackets n equals one close the curly brackets use the carrot and now we're going to type our upper bound so this time I want to go to Infinity so in the curly brackets I'm going to type backslash i n f t y and close the brackets let's compile and see what we have there okay so we have the sum from n equals 1 to infinity and let's keep going with that I need to be in front of the last curly bracket because that closes the display Style and we want to take let's see the sum of let's do geometric series a times R to the power n and that is equal to let's go ahead and compile so we can see where we are I'm going to go ahead and expand that sum so that is equal to a plus a times R Plus a times r squared Plus now I want dot dot dot plus my nth term a times R to the power n let's compile and see what we have I have the dot dot dot but the dot dot dot should be centered vertically so that it's kind of aligned with the horizontal crossbar of the plus sign and instead of typing dot dot dot there's a command for the three dots I don't need to insert space between it but just to keep the code nice and clean I will and that command is slash if you just want a single dot it's C Dot if you want the three dots put an S at the end backslash C Dots so when I compile this those three dots should be vertically Centered for our next command we're going to put all of this stuff together and give the definition of a Riemann sum using a definite integral so let's open Math mode and the first thing I want to type is the definite integral of f of x from A to B so we're going to do display Style open curly brackets I'm going to go ahead and end them and end the math mode and then just type in between those brackets so we're starting with an integral so backslash int underscore and then a carrot B my function will just be f of x and then to insert a space here backslash comma DX equals let's compile just make sure we don't have any errors to this point and everything looks the way we expect okay with the integral from a to b f of x DX is equal to now we want the limit as n approaches Infinity so backslash Lim I want to use backslash limits so that the X approaches Infinity part appears underneath the Lim so underscore curly brackets X and then to get the arrow backslash 2 to Infinity backslash i n f t y closing curly brackets so that should say the limit as X goes to Infinity let's compile make sure we're doing everything correctly that looks good let's put my cursor back in front of the last curly bracket because we still want to be working inside of display style now I want the sum as K goes from 1 to n so backslash s-u-m backslash limits underscore and I want k equals 1 on the bottom so in curly brackets k equals one close that carrot on the top I just want n the curly brackets are optional since it's a single character so let's make sure we have our sum displaying correctly good now we want to take the sum of f of x sub K so X underscore K and I don't think I need to expand the parentheses we can see what it looks like when we type set it times Delta X now this is optional but I'm going to go ahead and put the dot to indicate multiplication so backslash C dot that will be a single dot centered vertically and I'm multiplying that by Delta X now to get the Delta symbol for those Greek letters it's backslash and the name of the letter but if I just type all lowercase Delta X I'm going to get the lowercase Greek letter so let's see what happens there okay so I've got my f of x sub K the parentheses look fine I don't need to expand them I've got my DOT and that is not what I wanted to see for Delta X so the Delta symbol the triangle is actually the capital letter in the Greek alphabet so we're just going to go back and instead of lowercase T it's backslash Delta with an uppercase d and pile that again and now I have my Delta X we have one last thing to look at that you might run into in calculus notation and that is vectors so to get the vector symbol it's simply backslash v e c and then in curly brackets what you want to put the symbol over so I'm going to call this vector v ector V is equal to and let's do the IJ notation so we have our first component V sub 1 times Vector I so backslash v e c Vector I plus v sub 2 so V underscore 2 times Vector J so backslash v e c and J in the curly brackets and that is equal to if we want to write this in component form I like to use angular brackets so it would be for the left angular bracket it's backslash l angle and that's going to insert the bracket so now we need our first component V sub 1 comma our second component V sub 2 and then we want the closing bracket the right angular bracket so backslash r angle and that should do it let's close math mode compile and see how that looks and I forgot to put two backslashes earlier to give myself a little more vertical spacing okay that looks good so vector v equals V1 times Vector I plus v sub 2 times Vector J we're in component form just V1 comma V2 in the angular brackets and that concludes this tutorial on calculus notation\n"