 Welcome back to the session on latex. In this session, we will learn to organize our content into different sections, sub-sections, paragraphs, etcetera. Finally, we will learn to create our table of contents. In the previous session, we created our first latex document. Now, sections help us classify the content in our document. It is associated with a document class and it has a level number. For example, see this. The slash chapter is at level 0 and it is available only in report and book class. Whereas, level 1 to level 5 are available in all the document classes like section, sub-section. You can include it in other classes as well. Let us see a demo. If you see, I already have some code written. I have saved my file in text studio as session 4 dot tech. Now, let us do one thing. I will delete this text. Instead of that, I will write slash section and I will name it as introduction. Then I will create another section called overall description. Now, let us create some sub-sections under introduction. Sub-section, purpose, another sub-section, scope. Well, let us build and run. If you can see, introduction, purpose, scope, overall description, each one has numbers 1, 1.1, 1.2, 2. Now, if you remember, I had talked about collapsible sections in as a feature of a particular text editor, latex IDs. So, if you see, if I hover my mouse over here, I can see that I can collapse a particular section. If I click here, I can collapse this sub-section. So, if I click, I am collapsing it. If I again click, I am expanding it. Now, there could be a possibility that somebody tells, overall description should appear first and then the introduction. So, what we will do? We will just cut this, we go on top and we paste it, build and run, voila. Overall description, see the numbering has also changed, it is so very easy. Now, let us add a paragraph. Since, I am little hungry, I thought of including something called as dhansak, a dish which is very popular, you can read it up when you want and I will paste it. I will build and run, if you can see, the paragraph on dhansak has appeared. Now, let us add a paragraph, slash paragraph. You can enter a title, I will prefer to delete it, I build and run. You see, it is now indented, earlier it was not. Now, let us add a chapter called overview, slash chapter overview, build and run. What do you think? Will it run? Nope. Why is that so? Because chapter is not there in the document class article, it is there only in book and report. Now, let us build and run and see the magic. If you can see, the book class appears in this fashion, wherein you have a title page at the front, you have page number 2 which is kept blank, then page number 3 starting with chapter name, chapter number, chapter name, overall description, introduction, purpose, etcetera. Now, let us shift, now let us shift back to article class and I will remove this chapter, I will build and run again, I have come back to my article. Now, do not you think, instead of deleting this chapter, if we were able to comment it, we were able to tell a tech that look, I do not want it to appear, just ignore this command and just chill. You can do that by adding comments using the percentage sign. So, now if I write the percentage, you can see the color, it has become gray and if I build and run, it will not throw an error. So, basically we have learnt how to add comments. Now, since this article is on Dhan Sark and it is by Wikipedia, so let me write Wikipedia as the author and I will say collated by Firuza, let us build and run, yes a latex document, Wikipedia collated by Firuza, but what if I wanted collated by Firuza on the next line? Let us take a next line and build and run, no difference, why? Because if you want to add a next line, you just write slash slash, no need to take a next line, slash slash creates a new line, yes. So, Wikipedia collated by Firuza and just remove the comma, it does not look good. Now, let us go back to the slides. You can try other commands as well, we have covered chapter, section and subsection and paragraph command. Table of contents is created using slash table of contents command, it is placed at the beginning of the document. So, you write the table of contents command just after make title. So, let us write it, text studio and I will write slash table of contents. I build and run, I build and run two times, the first time when I run it does not create a table of content, instead it creates a .toc file in your folder and then when you run it the second time it will take the content from the .toc file and it will displayed. You can ignore this as of now, you can just build it two times when you write table of contents command. So, you see the table of contents command has generated contents, it has one, two sections, subsections and the page numbers. Now, let us change article class to book class, build and run. This is a first page, second page is blank and the contents. Contents one, two, purpose and scope, did you notice something? What is 0.1 over here coming from? Another thing, the table of contents command has to be done one more time after changing the book class. Yes, so 0.1, 0.2, what is all this about? You remember if we had written chapter, so basically a book starts from a chapter. So, if you do not write chapter it will consider sections at 0. So, if I uncomment this, I build and run, build and run one more time, yes you can see overview, see the page numbers have also updated. Now, look at the page numbers, on contents page the page number is 3 which is centered. Now the page number is left aligned and it is on top because of the book class and when the chapter starts it is again in the center. Similarly, it will be left and right based on the odd and even page numbers. Now, let us switch back to our slides. You can try out this command and alias is nothing but something which you want to give a name for it. See for example, if you have a section or subsection or a chapter which is having a long name, pretty large name and you do not want it to appear in the table of contents. You write a acronym, a small alias in the box brackets in the section. So, I believe that now you are comfortable and confident of creating a basic article and a book using let it, thank you have a nice day.