Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
The LATEX 
Document Preparation System 
Vijay Ukani, 
Computer Science and Engineering Department 
Nirma University, Ahmedabad 
September 20, 2014 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
1 Motivation 
2 Basics 
Commands 
Document Structure 
Running LATEX 
3 Controlling Appearance 
Making Lists 
Fonts, Symbols, quotations and footnotes 
4 Adding Structure 
Sections 
Tables, Figures and Equations 
5 BIBTEX 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
What is TEXand LATEX? 
TEX typesetting system developed by DONALD E. 
KNUTH (Stanford University) to create beautiful 
documents, especially those containing maths. TEX 
is free software focusing more upon formatting. 
LATEX LATEX is a set of macros built on top of TEX. 
TEX-macroprocessor is written by LESLIE 
LAMPORT, which implements a markup-language. 
Allows users to concentrate on the content of the 
document rather than on formatting. 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
What is LATEX? 
pronounced as Lah-tek, or Lay-tek 
a typesetting program, not a word-processor 
macros of TeX (Donald E. Knuth) 
current version LATEX2" 
designed for producing beautiful Books, Thesis, Papers, 
Articles... 
de facto standard for writing academic papers 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Why LATEX? 
platform, version independent (Unix, Windows), freely 
available 
High quality math typesetting 
Only a few commands to de
ne the structure of text, no 
knowledge of typography or book design required 
Complex scienti
c documents can be created automatically 
including: 
bibliography 
index, glossaries 
crossreferences 
table of contents, lists of
gures, tables etc. 
. . . 
used widely in scienti
c world and required for most 
conference or journal submissions 
allows you to think about content than format 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Limitations of LATEX 
learning curve 
LATEX is not WYSIWYG you have to compile your
les 
before you can see the changes. Rather it is WYMIWYG 
(What You Mean is What You Get) 
If you are trying to produce a document for which there is no 
pre-de
ned layout, it requires a fair bit of knowledge to design 
a new layout 
You cannot easily exchange LATEX
les with colleagues who 
are unfamiliar with it 
Un
exible formatting (dicult to change position of
gures) 
Requires compilation 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Word and LATEXcomparison 
Figure: Word and LATEXcomparison1 
1Source: http://www.pinteric.com/miktex.html 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Word and LATEX comparison 
Figure: Word and LATEX comparison2 
2Source: http://www.zinktypogra
e.nl/latex.php?lang=en
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Word and LATEX comparison 
Plus points of LATEX 
Speed 
Security 
Separation of contents from formatting 
Control 
Flexibility 
Interoperable 
. . . 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Word and LATEX comparison 
Plus points of Word 
Grammar Checker 
Lesser time for smaller documents 
WYSIWYG 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Where to get LATEX? 
Windows 
MikTeX, The LATEXCompiler http://www.miktex.de/ 
LATEXEditors 
WinEdt (Share ware) 
LATEXEditor, LEd, a free LaTeX editor 
TexNIC center, a free LaTeX editor 
WinShell, SciTE (Open Source) 
Notepad, wordpad or any other text editor can be used 
Linux 
TeXLive/teTex, available with most Linux distros 
Kile, a free LaTeX editor 
gedit with LATEXplugin 
Online LATEX 
https://www.writelatex.com/edu 
https://www.sharelatex.com/ 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Outline 
1 Motivation 
2 Basics 
Commands 
Document Structure 
Running LATEX 
3 Controlling Appearance 
Making Lists 
Fonts, Symbols, quotations and footnotes 
4 Adding Structure 
Sections 
Tables, Figures and Equations 
5 BIBTEX 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Commands 
LATEX commands 
acommand 
anothercommand{argument} 
yetanothercommand[options]{argument} 
% a comment. I can say what I like here! 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Document Structure 
Overall structure of a LATEX document: 
documentclass[...]{...} 
% preamble 
... 
begin{document} 
% body of the document 
... 
end{document} 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Document Structure 
The preamble: 
documentclass[a4paper,12pt]{article} 
% the next line is only needed if you plan 
% to embed a PostScript figure in the text 
usepackage{graphics} 
title{A LaTeX File} 
author{Vijay Ukani} 
% date{if you are unhappy with the default} 
Document classes: article, report, book, beamer, userde
nedclass 
and options: 10pt, 11pt, twocolumn, a4paper, a5paper . . . 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Document Structure 
The body: 
begin{document} 
maketitle 
section{Introduction} 
Some text... 
section{The Middle} 
Some more ... 
section{Conclusion} 
The final part 
end{document} 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Prepare Bibliography, if any 
Use BibTex to process Bibliography 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Prepare Bibliography, if any 
Use BibTex to process Bibliography 
Compile your document with LaTeX
lename.tex command 
on DOS prompt or click TEX button in the menubar 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Prepare Bibliography, if any 
Use BibTex to process Bibliography 
Compile your document with LaTeX
lename.tex command 
on DOS prompt or click TEX button in the menubar 
View the dvi output 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Prepare Bibliography, if any 
Use BibTex to process Bibliography 
Compile your document with LaTeX
lename.tex command 
on DOS prompt or click TEX button in the menubar 
View the dvi output 
To get pdf output, the command is pd
atex
lename.tex 
View the pdf output 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Prepare Bibliography, if any 
Use BibTex to process Bibliography 
Compile your document with LaTeX
lename.tex command 
on DOS prompt or click TEX button in the menubar 
View the dvi output 
To get pdf output, the command is pd
atex
lename.tex 
View the pdf output 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Running LATEX 
Running and Viewing LATEX 
Start WinEdt or any of your favorite TEX editor 
Create a new .tex
le 
Prepare your latex
le as per previous slide 
Prepare Bibliography, if any 
Use BibTex to process Bibliography 
Compile your document with LaTeX
lename.tex command 
on DOS prompt or click TEX button in the menubar 
View the dvi output 
To get pdf output, the command is pd
atex
lename.tex 
View the pdf output 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Outline 
1 Motivation 
2 Basics 
Commands 
Document Structure 
Running LATEX 
3 Controlling Appearance 
Making Lists 
Fonts, Symbols, quotations and footnotes 
4 Adding Structure 
Sections 
Tables, Figures and Equations 
5 BIBTEX 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Making Lists 
Numbered Lists 
List of Metros in India 
begin{enumerate} 
item Delhi pause 
item Mumbai pause 
item Kolkata pause 
item Chennai 
end{enumerate} 
Looks like:- 
List of Metros in India 
1 Delhi 
2 Mumbai 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Making Lists 
Numbered Lists 
List of Metros in India 
begin{enumerate} 
item Delhi pause 
item Mumbai pause 
item Kolkata pause 
item Chennai 
end{enumerate} 
Looks like:- 
List of Metros in India 
1 Delhi 
2 Mumbai 
3 Kolkata 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX
Motivation Basics Controlling Appearance Adding Structure BIBTEX References 
Making Lists 
Numbered Lists 
List of Metros in India 
begin{enumerate} 
item Delhi pause 
item Mumbai pause 
item Kolkata pause 
item Chennai 
end{enumerate} 
Looks like:- 
List of Metros in India 
1 Delhi 
2 Mumbai 
3 Kolkata 
4 Chennai 
Vijay Ukani Nirma University, Ahmedabad 
Introduction to LATEX

