Learn LaTeX in 10 minutes - Intro for beginners. All you need to know.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video i'm going to teach you how to get started with latex we're going to create this nice document which has a title the author name the date and then is divided in two sections then we have paragraphs we have math equations we have figures we have also tables list and we are also able to format the text here so we have bold text italic text and we have underlined text i'm also going to show you how to add references to your document if you find this video interesting you can learn more about latex by looking at my lytic playlist on youtube i have more than 30 videos on youtube for free that you can check out and in which i explain how to compile a lytic document for instance with vs code how to convert a markdown file into latex how to write beautiful matte equation page numbering cross referencing table section chapters figure superscript footnotes auto annotate figures and so forth if you want i also have a tutorial on how to write a paper using the severe template and 10 reason why you should use latex and you should switch from word to latex this video tutorial is going to be mostly for beginners but also if you already started using lytic you might find this tutorial useful because i'm going to cover some key concepts which all of you must be familiar if you want to use latex in an effective way in this tutorial i'm going to use overleaf because i think it's a great tool and it's free online that you can use to simply get started with latex one of the major barriers for users to get started with latex is that you have to install analytic compiler on your computer because litec is a compiled language which means that you have a source file as the one that you can see here on the left and the output pdf it's not like word that as you type your document get formatted this has some advantages and some disadvantages one disadvantage is that you have to install the compiler on your computer but overleaf fix this problem so you can use overleaf online for free completely free to create and compile your letter document which i think is great before we get started i just would like to take a second to ask you to like this video if you're going to like what you're going to hear in this video and if you want to support this channel you can also subscribe to my channel and press the notification bell if you want to find out more when i release new video on a similar topic let's get started so in order to start with overleaf you can create an account for free online and then you're going to see a landing page which is going to be looking like this one they may change it in the future so we just have to click here on the top left new project and we're going to create a blank project and we're going to call it latex in five minutes and we're going to click on create this is going to create our project for us so you have a main.txt file which is your main file that your latest compiler will compile usually is called main.txt in overleaf you can see the pdf on the right side of the screen while your source code here on the left let's see how a latex document is structured because that's a key that you need to understand before you get started with litec so here at the top from line one to six we have our document preamble here we define a type of document that we want to write for instance in this case we want to create a document class called article so document class is a command that has to be always there at the beginning of your related document but you can change the article you are not limited to have an article but you can have a different type of document class an example are book reports slides and letter you can even have a beamer presentation i have a tutorial on that then here after document class article here we are importing the packages at the moment we are all importing these infotech use package which is going to allow us to use utf-8 after that again in the preamble we can define the title the author and the date usually commands in latex are a backward slash followed by the name of the command in this case is title and then we have curly braces and inside we have the text or the argument that we want to pass to that command so to write a title we just have to write backward slash title curly braces and inside here is the title of our document in the same way we can also define the author and finally i can define the data after the preamble we have the begin document environment the environment allows us to create both the document as well as special content so we are going to see how we're going to leverage this begin command and the end command to create table figures and also math equations so i'm going to explain later on how to do that inside the begin environment we have the make title which just prints the title and then we are defining one section so the begin document and the end document have always to be there and usually your text file which is the extension of analytic file always ends with end document well it always start with the document class article if later on we want to import other packages we can just define them here so let me copy some text here after this section as we saw before to create a title we have the backward slash followed by title to create a section is the same is a similar approach so we have backward slash followed by the command section curly braces and then we define here inside the curly braces what we want to appear in the name of the session which is going to be introduction so i'm going to copy some placeholder text in order to see the changes reflected in your pdf you will have to hit on recompile here every time you want to see the changes you have to recompile the document if you want to add a subsection it's pretty straightforward so we have a backward slash followed by subsection and then background and inside here we can copy some other text in latex if you want to go into a new line you have two ways either you leave an empty space between the period and the new sentence alternatively if you want to be more compact here you can add two backwards lashes and as you can see even if this line here is on the same line as this document and this period here since we have added two backslashes then this sentence here is going to be into a new line in latex of course you can also format the text as you would do in word so for instance that let's say that you want to add some bold phase text you can do so by using this command here which is text bf which stands for bold face and again we have curly braces and inside here we have the text that we want to have in bold similarly if you want to add some italic text we can use this command here which is backward slash text it and then followed by italic we can also use the command underline which is going to add an underline under our text latex is extremely powerful because it also allows you to add the cross references let's say that we want to reference this section here we can just add this command here which is labeled and then we have to define how we want to call and label this this section in this case i'm going to call it the sec semicolon and then we're going to call it the intro later on in the document we can use the ref command to reference that introduction section and we can just add the id that we have defined here at the top here inside the ref command as you can see now we can reference that section if you add now a section before the introduction automatically we'll update this section number here to add the math equation we just have to wrap the text that we want to show in the math equation with a dollar sign a single dollar sign will show the equation inline a double dollar sign will show us the equation in a new line but many of you may not like this they want to have also a numbering of the equation however in order to do that we need to import a package we are going to add this package here in the preamble at the top this is going to allow us to write an equation and to add a numbering equation are usually wrapped in equation environment and inside here simply we can just write the equation itself we don't need to have the dollar symbol any longer so as you can see i've added a label which i'm going to call it equation semicolon cubed and then i'm going to reference this equation in the text i've added this text let me add it into a new line and i'm saying as shown in equation and then here we have the reference which we have equation cube and we're referencing this equation here so if you're writing this line here as a continuation of this line you may have that this equation and the error and the respective number are breaking across the line so one good thing to add is to add the unknown breaking space so after the equation here we can add the tilde which is this symbol here which is going to be a non-breaking space so the word equation and the number 1 or the respective number will always be together if you want inside an equation you can also add the different symbol in this case if you want to for instance we are adding the pi symbol and i also created another math tutorial on how to create a equation in a very simple way to add figures we can use the same approach that we use to create the equation so let me create another environment which is going to be in this case figure so we're going to create the figure environment and overleaf is quite handy is adding some boilerplate code for us which otherwise you'll have to enter manually and of course you can modify this so the first thing that we are adding here inside the begin figure environment is the centering because we want to have our figure center inside the page then we are using include graphic command which we are going to have to import a package at the top and i will show you in a second then we are adding a caption to the figure and automatically overleaf is adding a label with to our figure with the same convention that we used before in the preamble we have to import a new package which is called graphpix so i'm getting this beautiful picture from a splash and i'm downloading it in my computer i rename the figure to mountain and i can go here and i can click on upload and this has added the mountain file to our document inside include graphic we are going down to type the name of the figure no need to specify the extension of the figure latex will figure out that for you as you can see now we have a problem with the figure the figure is too big and we cannot see in our document is taking too much space we can fix that by adding an option here include graphic you usually add option by using a square braces and inside you're passing the option in this case we want to have that the width is equal to the text width of our document this is going to fix the figure so now it's in the right shape and is also maintaining the aspect ratio as you can see our figure has a caption and then as we did before with the reference we could reference this id here in the text and we could reference our figure let's now add a table to our document so in order to add a table we can say begin and then here we can add a table and this is going to add a table for us table are a little bit more complex in latex but basically you have the centering command as we had before in order to have the table center inside the table command we have the tabular command which inside here we are defining our table and then we have a caption and a label i'm going to add an adding and a few value so as you can see now i've added this heading here at the top and then i'm adding the item which is pasta and the price which is five five dollars people are as i said are a little bit more complicated and please check out my video if you want to find out more and if you want to better understand how to create table i think the best way to create tables if you are a python user is to export a panda data frame into a later table i think that is great and i have a video tutorial on that so check on my channel let me add some placeholder text that i want to show you an interesting thing here in the document i'm adding some placeholder text with this command the ellipseum and then this command here as you can see now we have our equation then we have our figure and then we have our table one thing that we can change before we move to the list is where we want this figure to be placed in the text by default the figure here as you can see is placed at the top of the page but we can change that if you want to after begin figure we can specify where we want this figure to appear so if i say h this figure will appear here or latex will try to put it as close as possible as where it is defined in our document so as you can see after our equation we have two paragraph written with the ellipsome package and now the figure has moved to here we can change the paper and we can have it at the top by using the letter t so the figure moves back to the top let me add a beginning numerator command this will allow you to add a enumerated list in your document as you can see here we have a numbered list so we have item one and item two how we define the items in the enumerated list we simply with this command here backward slash item if on the other end you don't want to have an enumerated list you can use the command itemize in latex we use the percentage symbol to annotate and to write comments so in this case uh the percentage symbol and all after the percentage symbol is not shown in latex we can easily fix that and this is a common mistake that you will get by just putting a backward slash before special commands so in this case if i recompile the document you will see that the percentage sign is going to appear so there are several ways to add references to your document but i think the best way or i would encourage you to use the bibliolatex package so the first thing that we need to do is here to define a used package bibliotheque the second thing that we need to do is to create a new file here and we can call it main dot bib the name of this file actually is not that important the important thing is that it ends in bib now that we have created this main dot bib file just right after the use package biblateque we need to import this file so to let clitec know that we are going to compile our references from this main dot bib file using this command add bib resource and then curly braces and then we have main.bib so you can find bibtex entry in different ways i think this website is very nice which is called crossref and it allows you to search for the title of the paper and this is a paper that i actually wrote you can click here an action and then cite and just copy this bib text entry another very easy way is to export the bibtex entry directly from mandalay in order to cite the document we can use a non-breaking space and then we can do site and then as you can see overleaf is smart enough to tell us the key so which key and what is this value that i'm actually adding here inside site is the key of our bibtex entry and the key is the first value here which is in this case my surname underscore 2020. so the end of our document using the command print bibliography as you can see we now have the reference to our paper here nicely formatted of course if i add more references to our document latex will automatically keep track of all the references and update the number for us i really hope you find this video informative and i really hope that now that you have an idea on how to use latex you will want to learn more and you will start using it for writing either your thesis a research paper or even a draft for a document i think is extremely powerful and i would highly recommend you to use it and as you can see it's not that complicated if you find this video informative please consider liking the video and subscribing to my channel it really helps me a lot if you want to support this channel and you like this type of videos please consider buying me a coffee or supporting me on patreon or joining here my youtube channel this will help me and in future i will be able to release more video like this one thank you very much for listening and see you in the next video
Info
Channel: Federico Tartarini
Views: 245
Rating: undefined out of 5
Keywords: latex for thesis writing, latex format, latex for thesis, learn latex, learn latex overleaf, latex introduction, latex introduction tutorial, getting started with latex, introduction to latex, introduction to latex overleaf, figures in latex, tables in latex, references in latex, references in latex overleaf, non-breaking space latex, create a document in latex, how to write a document in latex, latex for beginners, latex for beginners tutorial
Id: g0YdIs4oJm8
Channel Id: undefined
Length: 15min 7sec (907 seconds)
Published: Mon Nov 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.