SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics
Introduction to LATEX
Suddhasheel Ghosh
Department of Civil Engineering,
Jawaharlal Nehru Engineering College
Aurangabad, Maharashtra
431003
LATEX for Technical and Scientific Documents
January 12 - 16, 2015
Day I
shudh@JNEC LATEX@ JNEC 1 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics
Outline
1 Why should we use LATEX
Etymology
2 Parts of a LATEX document
The Preamble
The body
Text styles
3 Mathematical typesetting
4 Graphics
Tables
shudh@JNEC LATEX@ JNEC 2 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Etymology
Outline
1 Why should we use LATEX
Etymology
2 Parts of a LATEX document
The Preamble
The body
Text styles
3 Mathematical typesetting
4 Graphics
Tables
shudh@JNEC LATEX@ JNEC 3 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Etymology
Why should we use LATEX
Motivation
Free Software (I do not have to worry about viruses and
software piracy)
Rendering mathematics is easier
No worries about setting the font size and styles again and
again
Because I am tired of figures and tables jumping from here and
there
Because I want my sections and subsections autonumbered
Because my fingers are tired with a click-find-click approach
What all do I have to do?
Remember the basic structure of a document
Remember a few macros
shudh@JNEC LATEX@ JNEC 4 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Etymology
Etymology of LATEX
... the origins
Initially TEX was developed by Donald Knuth
Leslie Lamport extended the software to LATEX
TEX is pronounced ‘Tech’ and was initially written as τ χ
LATEX stands for Lamport TEX and is pronounced as ‘Lay-Tech’
However, many pronounce it as ‘Lateks’ (as in rubber)
What can we do with LATEX?
We can create research papers, reports, thesis, presentations,
posters and leaflets.
shudh@JNEC LATEX@ JNEC 5 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Etymology
In this workshop:
Day 1: Introduction to LATEX
Day 2: Typesetting Mathematics
Day 3: Writing your thesis / technical report
Day 4: Make your presentations
Day 5: Basics of science communication
shudh@JNEC LATEX@ JNEC 6 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Etymology
Where do I get LATEX?
...and use it
LaTeX Software
For Windows:
www.miktex.org
Download a complete DVD as torrent from www.texlive.org
For Linux:
Download a complete DVD as torrent from www.texlive.org
Part of the Ubuntu Linux distribution (sudo apt-get
install texlive)
shudh@JNEC LATEX@ JNEC 7 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Etymology
Writing files in LATEX
... and getting outputs
The LATEX “code” is written in a .tex file
LaTeX package compiles the file to produce PDF, DVI or PS files
Windows editors (IDE)
WinEdit
TeXNicCenter
LyX (What you see is what you get type)
Linux editors (IDE)
Texworks
TeXStudio
TeXMaker
LyX
shudh@JNEC LATEX@ JNEC 8 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Outline
1 Why should we use LATEX
Etymology
2 Parts of a LATEX document
The Preamble
The body
Text styles
3 Mathematical typesetting
4 Graphics
Tables
shudh@JNEC LATEX@ JNEC 9 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Parts of a LATEX document
Preamble
Style or class of a document
Packages to be used
Macro definitions
Body
Sections and subsections
Tables and figures
Body text
shudh@JNEC LATEX@ JNEC 10 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Parts of a LATEX document
The preamble
Makes announcements
Style of the document
Packages to be used
Definitions of macros
shudh@JNEC LATEX@ JNEC 11 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty!
The Preamble
We shall use the base class article
documentclass{article}
Want A4 paper size? Two-sided document?
documentclass[a4paper,twoside]{article}
What about setting the margins?
usepackage[top=2cm,bottom=4cm,left=1.5cm,
right=3cm,assymetric]{geometry}
Therefore, overall settings for A4 size paper, and margins:
documentclass[a4paper,twoside]{article}
usepackage[top=2cm,bottom=4cm,left=1.5cm,right=3cm,
asymmetric]{geometry}
shudh@JNEC LATEX@ JNEC 12 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
...and let’s start writing papers
Announce the title, the author and date
title{My first LaTeX
paper}
author{Suddhasheel Ghosh}
%write here or the date
appears automatically
date{}
And then declare the contents of the document:
begin{document}
%this puts the title on
top
maketitle
end{document}
Here LaTeX, title, author, date, begin, end are all macros.
Macros are like functions. Anything between the braces “{}”, is the
argument to the function / macro.
shudh@JNEC LATEX@ JNEC 13 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Bold, italics, slanted underline
We can have {bf bold
text}, {textit
italicised text},
{sl slanted text}
and
underline{underlined
text}.
We can have bold text, italicised text, slanted text and
underlined text.
shudh@JNEC LATEX@ JNEC 14 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Subscripts and superscripts
In your preamble, add the following line
usepackage{fixltx2e}
and inside the body write:
It is found that heighttextsubscript{apple tree} is
different than heighttextsubscript{orange tree}
and we obtain:
It is found that heightapple tree is different than
heightorange tree
shudh@JNEC LATEX@ JNEC 15 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Line spacing
Line spacing can be set to single line, one and a half line, double line
spacings, and any other customized spacings. In the preamble, use
usepackage{setspace}
... and in the body write any one:
singlespacing
onehalfspacing
doublspacing
setstretch{1.1}
shudh@JNEC LATEX@ JNEC 16 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Coloured text
In your preamble, add the following line
usepackage{color}
%this gives about 16 colour options
Alternatively, one can write:
usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
%Gives about 16+64+150
colours
Therefore, we can have red coloured text, and a blue coloured text,
and back to the black colour, by
Therefore, we can have {color{red}red coloured text},
and a {color{blue}blue coloured text}, and back to
the black colour.
shudh@JNEC LATEX@ JNEC 17 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Itemized and numbered lists
begin{itemize}
item Item 1
item Item 2
item Item 3
end{itemize}
begin{enumerate}
item Item 1
item Item 2
item Item 3
end{enumerate}
Item 1
Item 2
Item 3
1 Item 1
2 Item 2
3 Item 3
Can you guess how we get multilevel lists?
shudh@JNEC LATEX@ JNEC 18 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Typesetting environments
LaTeX has various environments, which start and end with the
begin and end commands.
abstract
equation
center
raggedright
For example
begin{abstract}
Tomatoes have long been
considered as the
cause of kidney
stones. Researches
have been trying to
eliminate this trait
of the tomatoes
through genetic
engineering.
end{abstract}
shudh@JNEC LATEX@ JNEC 19 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Preamble Body Style
Let us get our hands dirty
Font sizes
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
tiny Sample
scriptsize
Sample
footnotesize
Sample
small Sample
normalsize
Sample
large Sample
Large Sample
LARGE Sample
huge Sample
Huge Sample
shudh@JNEC LATEX@ JNEC 20 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics
Outline
1 Why should we use LATEX
Etymology
2 Parts of a LATEX document
The Preamble
The body
Text styles
3 Mathematical typesetting
4 Graphics
Tables
shudh@JNEC LATEX@ JNEC 21 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics
Playing with mathematics text
Mathematics environments
There are two kinds of math used in LATEX.
Inline math
Display math
About any point $x$ in a
metric space $M$ we define the
open ball of radius $r > 0$
about $x$ as the set
$$
B(x;r) = {y in M :
d(x,y) < r}.
$$
About any point x in a metric
space M we define the open ball
of radius r > 0 about x as the set
B(x;r) = {y ∈ M : d(x,y) < r}.
shudh@JNEC LATEX@ JNEC 22 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics
Typesetting equations
Numbered equations
Numbered equations can be typeset by using
begin{equation}
R(x,y) =
frac{Ax^3+Bx^2+Cx+D}{Ey^3
+ Fy + G}
end{equation}
R(x,y) =
Ax3
+Bx2
+Cx+D
Ey3 +Fy +G
(1)
shudh@JNEC LATEX@ JNEC 23 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Outline
1 Why should we use LATEX
Etymology
2 Parts of a LATEX document
The Preamble
The body
Text styles
3 Mathematical typesetting
4 Graphics
Tables
shudh@JNEC LATEX@ JNEC 24 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Inserting images
To include a graphics file duck.jpg in a LATEX file, type in the
preamble
%in the preamble
usepackage{graphicx}
and in the body
includegraphics{duck.jpg}
And, here it is:
shudh@JNEC LATEX@ JNEC 25 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Inserting images
..and numbering them
A paper would require numbering the images.
begin{figure}
centering
includegraphics{duck.jpg}
caption{A
picture
of a
duck
used at
muggle
homes
as a
toy}
end{figure}
Figure 1: A picture of a duck
used at muggle homes as a
toy
shudh@JNEC LATEX@ JNEC 26 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Inserting graphs in a LaTeX file
A gnuplot and LATEX combo
Start gnuplot, and write the following codes:
set term tikz color solid
size 4in,3in
set output "sin.tex"
set xr [-2*pi:2*pi]
plot sin(x) with lines
exit
In your preamble, use the following
usepackage{gnuplot-lua-tikz}
and, in the body, wherever you wish to insert the figure, type
input{sin}
shudh@JNEC LATEX@ JNEC 27 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Inserting graphs in a LaTeX file
A gnuplot and LATEX combo
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
-6 -4 -2 0 2 4 6
sin(x)
shudh@JNEC LATEX@ JNEC 28 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Inserting tables
Tables require the tabular environment.
begin{tabular}{lccc}
{} &Judge 1 &Judge 2 &Judge 3 hline
Katrina &7 &9 &10 
Karishma &9 &10 &7 
Kareena &10 &7 &9 hline
end{tabular}
will give:
Judge 1 Judge 2 Judge 3
Katrina 7 9 10
Karishma 9 10 7
Kareena 10 7 9
shudh@JNEC LATEX@ JNEC 29 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
Inserting tables
... and numbering them
begin{table}
begin{tabular}{lccc}
{} &Judge 1
&Judge 2
&Judge 3
hline
Katrina &7 &9
&10 
Karishma &9 &10
&7 
Kareena &10 &7
&9 hline
end{tabular}
caption{Scores
given by the
judges for
different
participants
in a beauty
competition.
end{table}
Judge 1 Judge 2 Judge 3
Katrina 7 9 10
Karishma 9 10 7
Kareena 10 7 9
Table 1: Scores given by the judges for different
participants in a beauty competition.
Meanings:
lccc: Left,centered,centered,centered
hline: Horizontal line
: Line break
&: Tab character
shudh@JNEC LATEX@ JNEC 30 / 31
SU
D
D
H
ASH
EEL.CO
M
Motivation Parts Math Graphics Tables
In the upcoming sessions
Typesetting advanced mathematics
Typesetting aligned and multiline equations
Typesetting Matrices
Vector notations: Cross product, dot product, bold vectors
shudh@JNEC LATEX@ JNEC 31 / 31

Contenu connexe

Tendances

Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginnersssuser9e8fa4
 
Latex for beginner
Latex for beginnerLatex for beginner
Latex for beginnermahindrupali
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latextran dinh
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeXLaura M. Castro
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with TexstudioHossein Babashah
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsRanel Padon
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingDr. Manjunatha. P
 
Interpolation with Finite differences
Interpolation with Finite differencesInterpolation with Finite differences
Interpolation with Finite differencesDr. Nirav Vyas
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to MatlabAmr Rashed
 
Variables in matlab
Variables in matlabVariables in matlab
Variables in matlabTUOS-Sam
 
The LaTeX Workshop: Typesetting Mathematics with LaTeX
The LaTeX Workshop: Typesetting Mathematics with LaTeXThe LaTeX Workshop: Typesetting Mathematics with LaTeX
The LaTeX Workshop: Typesetting Mathematics with LaTeXSuddhasheel GHOSH, PhD
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)Make Mannan
 
