Introduction: Tutorial on Latex

Representing your work neatly is vital component for building your project and we all might have felt the difficulties while writing a report and various aspects we gotta keep in mind while writing it so incomes LaTex. LaTeX, which is pronounced «Lah-tech» or «Lay-tech» (to rhyme with «blech» or «Bertolt Brecht»), is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

So why you should use LaTex instead of other text editors like MS word?

  • Dealing with mathematical notation.Layout and entry are generally easier using LaTeX than some other sort of equation editor
  • Auto insertion of Index. We know how difficult it is to to search for each images, tables of contents. LaTex on the other hand helps us to create it with just one command.
  • Auto formatting capabilities. It makes sure the font,spacing and such other criteria meet the standards

Step 1: Lets Start With Installing of the Software

There are lot of text editors which are available using which we can write document in LaTex but my personal favorite would be TEXMAKER as it is comparatively easier and runs faster compared to other text editors.

http://www.xm1math.net/texmaker/download.html

This is the link for installing of the software and its quite straight forward and is free of cost.

Step 2: General Introduction

This is the screen which you will get right after you install the text editors, there are mainly three different sections as you can see, the top left corner (1) is the place where it shows the flow of your documents showing all the sections and subsections in your document. the second top right corner(2) is the body where in you will be writing all the commands and the inserting the texts and the bottom right corner (3) is where you the status of execution and errors will be displayed. With this knowledge lets head to making our report

Step 3: Lets Start Writing !!

Before started the writing the code lets save the file in a separate folder on the desktop, this is very important step because any document , images which you will be inserting in the report should in this folder itself so keep that in mind.

(So here i have created the a folder called named tutorial with the latex file named demo as shown in the figure)

So now we are finally ready to make the report .

So the first command we use while writing a report is \documentclass[12pt]{report} ie we specify the document class and it varies accordingly, if you are writing a book there is different class , if you are making a presentation there is another class accordingly.

Step 4: User Packages

If the user finds such a refined class, all is well, but if not, the common way is to load a package (or several).

For example for adding an image into the LaTex document you need to use user package called graphicx

Similarly we will use bib latex for bibiliography, The listings package supports highlighting of all the most common languages and it is highly customizable,The cap­tion pack­age pro­vides many ways to cus­tomise the cap­tions in float­ing en­vi­ron­ments like fig­ure and ta­ble,English babel to tell that we will writing in english etc.

There are almost 4000 userpackages in the LaTex and you can use them according to your need.

So what is difference between class and package?

Sometimes it's hard to make a decision when it comes to choose whether to write a package or a class. The basic rule is that if your file contains commands that control the look of the logical structure of a special type of document, then it's a class. Otherwise, if your file adds features that are independent of the document type, i.e. can be used in books, reports, articles and so on; then it's a package.
For instance, if a company needs branded reports that use a special font and have the logo of the company in the footer; you need a new class. If the company needs a new command that makes easier to highlight important sentences within a document, a new package will work in this scenario.

Step 5: Chapter

Now to begin the document you to start with \begin{document}.

So now let us write about something let me take the topic as dog, Let us start by giving introduction.

So let us start the chapter by giving it name as introduction using the command\chapter{Introduction} and lets add little information in it.

So lets run it !

Yayy we got output you can see a pdf is generated with chapter auto numbered as one and introduction and content diplayed .

Step 6: Section and Subsection

So what if i want to have another section in the introduction part to describe the type of dogs?.

To do so we use a command called\section{Types of dogs} inside the flower bracket you can insert the headings. You can see from the screenshot that we got a section with the title types of dogs and LaTex is smart enough to number it as 1.1 that is why LaTex is so convenient to use !

What if i want to have subsections to describe few breeds of dogs?

We can do that using the command\subsection{}.

Let us write something about Labrador and siberian husky (They are my favorites).

And yeah guys you can have look at the code in the screenshot , this was a simple way writing a document on LaTex , there are lot of other stuff like adding images , header footer , listing which i would like to share it with you guys in the future

Hope you guys liked it :)