Latex slides

  • 1.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References The LATEX Document Preparation System Vijay Ukani, Computer Science and Engineering Department Nirma University, Ahmedabad September 20, 2014 Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 2.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References 1 Motivation 2 Basics Commands Document Structure Running LATEX 3 Controlling Appearance Making Lists Fonts, Symbols, quotations and footnotes 4 Adding Structure Sections Tables, Figures and Equations 5 BIBTEX Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 3.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References What is TEXand LATEX? TEX typesetting system developed by DONALD E. KNUTH (Stanford University) to create beautiful documents, especially those containing maths. TEX is free software focusing more upon formatting. LATEX LATEX is a set of macros built on top of TEX. TEX-macroprocessor is written by LESLIE LAMPORT, which implements a markup-language. Allows users to concentrate on the content of the document rather than on formatting. Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 4.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References What is LATEX? pronounced as Lah-tek, or Lay-tek a typesetting program, not a word-processor macros of TeX (Donald E. Knuth) current version LATEX2" designed for producing beautiful Books, Thesis, Papers, Articles... de facto standard for writing academic papers Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 5.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Why LATEX? platform, version independent (Unix, Windows), freely available High quality math typesetting Only a few commands to de
  • 6.
    ne the structureof text, no knowledge of typography or book design required Complex scienti
  • 7.
    c documents canbe created automatically including: bibliography index, glossaries crossreferences table of contents, lists of
  • 8.
    gures, tables etc. . . . used widely in scienti
  • 9.
    c world andrequired for most conference or journal submissions allows you to think about content than format Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 10.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Limitations of LATEX learning curve LATEX is not WYSIWYG you have to compile your
  • 11.
    les before youcan see the changes. Rather it is WYMIWYG (What You Mean is What You Get) If you are trying to produce a document for which there is no pre-de
  • 12.
    ned layout, itrequires a fair bit of knowledge to design a new layout You cannot easily exchange LATEX
  • 13.
    les with colleagueswho are unfamiliar with it Un exible formatting (dicult to change position of
  • 14.
    gures) Requires compilation Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 15.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Word and LATEXcomparison Figure: Word and LATEXcomparison1 1Source: http://www.pinteric.com/miktex.html Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 16.
    Word and LATEXcomparison Figure: Word and LATEX comparison2 2Source: http://www.zinktypogra
  • 17.
  • 18.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Word and LATEX comparison Plus points of LATEX Speed Security Separation of contents from formatting Control Flexibility Interoperable . . . Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 19.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Word and LATEX comparison Plus points of Word Grammar Checker Lesser time for smaller documents WYSIWYG Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 20.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Where to get LATEX? Windows MikTeX, The LATEXCompiler http://www.miktex.de/ LATEXEditors WinEdt (Share ware) LATEXEditor, LEd, a free LaTeX editor TexNIC center, a free LaTeX editor WinShell, SciTE (Open Source) Notepad, wordpad or any other text editor can be used Linux TeXLive/teTex, available with most Linux distros Kile, a free LaTeX editor gedit with LATEXplugin Online LATEX https://www.writelatex.com/edu https://www.sharelatex.com/ Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 21.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Outline 1 Motivation 2 Basics Commands Document Structure Running LATEX 3 Controlling Appearance Making Lists Fonts, Symbols, quotations and footnotes 4 Adding Structure Sections Tables, Figures and Equations 5 BIBTEX Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 22.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Commands LATEX commands acommand anothercommand{argument} yetanothercommand[options]{argument} % a comment. I can say what I like here! Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 23.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Document Structure Overall structure of a LATEX document: documentclass[...]{...} % preamble ... begin{document} % body of the document ... end{document} Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 24.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Document Structure The preamble: documentclass[a4paper,12pt]{article} % the next line is only needed if you plan % to embed a PostScript figure in the text usepackage{graphics} title{A LaTeX File} author{Vijay Ukani} % date{if you are unhappy with the default} Document classes: article, report, book, beamer, userde
  • 25.
    nedclass and options:10pt, 11pt, twocolumn, a4paper, a5paper . . . Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 26.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Document Structure The body: begin{document} maketitle section{Introduction} Some text... section{The Middle} Some more ... section{Conclusion} The final part end{document} Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 27.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 28.
    le Vijay UkaniNirma University, Ahmedabad Introduction to LATEX
  • 29.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 30.
  • 31.
    le as perprevious slide Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 32.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 33.
  • 34.
    le as perprevious slide Prepare Bibliography, if any Use BibTex to process Bibliography Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 35.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 36.
  • 37.
    le as perprevious slide Prepare Bibliography, if any Use BibTex to process Bibliography Compile your document with LaTeX
  • 38.
    lename.tex command onDOS prompt or click TEX button in the menubar Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 39.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 40.
  • 41.
    le as perprevious slide Prepare Bibliography, if any Use BibTex to process Bibliography Compile your document with LaTeX
  • 42.
    lename.tex command onDOS prompt or click TEX button in the menubar View the dvi output Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 43.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 44.
  • 45.
    le as perprevious slide Prepare Bibliography, if any Use BibTex to process Bibliography Compile your document with LaTeX
  • 46.
    lename.tex command onDOS prompt or click TEX button in the menubar View the dvi output To get pdf output, the command is pd atex
  • 47.
    lename.tex View thepdf output Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 48.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 49.
  • 50.
    le as perprevious slide Prepare Bibliography, if any Use BibTex to process Bibliography Compile your document with LaTeX
  • 51.
    lename.tex command onDOS prompt or click TEX button in the menubar View the dvi output To get pdf output, the command is pd atex
  • 52.
    lename.tex View thepdf output Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 53.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Running LATEX Running and Viewing LATEX Start WinEdt or any of your favorite TEX editor Create a new .tex
  • 54.
  • 55.
    le as perprevious slide Prepare Bibliography, if any Use BibTex to process Bibliography Compile your document with LaTeX
  • 56.
    lename.tex command onDOS prompt or click TEX button in the menubar View the dvi output To get pdf output, the command is pd atex
  • 57.
    lename.tex View thepdf output Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 58.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Outline 1 Motivation 2 Basics Commands Document Structure Running LATEX 3 Controlling Appearance Making Lists Fonts, Symbols, quotations and footnotes 4 Adding Structure Sections Tables, Figures and Equations 5 BIBTEX Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 59.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Making Lists Numbered Lists List of Metros in India begin{enumerate} item Delhi pause item Mumbai pause item Kolkata pause item Chennai end{enumerate} Looks like:- List of Metros in India 1 Delhi 2 Mumbai Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 60.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Making Lists Numbered Lists List of Metros in India begin{enumerate} item Delhi pause item Mumbai pause item Kolkata pause item Chennai end{enumerate} Looks like:- List of Metros in India 1 Delhi 2 Mumbai 3 Kolkata Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX
  • 61.
    Motivation Basics ControllingAppearance Adding Structure BIBTEX References Making Lists Numbered Lists List of Metros in India begin{enumerate} item Delhi pause item Mumbai pause item Kolkata pause item Chennai end{enumerate} Looks like:- List of Metros in India 1 Delhi 2 Mumbai 3 Kolkata 4 Chennai Vijay Ukani Nirma University, Ahmedabad Introduction to LATEX