Academic writing in LaTeX
Academic writing in LaTeX Academic writing in LaTeX
Academic writing in LaTeX Daniele Di Mitri
 
Matlab matrices and arrays
Matlab matrices and arraysMatlab matrices and arrays
Matlab matrices and arraysAmeen San
 

Tendances (20)

LaTeX Basics
LaTeX BasicsLaTeX Basics
LaTeX Basics
 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginners
 
Latex for beginner
Latex for beginnerLatex for beginner
Latex for beginner
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latex
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
LaTex Tutorial
LaTex TutorialLaTex Tutorial
LaTex Tutorial
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeX
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular Expressions
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
 
Seminar on MATLAB
Seminar on MATLABSeminar on MATLAB
Seminar on MATLAB
 
Interpolation with Finite differences
Interpolation with Finite differencesInterpolation with Finite differences
Interpolation with Finite differences
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Variables in matlab
Variables in matlabVariables in matlab
Variables in matlab
 
The LaTeX Workshop: Typesetting Mathematics with LaTeX
The LaTeX Workshop: Typesetting Mathematics with LaTeXThe LaTeX Workshop: Typesetting Mathematics with LaTeX
The LaTeX Workshop: Typesetting Mathematics with LaTeX
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
 
Academic writing in LaTeX
Academic writing in LaTeX Academic writing in LaTeX
Academic writing in LaTeX
 
