KALINDI COLLEGE
(University Of Delhi)
DOCUMENT PREPARATION AND PRESENTATION
SOFTWARE
Submitted by:
Anjali
College Roll No. 22501144
Examination Roll No. 22033501099
Course B.A. Program
Submitted to:
Mrs. Varsha
(department of physics)
Submission date:
14 November, 2024
Latex
Latex
STYLING PAPERS
Anjali
Latex
Contents
1 Introduction To Latex 7
1.1 WHAT IS LATEX? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Formation of a simple document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.1 Writting the first piece of LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.2 The preamble of a document . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.3 including title, author and date information . . . . . . . . . . . . . . . . . . . 8
2 Loading and Using Packages 9
2.1 Types of Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Use of Packages , Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Example 1. First table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.2 Example 2. Second table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.3 Example 3. Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.4 Example 4. Sum and Product . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.5 Example 5. Adding Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3 Page Orientation 13
3.1 Setting page size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 page layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 Header and Footer i
4.1 Latex Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
4.1.1 Default Page Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
4.1.2 Setting Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
5 Multiple Column Entries iii
5.1 two column entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
3
Latex
List of Tables
2.1 First table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Second table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5
Latex
Chapter 1
Introduction To Latex
1.1 WHAT IS LATEX?
LaTeX (pronounced either “LAY-tek” or “LAH-tek” depending on who you talk to) is a tool that
lets anyone create beautifully typeset documents. It’s the code you write in when you use Overleaf’s
Code Editor and it underlies what you see in our Visual Editor.
1.2 Formation of a simple document
• Writing your first piece of LaTeX
• The preamble of a document
• Including title, author and date information
The first step is to create a new LaTeX project. You can do this on your own computer by creating
a new .tex file; alternatively, you can start a new project in Overleaf.
Let’s start with the simplest working example, which can be opened directly in Overleaf: you
have to include preamble i.e. document classarticle, beamer, report, book.
fig.1
1.2.1 Writting the first piece of LaTeX
First document. This is a simple example, with no extra parameters or packages included.The first
line of code, documentclassarticle, declares the document type known as its class, which controls
7
the overall appearance of the document. A minimal document preamble might look like this:
1.2.2 The preamble of a document
documentclass[12pt, letterpaper]article usepackagegraphicx where documentclass[12pt, letterpa-
per]article defines the overall class (type) of document. Additional parameters, which must be
separated by commas, are included in square brackets ([...]) and used to configure this instance of
the article class; i.e., settings we wish to use for this particular article-class-based document. Of
course other font sizes, 9pt, 11pt, 12pt, can be used, but if none is specified, the default size is 10pt.
As for the paper size, other possible values are a4paper and legalpaper.
1.2.3 including title, author and date information
Adding a title, author and date to our document requires three more lines in the preamble (not the
main body of the document). Those lines are:
My first LaTeX document: the document title Hubert Farnsworth: here you write the name of
the author(s) . August 2022: you can enter the date manually or use the command November 19,
2024to typeset the current date every time the document is compiled.
Latex
Chapter 2
Loading and Using Packages
The default formatting in LaTeX documents is determined by the class used by that document.
This default look can be changed and more functionalities can be added by means of a package.
1. Packages add new functions to LaTeX
2. All packages must be included in the preamble
3. Packages add features such as support for pictures, links and bibliography
2.1 Types of Packages
A comprehensive list of LaTeX packages including documentation can be found on CTAN.
Some common packages are:
• amsmath by AMS-LaTeX
• babel – typographical rules and hyphenation patterns for many languages
• fontspec – font selection in XeLaTeX and LuaLaTeX
• hyperref – hypertext links and other PDF features
• microtype – automatic micro-typographic adjustments
• tikz – drawing diagrams
2.2 Use of Packages , Examples
9
2.2.1 Example 1. First table
Col1 Col2 Col2 Col3
1 6 87837 787
2 7 78 5415
3 545 778 7507
4 545 18744 7560
5 88 788 6344
Table 2.1: First table.
2.2.2 Example 2. Second table
cell1 cell2 cell3
cell4 cell5 cell6
cell7 cell8 cell9
Table 2.2: Second table.
2.2.3 Example 3. Integrals
Rb
Integral a x2 dx inside text.
The same integral on display:
Z b
x2 dx
a
and multiple integral: ZZ
µ(u, v)dudv
V
ZZ
µ(u, v, w)dudvdw
V
I
f (s)ds
V
2.2.4 Example 4. Sum and Product
P∞
Sum n=1 26−n = 1 inside text.
The same sum on display:
∞
X
2[ − n] = 1
n=1
Latex
Qb
Product i=a f (i) inside text.
The same product on display:
b
Y
f (i)
i=a
2.2.5 Example 5. Adding Algorithms
Algorithm 1: Example code
1 Your Input
2 Your Output
Data: Testing set x
P ∞
3 i=1 := 0 // this is a comment
/* Now this is an if....else conditional loop */
4 if Condition1 then
5 Do something // this is another comment
6 if sub-condition then
7 Do a lot
8 end
9 end
10 else if Condition 2 then
11 Do Otherwise
/* Now this is a for loop */
12 for sequence do
13 loop instructions
14 end
15 end
16 else if Do the rest then
17 end
18 Now this is a While loop while Condition do
19 Do something
20 end
Latex
These are certain examples to show the use of different packages in LaTeX.
Summary Packages add new functions to LaTeX All packages must be included in the preamble
Packages add features such as support for pictures, links and bibliography.
Latex
Chapter 3
Page Orientation
The page dimensions in a LaTeX document are highly configurable and the geometry package offers
a simple way to change the length and layout of different elements such as the paper size, margins,
footnote, header, orientation, etc.
3.1 Setting page size
Modifying a document’s paper size, orientation and margins is a common requirement which can
easily be achieved using the geometry package. There are two ways to set the desired values:
provide them as parameters to the usepackage statement as in the example above, or use the
geometry command in the preamble. For example, let’s create a document with legal paper size,
landscape orientation and a 2 in margin:
usepackage[legalpaper, landscape, margin=2in]geometry You can achieve the same thing in a
slightly different way:
usepackagegeometry geometrylegalpaper, landscape, margin=2in As you see, the parameters are
comma separated. For a complete list of predefined paper sizes, see the reference guide. The second
parameter is the orientation, its default value is portrait. Finally, each margin is set to 2in.
3.2 page layout
The layout package provides a very convenient solution to visualizing the document’s current lay-
out—and the values of various LaTeX parameters which determine that layout. It provides two
commands: layout and layout* which draw a graphic representing the current layout. The starred
version (layout*) recalculates the internal values used to draw the graphic, which can be useful if
you make changes to LaTeX’s page-layout parameters. Page Layout Parametres
13
The geometry package provides an interface to change page dimensions using intuitively-named
parameters which need to be written in the form parameter=value, using standard LaTeX units
(mm, cm, pt, in). The following list makes reference to the page-layout graphic provided in the
previous section.
textwidth Corresponds to element 8 in the graphic. textheight Element 7 in the graphic. total
Depends on other parameters, by default defines the dimensions of the Body, but can be com-
bined with the includehead, includefoot, includeheadfoot and includemp commands to change the
dimensions of Header, the Body, the Footer and the Margin Notes altogether.
left, lmargin, inner These three parameters change the length of the left margin. Elements 1
and 3 in the graphic, combined. right, rmargin, outer These three parameters change the length of
the right margin. Elements 9 and 10 in the graphic, combined.
top, tmargin These two parameters represent elements 2 and 6 in the graphic, combined. bottom,
bmargin These two parameters set the distance from the bottom edge of the document to its
baseline. headheight
Height of the header headsep Separation between header (baseline) and text body. Element 6
in the graphic. footnotesep Separation between the bottom of text body (baseline) and the top of
footnote text.
footskip Distance separation between baseline of last line of text and baseline of footer. margin-
parwidth, marginpar Width of the margin notes. Element 10 in the graphic.
Latex
Chapter 4
Header and Footer
4.1 Latex Page Styles
In LaTeX, the default format of a document’s headers and footers are determined by the page style
being used. Several predefined page styles are provided by LaTeX:
• empty: no headers or footers on pages
• plain: no page headers, footers consist of a centered page number
• headings: no footers, headers contains class-specific information and page number
• myheadings: no footers, headers contains page number and user-supplied information
4.1.1 Default Page Style
Unless the user specifies otherwise, the standard document classes apply a default page style:
• the article and report classes use plain
• the book class uses headings
4.1.2 Setting Page Styles
Core LaTeX provides two commands to change (set) the page style:
pagestyle〈style〉: sets the style of the current page, and all subsequent pages, to 〈style〉 this-
pagestyle〈style〉: sets style of the current page only to 〈style〉 The style of page numbers is set with
the command ; for example, typesets page numbers in lowercase Roman numerals: i, ii, iii...
In LaTeX, the default format of a document’s headers and footers are determined by the page
style being used. Several predefined page styles are provided by LaTeX:
empty: no headers or footers on pages
plain: no page headers, footers consist of a centered page number
headings: no footers, headers contains class-specific information and page number
myheadings: no footers, headers contains page number and user-supplied information.
i
Latex
Chapter 5
Multiple Column Entries
Two-column documents can be easily created by passing the parameter twocolumn to the document
class statement. If you need more flexibility in the column layout, or to create a document with
multiple columns, the package multicol provides a set of commands for that. This article explains
how use the multicol package, starting with this basic example: beginmulticols2 [ sectionFirst
Section All human things are subject to decay. And when fate summons, Monarchs must obey.
endmulticols
If you open this example on Overleaf you will see the column separator can be set to a specific
colour also. Below a description of each command:
usepackagecolor. This line is inserted in the preamble to enable the use of several colours within
the document. setlengthcolumnseprule1pt This determines the width of the ruler to be used as
column separator, it’s set to 0 by default. In the example a column whose width is 1pt is printed.
defcolumnseprulecolorcolor(blue) The colour of the separator ruler is set to blue. See the article
about using colours in LaTeX for more information on colour manipulation.columnbreak
The column break is inserted, then the paragraphs before the breakpoint are evenly distributed
to fill all available space.
In the example, the second paragraph is at the bottom of the column and a blank space is
inserted in between the second and the first paragraphs.
5.1 two column entries
iii
lorem ipsum dolor sit amet, rutrum augue a leo. Morbi sed mus nunc nunc,molestie ut, ul-
consectetuer adipiscing elit. elit sit amet ante lobortis sollic- tricies vel, semper in, velit. Ut
Etiam lobortis facilisis sem. itudin.Praesent blandit blandit porttitor. Praesent in sapien.
Nullam nemi et neque phare- mauris. Praesent lectus tel- Lorem ipsum dolor sit amet,
tra sollicitudin. Praesent im- lus, aliquet aliquam, luctus a, consectetuer adipiscing elit.
perdiet mi nec ante. Donec egestas a, turpis.Mauris lacinia Duis fringilla tristique neque.
ullamcorper, felis nonsodales lorem sit amet ipsum. Nunc Sed interdum libero ut me-
commodo, lectus velit ultrices quis urna dictum turpis accum- tus.Pellentesque placerat. Nam
augue, a dignissim nibh lectus san semper. Loremipsum dolor rutrum augue a leo. Morbi sed
placerat pede. Vivamus nunc- sit amet, consectetuer adipisc- elit sit amet ante lobortis sollic-
nunc, molestie ut, ultricies vel, ing elit. Etiam lobortis facilisis itudin.Praesent blandit blandit
semper in, velit. Ut porttitor. sem. Nullam nec mi etneque mauris. Praesent lectus tellus,
Praesent in sapien. Lorem ip- pharetra sollicitudin. Prae- aliquet aliquam, luctus a, eges-
sum dolorsit amet, consectetuer sent imperdiet mi nec ante. tas a, turpis. Mauris lacinia
adipiscing elit. Duis fringilla Donec ullamcorper, felis non lorem sit amet ipsum. Nunc
tristique neque. Sed interdum sodalescommodo, lectus velit quis urna dictum turpis accum-
libero ut metus.Pellentesque ultrices augue, a dignissim nibh san semper. Loremipsum dolor
placerat. Nam rutrum augue lectus placerat pede. Viva- sit amet, consectetuer adipisc-
a leo. Morbi sed elit sit amet mus nunc nunc,molestie ut, ul- ing elit. Etiam lobortis facilisis
ante lobortis sollicitudin. Prae- tricies vel, semper in, velit. Ut sem. Nullam nec mi etneque
sent blandit blandit mauris. porttitor. Praesent in sapien. pharetra sollicitudin. Prae-
Praesent lectus tellus, aliquet Lorem ipsum dolorsit amet, sent imperdiet mi nec ante.
aliquam, luctus a, egestas a, consectetuer adipiscing elit. Donec ullamcorper, felis non
turpis.Mauris lacinia lorem sit Duis fringilla tristique neque. sodalescommodo, lectus velit
amet ipsum. Nunc quis urna Sed interdum libero ut me- ultrices augue, a dignissim nibh
dictum turpis accumsan sem- tus.Pellentesque placerat. Nam lectus placerat pede. Viva-
per. Loremipsum dolor sit rutrum augue a leo. Morbi sed mus nunc nunc,molestie ut, ul-
amet, consectetuer adipiscing elit sit amet ante lobortis sollic- tricies vel, semper in, velit. Ut
elit. Etiam lobortis facilisis itudin.Praesent blandit blandit porttitor. Praesent in sapien.
sem. Nullam nec mi etneque mauris. Praesent lectus tellus, Lorem ipsum dolorsit amet,
pharetra sollicitudin. Praesent aliquet aliquam, luctus a, eges- consectetuer adipiscing elit.
imperdiet mi nec ante. Donec tas a, turpis. Mauris lacinia Duis fringilla tristique neque.
ullamcorper, felis non sodale- lorem sit amet ipsum. Nunc Sed interdum libero ut me-
scommodo, lectus velit ultrices quis urna dictum turpis accum- tus.Pellentesque placerat. Nam
augue, a dignissim nibh lec- san semper. Loremipsum dolor rutrum augue a leo. Morbi sed
tus placerat pede. Vivamus sit amet, consectetuer adipisc- elit sit amet ante lobortis sollic-
nunc nunc, molestie ut, ul- ing elit. Etiam lobortis facilisis itudin.Praesent blandit blandit
tricies vel, semper in, velit. Ut sem. Nullam nec mi etneque mauris. Praesent lectus tel-
porttitor. Praesent in sapien. pharetra sollicitudin. Prae- lus, aliquet aliquam, luctus a,
Lorem ipsum dolorsit amet, sent imperdiet mi nec ante. egestas a, turpis.Mauris lacinia
consectetuer adipiscing elit. Donec ullamcorper, felis non lorem sit amet ipsum. Nunc
Duis fringilla tristique neque. sodalescommodo, lectus velit quis urna dictum turpis accum-
Sed interdum libero ut me- ultrices augue, a dignissim nibh san semper. Loremipsum dolor
tus.Pellentesque placerat. Nam lectus placerat pede. Viva- sit amet, consectetuer ad
Latex
THANK YOU
Latex