L TEX Basic Introduction

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

LATEX Basic Introduction

Part 1
Sumit Kumar Pandey, Harsh Kumar Sharma and Rahul Kumar

30-09-2021
1 The First Sentence
This is the first section of current document inside section 1.

2 What’s in the book?


A book is usually divided into chapters and chapters are divided into sections, sections into subsections
and so on. LATEXprovides the following hierarchy of sectioning commands in the “book” and “report”
class:

1. chapter
\chapter{...}

2. section
\section{...}

3. subsection
\subsection{...}

4. subsubsection
\subsection{...}

5. paragraph
\paragraph{...}

6. subparagraph
\subparagraph{...}

2.1 Simple Typesetting


2.1.1 Spaces
You might have noticed that even though the length of the lines of text we type in a paragraph are
different, in the output, all lines are of equal length, aligned perfectly on the right and left. LATEXdoes
this by adjusting the space between the words.
Consider the following sentence:

The numbers 1, 2, 3, etc. are called natural numbers.

Spaces between the words are automatically adjusted by LATEX. However, to add a space between
words or letters, a backslash (\) is used. For example,

1 i\ s a natural number.

yields

1 i s a natural number.

Observe a space between “i” and “s” inside the word “is”. We use the command \ (that is, a
backslash and a space—here and elsewhere, we sometimes use to denote a space in the input, especially
when we draw attention to the space).

1
2.1.2 Special symbols
TEXuses the symbol “\” (backslash) for a special purpose to indicate the program that what follows is
not text. For example,

Maybe I have now learnt about 1%, # , ˆ, ˜of LATEX.

2.1.3 Text positioning


The TEXnical Institute

Certificate

This is to certify that Mr. N. O. Vice has undergone a course at this institute and is qualified to
be a TEXnician.

The Director
The TEXnical Institute

The Vice-president

2.1.4 Fonts
Paragraph Starts From Here. We can combine these commands to produce a wide variety of type
styles. For example, the input sans serif family, boldface series, roman family, medium series, italic,
small cap. These are some of the supported font examples by LATEX. More fonts are also supported
by LATEX.
We can now tell the whole story of the command (“\emph command”). We have seen that it usually,
that is when we are in the middle of normal (upright) text, it produces italic shape. But if the current
type shape is slanted or italic, then it switches to upright shape. Also, it uses the family and series of
the current font. Thus Check this output (“\textbf{Check this output}”):

A polygon of three sides is called a triangle and a polygon of four sides is called a quadrilateral and
A polygon of three sides is called a triangle and a polygon of four sides is called a
quadrilateral .

Type Size Traditionally, type size is measured in (printer) points. The default type that TEX
produces is of 10 pt size. There are some declarations (ten, to be precise) provided in LATEXfor changing
the type size:
size size size size size size size size size size
Color
I am Red. And I am Blue.

You might also like