Latex tables and figures
Latex tables and figures Latex tables and figures
Latex tables and figures
 
Matlab matrices and arrays
Matlab matrices and arraysMatlab matrices and arrays
Matlab matrices and arrays
 

En vedette

Typesetting Theses / Reports with LaTeX : Workshop Day 3
Typesetting Theses / Reports with LaTeX : Workshop Day 3Typesetting Theses / Reports with LaTeX : Workshop Day 3
Typesetting Theses / Reports with LaTeX : Workshop Day 3Suddhasheel GHOSH, PhD
 
Making presentations with LaTeX: Workshop Day 4
Making presentations with LaTeX: Workshop Day 4Making presentations with LaTeX: Workshop Day 4
Making presentations with LaTeX: Workshop Day 4Suddhasheel GHOSH, PhD
 
Typesetting Mathematics with LaTeX - Day 2
Typesetting Mathematics with LaTeX - Day 2Typesetting Mathematics with LaTeX - Day 2
Typesetting Mathematics with LaTeX - Day 2Suddhasheel GHOSH, PhD
 
The LaTeX Workshop: Document design in LaTeX: Invocation
The LaTeX Workshop: Document design in LaTeX: InvocationThe LaTeX Workshop: Document design in LaTeX: Invocation
The LaTeX Workshop: Document design in LaTeX: InvocationSuddhasheel GHOSH, PhD
 
Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...Suddhasheel GHOSH, PhD
 
How to Create a Slideshare Account
How to Create a Slideshare AccountHow to Create a Slideshare Account
How to Create a Slideshare AccountAna Villarmente
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filtersop205
 

En vedette (8)

45324291 a-good-ph d-student
45324291 a-good-ph d-student45324291 a-good-ph d-student
45324291 a-good-ph d-student
 
Typesetting Theses / Reports with LaTeX : Workshop Day 3
Typesetting Theses / Reports with LaTeX : Workshop Day 3Typesetting Theses / Reports with LaTeX : Workshop Day 3
Typesetting Theses / Reports with LaTeX : Workshop Day 3
 
Making presentations with LaTeX: Workshop Day 4
Making presentations with LaTeX: Workshop Day 4Making presentations with LaTeX: Workshop Day 4
Making presentations with LaTeX: Workshop Day 4
 
Typesetting Mathematics with LaTeX - Day 2
Typesetting Mathematics with LaTeX - Day 2Typesetting Mathematics with LaTeX - Day 2
Typesetting Mathematics with LaTeX - Day 2
 
The LaTeX Workshop: Document design in LaTeX: Invocation
The LaTeX Workshop: Document design in LaTeX: InvocationThe LaTeX Workshop: Document design in LaTeX: Invocation
The LaTeX Workshop: Document design in LaTeX: Invocation
 
Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...
 
How to Create a Slideshare Account
How to Create a Slideshare AccountHow to Create a Slideshare Account
How to Create a Slideshare Account
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 

Similaire à Introduction to LaTeX - Workshop Day 1

Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Languagevsssuresh
 
La tex basics
La tex basicsLa tex basics
La tex basicsawverret
 
R programming slides
R  programming slidesR  programming slides
R programming slidesPankaj Saini
 
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILERRANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILERijseajournal
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptMichalis33
 
Introduction to R
Introduction to RIntroduction to R
Introduction to RRajib Layek
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxcarliotwaycave
 
chap 6 - Example şift
chap 6 - Example şiftchap 6 - Example şift
chap 6 - Example şiftermis26
 
Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...
Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...
Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...Rakuten Group, Inc.
 
Anything but simple Mathematica
Anything but simple MathematicaAnything but simple Mathematica
Anything but simple MathematicaSergeiPronkevich
 
Advanced data structures slide 1 2
Advanced data structures slide 1 2Advanced data structures slide 1 2
Advanced data structures slide 1 2jomerson remorosa
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 018threspecter
 
Linear algebra and vector analysis presentation
Linear algebra and vector analysis presentationLinear algebra and vector analysis presentation
Linear algebra and vector analysis presentationSajibulIslam13
 
A common fixed point theorem for two random operators using random mann itera...
A common fixed point theorem for two random operators using random mann itera...A common fixed point theorem for two random operators using random mann itera...
A common fixed point theorem for two random operators using random mann itera...Alexander Decker
 

Similaire à Introduction to LaTeX - Workshop Day 1 (20)

Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Language
 
La tex basics
La tex basicsLa tex basics
La tex basics
 
Latex hafida-benhidour-19-12-2016
Latex hafida-benhidour-19-12-2016Latex hafida-benhidour-19-12-2016
Latex hafida-benhidour-19-12-2016
 
Chap11 scr
Chap11 scrChap11 scr
Chap11 scr
 
R programming slides
R  programming slidesR  programming slides
R programming slides
 
Mathematical Modeling With Maple
Mathematical Modeling With MapleMathematical Modeling With Maple
Mathematical Modeling With Maple
 
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILERRANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.ppt
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
 
chap 6 - Example şift
chap 6 - Example şiftchap 6 - Example şift
chap 6 - Example şift
 
Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...
Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...
Functional Programming in Pattern-Match-Oriented Programming Style <Programmi...
 
Anything but simple Mathematica
Anything but simple MathematicaAnything but simple Mathematica
Anything but simple Mathematica
 
Mathematica for Physicits
Mathematica for PhysicitsMathematica for Physicits
Mathematica for Physicits
 
Computer project
Computer projectComputer project
Computer project
 
Matlab1
Matlab1Matlab1
Matlab1
 
Advanced data structures slide 1 2
Advanced data structures slide 1 2Advanced data structures slide 1 2
Advanced data structures slide 1 2
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 01
 
Linear algebra and vector analysis presentation
Linear algebra and vector analysis presentationLinear algebra and vector analysis presentation
Linear algebra and vector analysis presentation
 
A common fixed point theorem for two random operators using random mann itera...
A common fixed point theorem for two random operators using random mann itera...A common fixed point theorem for two random operators using random mann itera...
A common fixed point theorem for two random operators using random mann itera...
 

Plus de Suddhasheel GHOSH, PhD

FEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodFEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodSuddhasheel GHOSH, PhD
 
Solve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSolve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSuddhasheel GHOSH, PhD
 
Research Prospects with Geoinformatics
Research Prospects with GeoinformaticsResearch Prospects with Geoinformatics
Research Prospects with GeoinformaticsSuddhasheel GHOSH, PhD
 
Expert Lecture on GPS at UIET, CSJM, Kanpur
Expert Lecture on GPS at UIET, CSJM, KanpurExpert Lecture on GPS at UIET, CSJM, Kanpur
Expert Lecture on GPS at UIET, CSJM, KanpurSuddhasheel GHOSH, PhD
 

Plus de Suddhasheel GHOSH, PhD (7)

FEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodFEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
 
Solve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSolve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares Method
 
Map Calculaton using GRASS
Map Calculaton using GRASSMap Calculaton using GRASS
Map Calculaton using GRASS
 
Watershed Analysis with GRASS
Watershed Analysis with GRASSWatershed Analysis with GRASS
Watershed Analysis with GRASS
 
Research Prospects with Geoinformatics
Research Prospects with GeoinformaticsResearch Prospects with Geoinformatics
Research Prospects with Geoinformatics
 
Prepare your literature review
Prepare your literature reviewPrepare your literature review
Prepare your literature review
 
Expert Lecture on GPS at UIET, CSJM, Kanpur
Expert Lecture on GPS at UIET, CSJM, KanpurExpert Lecture on GPS at UIET, CSJM, Kanpur
Expert Lecture on GPS at UIET, CSJM, Kanpur
 

Dernier

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Dernier (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

Introduction to LaTeX - Workshop Day 1

  • 1. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Introduction to LATEX Suddhasheel Ghosh Department of Civil Engineering, Jawaharlal Nehru Engineering College Aurangabad, Maharashtra 431003 LATEX for Technical and Scientific Documents January 12 - 16, 2015 Day I shudh@JNEC LATEX@ JNEC 1 / 31
  • 2. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Outline 1 Why should we use LATEX Etymology 2 Parts of a LATEX document The Preamble The body Text styles 3 Mathematical typesetting 4 Graphics Tables shudh@JNEC LATEX@ JNEC 2 / 31
  • 3. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Etymology Outline 1 Why should we use LATEX Etymology 2 Parts of a LATEX document The Preamble The body Text styles 3 Mathematical typesetting 4 Graphics Tables shudh@JNEC LATEX@ JNEC 3 / 31
  • 4. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Etymology Why should we use LATEX Motivation Free Software (I do not have to worry about viruses and software piracy) Rendering mathematics is easier No worries about setting the font size and styles again and again Because I am tired of figures and tables jumping from here and there Because I want my sections and subsections autonumbered Because my fingers are tired with a click-find-click approach What all do I have to do? Remember the basic structure of a document Remember a few macros shudh@JNEC LATEX@ JNEC 4 / 31
  • 5. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Etymology Etymology of LATEX ... the origins Initially TEX was developed by Donald Knuth Leslie Lamport extended the software to LATEX TEX is pronounced ‘Tech’ and was initially written as τ χ LATEX stands for Lamport TEX and is pronounced as ‘Lay-Tech’ However, many pronounce it as ‘Lateks’ (as in rubber) What can we do with LATEX? We can create research papers, reports, thesis, presentations, posters and leaflets. shudh@JNEC LATEX@ JNEC 5 / 31
  • 6. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Etymology In this workshop: Day 1: Introduction to LATEX Day 2: Typesetting Mathematics Day 3: Writing your thesis / technical report Day 4: Make your presentations Day 5: Basics of science communication shudh@JNEC LATEX@ JNEC 6 / 31
  • 7. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Etymology Where do I get LATEX? ...and use it LaTeX Software For Windows: www.miktex.org Download a complete DVD as torrent from www.texlive.org For Linux: Download a complete DVD as torrent from www.texlive.org Part of the Ubuntu Linux distribution (sudo apt-get install texlive) shudh@JNEC LATEX@ JNEC 7 / 31
  • 8. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Etymology Writing files in LATEX ... and getting outputs The LATEX “code” is written in a .tex file LaTeX package compiles the file to produce PDF, DVI or PS files Windows editors (IDE) WinEdit TeXNicCenter LyX (What you see is what you get type) Linux editors (IDE) Texworks TeXStudio TeXMaker LyX shudh@JNEC LATEX@ JNEC 8 / 31
  • 9. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Outline 1 Why should we use LATEX Etymology 2 Parts of a LATEX document The Preamble The body Text styles 3 Mathematical typesetting 4 Graphics Tables shudh@JNEC LATEX@ JNEC 9 / 31
  • 10. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Parts of a LATEX document Preamble Style or class of a document Packages to be used Macro definitions Body Sections and subsections Tables and figures Body text shudh@JNEC LATEX@ JNEC 10 / 31
  • 11. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Parts of a LATEX document The preamble Makes announcements Style of the document Packages to be used Definitions of macros shudh@JNEC LATEX@ JNEC 11 / 31
  • 12. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty! The Preamble We shall use the base class article documentclass{article} Want A4 paper size? Two-sided document? documentclass[a4paper,twoside]{article} What about setting the margins? usepackage[top=2cm,bottom=4cm,left=1.5cm, right=3cm,assymetric]{geometry} Therefore, overall settings for A4 size paper, and margins: documentclass[a4paper,twoside]{article} usepackage[top=2cm,bottom=4cm,left=1.5cm,right=3cm, asymmetric]{geometry} shudh@JNEC LATEX@ JNEC 12 / 31
  • 13. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty ...and let’s start writing papers Announce the title, the author and date title{My first LaTeX paper} author{Suddhasheel Ghosh} %write here or the date appears automatically date{} And then declare the contents of the document: begin{document} %this puts the title on top maketitle end{document} Here LaTeX, title, author, date, begin, end are all macros. Macros are like functions. Anything between the braces “{}”, is the argument to the function / macro. shudh@JNEC LATEX@ JNEC 13 / 31
  • 14. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Bold, italics, slanted underline We can have {bf bold text}, {textit italicised text}, {sl slanted text} and underline{underlined text}. We can have bold text, italicised text, slanted text and underlined text. shudh@JNEC LATEX@ JNEC 14 / 31
  • 15. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Subscripts and superscripts In your preamble, add the following line usepackage{fixltx2e} and inside the body write: It is found that heighttextsubscript{apple tree} is different than heighttextsubscript{orange tree} and we obtain: It is found that heightapple tree is different than heightorange tree shudh@JNEC LATEX@ JNEC 15 / 31
  • 16. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Line spacing Line spacing can be set to single line, one and a half line, double line spacings, and any other customized spacings. In the preamble, use usepackage{setspace} ... and in the body write any one: singlespacing onehalfspacing doublspacing setstretch{1.1} shudh@JNEC LATEX@ JNEC 16 / 31
  • 17. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Coloured text In your preamble, add the following line usepackage{color} %this gives about 16 colour options Alternatively, one can write: usepackage[usenames,dvipsnames,svgnames,table]{xcolor} %Gives about 16+64+150 colours Therefore, we can have red coloured text, and a blue coloured text, and back to the black colour, by Therefore, we can have {color{red}red coloured text}, and a {color{blue}blue coloured text}, and back to the black colour. shudh@JNEC LATEX@ JNEC 17 / 31
  • 18. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Itemized and numbered lists begin{itemize} item Item 1 item Item 2 item Item 3 end{itemize} begin{enumerate} item Item 1 item Item 2 item Item 3 end{enumerate} Item 1 Item 2 Item 3 1 Item 1 2 Item 2 3 Item 3 Can you guess how we get multilevel lists? shudh@JNEC LATEX@ JNEC 18 / 31
  • 19. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Typesetting environments LaTeX has various environments, which start and end with the begin and end commands. abstract equation center raggedright For example begin{abstract} Tomatoes have long been considered as the cause of kidney stones. Researches have been trying to eliminate this trait of the tomatoes through genetic engineering. end{abstract} shudh@JNEC LATEX@ JNEC 19 / 31
  • 20. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Preamble Body Style Let us get our hands dirty Font sizes Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample tiny Sample scriptsize Sample footnotesize Sample small Sample normalsize Sample large Sample Large Sample LARGE Sample huge Sample Huge Sample shudh@JNEC LATEX@ JNEC 20 / 31
  • 21. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Outline 1 Why should we use LATEX Etymology 2 Parts of a LATEX document The Preamble The body Text styles 3 Mathematical typesetting 4 Graphics Tables shudh@JNEC LATEX@ JNEC 21 / 31
  • 22. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Playing with mathematics text Mathematics environments There are two kinds of math used in LATEX. Inline math Display math About any point $x$ in a metric space $M$ we define the open ball of radius $r > 0$ about $x$ as the set $$ B(x;r) = {y in M : d(x,y) < r}. $$ About any point x in a metric space M we define the open ball of radius r > 0 about x as the set B(x;r) = {y ∈ M : d(x,y) < r}. shudh@JNEC LATEX@ JNEC 22 / 31
  • 23. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Typesetting equations Numbered equations Numbered equations can be typeset by using begin{equation} R(x,y) = frac{Ax^3+Bx^2+Cx+D}{Ey^3 + Fy + G} end{equation} R(x,y) = Ax3 +Bx2 +Cx+D Ey3 +Fy +G (1) shudh@JNEC LATEX@ JNEC 23 / 31
  • 24. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Outline 1 Why should we use LATEX Etymology 2 Parts of a LATEX document The Preamble The body Text styles 3 Mathematical typesetting 4 Graphics Tables shudh@JNEC LATEX@ JNEC 24 / 31
  • 25. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Inserting images To include a graphics file duck.jpg in a LATEX file, type in the preamble %in the preamble usepackage{graphicx} and in the body includegraphics{duck.jpg} And, here it is: shudh@JNEC LATEX@ JNEC 25 / 31
  • 26. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Inserting images ..and numbering them A paper would require numbering the images. begin{figure} centering includegraphics{duck.jpg} caption{A picture of a duck used at muggle homes as a toy} end{figure} Figure 1: A picture of a duck used at muggle homes as a toy shudh@JNEC LATEX@ JNEC 26 / 31
  • 27. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Inserting graphs in a LaTeX file A gnuplot and LATEX combo Start gnuplot, and write the following codes: set term tikz color solid size 4in,3in set output "sin.tex" set xr [-2*pi:2*pi] plot sin(x) with lines exit In your preamble, use the following usepackage{gnuplot-lua-tikz} and, in the body, wherever you wish to insert the figure, type input{sin} shudh@JNEC LATEX@ JNEC 27 / 31
  • 28. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Inserting graphs in a LaTeX file A gnuplot and LATEX combo -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -6 -4 -2 0 2 4 6 sin(x) shudh@JNEC LATEX@ JNEC 28 / 31
  • 29. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Inserting tables Tables require the tabular environment. begin{tabular}{lccc} {} &Judge 1 &Judge 2 &Judge 3 hline Katrina &7 &9 &10 Karishma &9 &10 &7 Kareena &10 &7 &9 hline end{tabular} will give: Judge 1 Judge 2 Judge 3 Katrina 7 9 10 Karishma 9 10 7 Kareena 10 7 9 shudh@JNEC LATEX@ JNEC 29 / 31
  • 30. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables Inserting tables ... and numbering them begin{table} begin{tabular}{lccc} {} &Judge 1 &Judge 2 &Judge 3 hline Katrina &7 &9 &10 Karishma &9 &10 &7 Kareena &10 &7 &9 hline end{tabular} caption{Scores given by the judges for different participants in a beauty competition. end{table} Judge 1 Judge 2 Judge 3 Katrina 7 9 10 Karishma 9 10 7 Kareena 10 7 9 Table 1: Scores given by the judges for different participants in a beauty competition. Meanings: lccc: Left,centered,centered,centered hline: Horizontal line : Line break &: Tab character shudh@JNEC LATEX@ JNEC 30 / 31
  • 31. SU D D H ASH EEL.CO M Motivation Parts Math Graphics Tables In the upcoming sessions Typesetting advanced mathematics Typesetting aligned and multiline equations Typesetting Matrices Vector notations: Cross product, dot product, bold vectors shudh@JNEC LATEX@ JNEC 31 / 31